mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-11 09:21:49 +01:00
2475473227
All routes are now installed in a custom netbird routing table. Management and wireguard traffic is now marked with a custom fwmark. When the mark is present the traffic is routed via the main routing table, bypassing the VPN. When the mark is absent the traffic is routed via the netbird routing table, if: - there's no match in the main routing table - it would match the default route in the routing table IPv6 traffic is blocked when a default route IPv4 route is configured to avoid leakage.
14 lines
427 B
Go
14 lines
427 B
Go
//go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && !ios
|
|
|
|
package routemanager
|
|
|
|
import "net/netip"
|
|
|
|
func addToRouteTableIfNoExists(prefix netip.Prefix, addr string, intf string) error {
|
|
return genericAddToRouteTableIfNoExists(prefix, addr, intf)
|
|
}
|
|
|
|
func removeFromRouteTableIfNonSystem(prefix netip.Prefix, addr string, intf string) error {
|
|
return genericRemoveFromRouteTableIfNonSystem(prefix, addr, intf)
|
|
}
|