Documentation
¶
Index ¶
- Variables
- func AppendFile(filename, text string, perms os.FileMode) error
- func Command(command string, args ...string) (string, error)
- func DarwinServerSetup(iface, gface string) error
- func DefaultGate() string
- func DefaultIface() (string, error)
- func DenyIPTables() (string, error)
- func EnableVPN(tunnel, ipaddr string) []string
- func EnableVPNIPTables(tunnel, ipaddr string) (string, error)
- func ExceptApplication(appname, pathtoapp string) []string
- func ExceptTCPPort(port string) []string
- func ExceptUDPPort(port string) []string
- func ExceptWindowsTCPPort(port int) []string
- func ExceptWindowsUDPPort(port int) []string
- func GetPidOf(Executable string) (int, error)
- func GetPidString(Executable string) (string, error)
- func IfIP(INTERFACE string) (net.IP, error)
- func LinuxServerSetup(iface, gface string) error
- func LinuxSetupVPNDNS(tunnel, ipaddr string) (string, error)
- func LinuxSetupVPNExceptPort(tunnel, ipaddr, port string) (string, error)
- func LinuxSetupVPNTunnelled(tunnel, ipaddr string) (string, error)
- func ResetIPTables() (string, error)
- func RunExceptDHCP() (string, error)
- func RunExceptTCPPort(port string) (string, error)
- func RunExceptUDPPort(port string) (string, error)
- func RunExceptWindowsApplication(appname, pathtoapp string) (string, error)
- func RunExceptWindowsTCPPort(port int) (string, error)
- func RunExceptWindowsUDPPort(port int) (string, error)
- func RunIPTables(net int, rules []string) (string, error)
- func RunNetSH(rules []string) (string, error)
- func RunRoute(rules []string) (string, error)
- func ServerSetup(iface, gface string) error
- func Setup(iface string) error
- func SetupIPTables(rules []string) (string, error)
- func SetupRoute(gateway string, ifname string) (string, error)
- func SetupRouteWithMetric(gateway string, metric int, ifname string) (string, error)
- func VPNRoute(gateway string, ifname string) []string
- func VPNRouteWithMetric(gateway string, metric int, ifname string) []string
- func WindowsServerSetup(iface, gface string) error
- func WindowsSetupRouteDHCP(gateway string, ifname string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Clear = []string{ "-F", "-P INPUT ACCEPT", "-P FORWARD ACCEPT", "-P OUTPUT ACCEPT", "-t nat -F", "-t mangle -F", "-F", "-X", } DenyAll = []string{ "-P INPUT DROP", "-P FORWARD DROP", "-P OUTPUT DROP", "-A INPUT -i lo -j ACCEPT", "-A OUTPUT -o lo -j ACCEPT", "-A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT", } )
View Source
var AllowBasic = []string{
"advfirewall firewall add rule name=\"Core Networking (DNS-Out)\" dir=out action=allow protocol=UDP remoteport=53 program=\"%%%%systemroot%%%%\\system32\\svchost.exe\" service=\"dnscache\"",
"advfirewall firewall add rule name=\"Core Networking (DHCP-Out)\" dir=out action=allow protocol=UDP localport=68 remoteport=67 program=\"%%%%systemroot%%%%\\system32\\svchost.exe\" service=\"dhcp\"",
}
Functions ¶
func DarwinServerSetup ¶
func DefaultGate ¶
func DefaultGate() string
func DefaultIface ¶
func DenyIPTables ¶
func EnableVPNIPTables ¶
func ExceptApplication ¶
func ExceptTCPPort ¶
func ExceptUDPPort ¶
func ExceptWindowsTCPPort ¶
func ExceptWindowsUDPPort ¶
func GetPidString ¶
func LinuxServerSetup ¶
func LinuxSetupVPNDNS ¶
func LinuxSetupVPNExceptPort ¶
func LinuxSetupVPNTunnelled ¶
func ResetIPTables ¶
func RunExceptDHCP ¶
func RunExceptTCPPort ¶
func RunExceptUDPPort ¶
func RunExceptWindowsTCPPort ¶
func RunExceptWindowsUDPPort ¶
func ServerSetup ¶
func SetupIPTables ¶
func SetupRouteWithMetric ¶
func VPNRouteWithMetric ¶
func WindowsServerSetup ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.