* Reimplement AddPeer and RemovePeer for admin socket
Fix#950
* Disconnect the peer on `removePeer`
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This uses a 6 second deadline for timeouts instead of using `util.FuncTimeout` at 30 seconds for the read and then again for the write.
If the handshake doesn't complete within 6 seconds then it's going to probably collapse when we give the connection to Ironwood and it tries to do a keepalive anyway.
By providing the following items to `LDFLAGS`:
* `-X github.com/yggdrasil-network/yggdrasil-go/src/defaults.defaultConfig=/path/to/config`
* '-X github.com/yggdrasil-network/yggdrasil-go/src/defaults.defaultAdminListen=unix://path/to/sock'
Closes#818.
This refactors the request parsing, as well as improving the output for some request types. It also tweaks `yggdrasilctl` output, which should help with #947.
* Link refactoring
* More refactoring
* More tweaking
* Cleaner shutdowns, UNIX socket support, more tweaks
* Actorise links, remove mutex
* SOCKS support
In the past we used to send back anything up to 900 bytes of the packet in the ICMPv6 Packet Too Big response, whereas now we seemingly only send back 40 bytes.
It turns out that sending back only the 40 bytes of IPv6 headers isn't enough for most operating systems to positively ID the flow to reduce the MTU. This PR updates it so that we can send up to 512 bytes instead (900 is probably excessive) — that should leave plenty of room for any number of IPv6 extension headers and the next protocol headers and some of the payload.
This seems to fix the problem in my testing.
* Restore `uptime`, `bytes_sent` and `bytes_recvd` to the admin API for peers
* Wrap conn in Yggdrasil instead, so not necessary to do so in Ironwood
* Shuffle struct for alignment