Closed pufferffish closed 2 years ago
Maybe make it semi-compatible with wireguard configuation
Came here to an open issue for that specifically. SelfSecretKey
, SelfSecretKey
, SelfEndpoint
, PeerPublicKey
, PeerEndpoint
& DNS
can just be directly read from the PrivateKey
, Address
, DNS
, PublicKey
, AllowedIPs
& Endpoint
of a wg-quick
config file directly. Being able to supply the config using 1 config key like WGConfig = .../some/path/wg_quick.conf
and/or -wg-config .../some/path/wg_quick.conf
as command-line argument would be ideal
Maybe make it semi-compatible with wireguard configuation
Came here to an open issue for that specifically.
SelfSecretKey
,SelfSecretKey
,SelfEndpoint
,PeerPublicKey
,PeerEndpoint
&DNS
can just be directly read from thePrivateKey
,Address
,DNS
,PublicKey
,AllowedIPs
&Endpoint
of awg-quick
config file directly. Being able to supply the config using 1 config key likeWGConfig = .../some/path/wg_quick.conf
and/or-wg-config .../some/path/wg_quick.conf
as command-line argument would be ideal
It 's very helpful to read the values from the wgcf config file.
[x] Use an existing config format instead of rolling a custom one (e.g. INI).
[x] Implement reading from standard wireguard configuation
[x] Instead of passing around a config map[string]string everywhere, parse the config once, at the top of main, and then pass properly-typed arguments to the functions that need them. For example, tcpServerRoutine should just take an int.
[ ] ~Listen for Ctrl-C at the end of main so you can shutdown gracefully.~ (unnecessary, sockets are closed automatically upon shutdown, and wireguard peers do not need to be notified of shutdowns)
[x] Use io.Copy (or io.CopyBuffer) to simplify connForward