Update dependencies: Wireguard, go-ini and logrus #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Let's upgrade dependencies again!
The Wireguard dependency was tripping up Dependabot on wg-access-server because the old tags no longer exist:
Changes
The latest tagged version of Wireguard was buggy, peers couldn't connect because they never reached the
running
state, and handshake packets errored withReceived invalid initiation message
. So I chose the latest commit onmaster
instead, which works just fine.The Wireguard upgrade required changes to iface.go, because
device.NewDevice()
now takes aconn.Bind
parameter, we just callconn.NewDefaultBind()
for that, like wireguard-go does, too.It will also bump the minimum Go version required for compilation to Go 1.17, as Wireguard uses some new language features.
The ini upgrade deprecated
ini.DEFAULT_SECTION
, it is now calledini.DefaultSection
,parse()
in config.go has been adjusted accordingly.Also thanks to go-ini/ini#220 go-ini supports duplicate section names (i.e. multiple
Peer
sections), which simplifies config parsing a lot.Technically this was already present in v1.57.0, but place1 never updated the code despite the comment.
I've expanded one of the unit test cases to make sure the parsing works as expected (although wg-access-server never uses any ini files)