Documentation
¶
Index ¶
- Variables
- func AdvancedRouting() bool
- func CheckFwmarkSupport() bool
- func CheckRuleOperationsSupport() bool
- func CustomRoutingDisabled() bool
- func GetVPNInterfaceName() string
- func Init()
- func IsDataPlaneMark(fwmark uint32) bool
- func SetSocketMark(conn syscall.Conn) error
- func SetVPNInterfaceName(name string)
- type Dialer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ControlPlaneMark is the fwmark value used to mark packets that should not be routed through the NetBird interface to // avoid routing loops. // This includes all control plane traffic (mgmt, signal, flows), relay, ICE/stun/turn and everything that is emitted by the wireguard socket. // It doesn't collide with the other marks, as the others are used for data plane traffic only. ControlPlaneMark = fwmarkBase | offsetControlPlane // DataPlaneMarkLower is the lowest value for the data plane range DataPlaneMarkLower = fwmarkBase | offsetDataPlaneLower // DataPlaneMarkUpper is the highest value for the data plane range DataPlaneMarkUpper = fwmarkBase | offsetDataPlaneUpper // DataPlaneMarkIn is the mark for inbound data plane traffic. DataPlaneMarkIn = fwmarkBase | offsetDataPlaneIn // DataPlaneMarkOut is the mark for outbound data plane traffic. DataPlaneMarkOut = fwmarkBase | offsetDataPlaneOut // PreroutingFwmarkRedirected is applied to packets that were redirected (input -> forward, e.g. by Docker or Podman) for special handling. PreroutingFwmarkRedirected = fwmarkBase | offsetRedirected // PreroutingFwmarkMasquerade is applied to packets that arrive from the NetBird interface and should be masqueraded. PreroutingFwmarkMasquerade = fwmarkBase | offsetMasquerade // PreroutingFwmarkMasqueradeReturn is applied to packets that will leave through the NetBird interface and should be masqueraded. PreroutingFwmarkMasqueradeReturn = fwmarkBase | offsetMasqueradeReturn )
Functions ¶
func AdvancedRouting ¶
func AdvancedRouting() bool
AdvancedRouting reports whether routing loops can be avoided without using exclusion routes
func CheckFwmarkSupport ¶
func CheckFwmarkSupport() bool
func CheckRuleOperationsSupport ¶
func CheckRuleOperationsSupport() bool
func CustomRoutingDisabled ¶
func CustomRoutingDisabled() bool
CustomRoutingDisabled returns true if custom routing is disabled. This will fall back to the operation mode before the exit node functionality was implemented. In particular exclusion routes won't be set up and all dialers and listeners will use net.Dial and net.Listen, respectively.
func GetVPNInterfaceName ¶
func GetVPNInterfaceName() string
GetVPNInterfaceName returns empty string on Linux
func IsDataPlaneMark ¶
IsDataPlaneMark determines if a fwmark is in the data plane range.
func SetSocketMark ¶
SetSocketMark sets the SO_MARK option on the given socket connection
func SetVPNInterfaceName ¶
func SetVPNInterfaceName(name string)
SetVPNInterfaceName is a no-op on Linux
Types ¶
Click to show internal directories.
Click to hide internal directories.