MCPcopy Index your code
hub / github.com/sshuttle/sshuttle / restore_firewall

Method restore_firewall

sshuttle/methods/pf.py:476–484  ·  view source on GitHub ↗
(self, port, family, udp, user, group)

Source from the content-addressed store, hash-verified

474 pf.enable()
475
476 def restore_firewall(self, port, family, udp, user, group):
477 if family not in [socket.AF_INET, socket.AF_INET6]:
478 raise Exception(
479 'Address family "%s" unsupported by pf method_name'
480 % family_to_string(family))
481 if udp:
482 raise Exception("UDP not supported by pf method_name")
483
484 pf.disable(pf_get_anchor(family, port))
485
486 def firewall_command(self, line):
487 if line.startswith('QUERY_PF_NAT '):

Callers 7

test_setup_firewallFunction · 0.45
test_setup_firewallFunction · 0.45
test_mainFunction · 0.45
mainFunction · 0.45

Calls 3

family_to_stringFunction · 0.90
pf_get_anchorFunction · 0.85
disableMethod · 0.45

Tested by 6

test_setup_firewallFunction · 0.36
test_setup_firewallFunction · 0.36
test_mainFunction · 0.36