You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use an existing config format instead of rolling a custom one (e.g. INI).
Implement reading from standard wireguard configuation
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)
Use io.Copy (or io.CopyBuffer) to simplify connForward
The text was updated successfully, but these errors were encountered:
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 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
It 's very helpful to read the values from the wgcf config file.
Use an existing config format instead of rolling a custom one (e.g. INI).
Implement reading from standard wireguard configuation
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)Use io.Copy (or io.CopyBuffer) to simplify connForward
The text was updated successfully, but these errors were encountered: