Documentation ¶
Overview ¶
Package exitnode provides meshnet-related firewall management functionality.
Index ¶
- Constants
- Variables
- type Node
- type Server
- func (en *Server) Disable() error
- func (en *Server) Enable() error
- func (en *Server) ResetFirewall(lanAvailable bool, killswitch bool) error
- func (en *Server) ResetPeers(peers mesh.MachinePeers, lanAvailable bool, killswitch bool) error
- func (en *Server) SetAllowlist(allowlist config.Allowlist, lanAvailable bool) error
- type TrafficPeer
Constants ¶
View Source
const (
Ipv4fwdKernelParamName = "net.ipv4.ip_forward"
)
Variables ¶
View Source
var ( REMOVE operation = false ADD operation = true )
Used when adding or removing rules from firewall
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node interface { Enable() error ResetPeers(mesh.MachinePeers, bool, bool) error ResetFirewall(lanAvailable bool, killswitch bool) error Disable() error SetAllowlist(config config.Allowlist, lanAvailable bool) error }
Node is exit node server side interface
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server struct for server side
func NewServer ¶
func NewServer(interfaceNames []string, commandFunc runCommandFunc, allowlist config.Allowlist, sysctlSetter kernel.SysctlSetter) *Server
NewServer create & initialize new Server
func (*Server) ResetFirewall ¶
ResetFirewall resets peer rules when peers don't change
func (*Server) ResetPeers ¶
EnablePeer enables masquerading for peer
Click to show internal directories.
Click to hide internal directories.