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

Method restore_firewall

sshuttle/methods/nft.py:90–103  ·  view source on GitHub ↗
(self, port, family, udp, user, group)

Source from the content-addressed store, hash-verified

88 ('redirect to :' + str(port)))))
89
90 def restore_firewall(self, port, family, udp, user, group):
91 if udp:
92 raise Exception("UDP not supported by nft method_name")
93
94 if family == socket.AF_INET:
95 table = 'sshuttle-ipv4-%s' % port
96 if family == socket.AF_INET6:
97 table = 'sshuttle-ipv6-%s' % port
98
99 def _nft(action, *args):
100 return nft(family, table, action, *args)
101
102 # basic cleanup/setup of chains
103 nonfatal(_nft, 'delete table', '')
104
105 def get_supported_features(self):
106 result = super(Method, self).get_supported_features()

Callers

nothing calls this directly

Calls 1

nonfatalFunction · 0.90

Tested by

no test coverage detected