database64128 / swgp-go

🐉 Simple WireGuard proxy with minimal overhead for WireGuard traffic.
GNU Affero General Public License v3.0
231 stars 24 forks source link

Macos routes #49

Open lsgrep opened 6 months ago

lsgrep commented 6 months ago

Thanks a lot for creating this. Here is how i am using this on macOS. It is pretty ugly (without syscall), but it might help out the if someone want to use this in macOS. It is working for me. I am just sharing my solution, rather than hoping getting it merged into the codebase.

alexander-potemkin commented 5 days ago

@database64128 could this be merged into the main source code tree? Or any additional things needs to be done? I would love to see clean MacOS implementation, if possible!

database64128 commented 5 days ago

@alexander-potemkin No, like the author said, this is too much of a hack to be merged.

If your internet-facing physical interface has a fixed IP address, like 192.168.50.11, you could specify "proxyConnListenAddress": "192.168.50.11:" in your client config to let swgp-go bind to 192.168.50.11:0 for its outgoing sockets.

database64128 commented 5 days ago

@lsgrep Off-topic shameless plug: Saw you wrote https://github.com/lsgrep/cfbind, thought you might be interested in a similar project of mine: https://github.com/database64128/ddns-go. On Linux and Windows, ddns-go can use native platform APIs to monitor network interface address changes, without the need of polling at a fixed interval.