silverwind / default-gateway

Get the default network gateway, cross-platform.
86 stars 19 forks source link

Support policy-based routing on Linux #16

Open silverwind opened 5 years ago

silverwind commented 5 years ago

For example:

https://www.wireguard.com/netns/#rule-based-routing

silverwind commented 4 years ago

It may be neccessary to take at least sourceAddress option to really support this because with machines with PBR can have multiple default gateways depending on source address (and probably other factors based on ip rule configuration).