mirror of
https://github.com/sshuttle/sshuttle.git
synced 2024-11-21 23:43:18 +01:00
Fix LGTM reported issues
This commit is contained in:
parent
181bf648a7
commit
30cdc5e74b
2
setup.py
2
setup.py
@ -46,7 +46,7 @@ setup(
|
|||||||
"Development Status :: 5 - Production/Stable",
|
"Development Status :: 5 - Production/Stable",
|
||||||
"Intended Audience :: Developers",
|
"Intended Audience :: Developers",
|
||||||
"Intended Audience :: End Users/Desktop",
|
"Intended Audience :: End Users/Desktop",
|
||||||
"License :: OSI Approved :: "
|
"License :: OSI Approved :: " +
|
||||||
"GNU Lesser General Public License v2 or later (LGPLv2+)",
|
"GNU Lesser General Public License v2 or later (LGPLv2+)",
|
||||||
"Operating System :: OS Independent",
|
"Operating System :: OS Independent",
|
||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
|
@ -33,7 +33,8 @@ def main():
|
|||||||
parser.error('exactly zero arguments expected')
|
parser.error('exactly zero arguments expected')
|
||||||
return firewall.main(opt.method, opt.syslog)
|
return firewall.main(opt.method, opt.syslog)
|
||||||
elif opt.hostwatch:
|
elif opt.hostwatch:
|
||||||
return hostwatch.hw_main(opt.subnets, opt.auto_hosts)
|
hostwatch.hw_main(opt.subnets, opt.auto_hosts)
|
||||||
|
return 0
|
||||||
else:
|
else:
|
||||||
# parse_subnetports() is used to create a list of includes
|
# parse_subnetports() is used to create a list of includes
|
||||||
# and excludes. It is called once for each parameter and
|
# and excludes. It is called once for each parameter and
|
||||||
|
@ -7,8 +7,6 @@ from sshuttle.helpers import Fatal, debug3
|
|||||||
|
|
||||||
|
|
||||||
def original_dst(sock):
|
def original_dst(sock):
|
||||||
ip = "0.0.0.0"
|
|
||||||
port = -1
|
|
||||||
try:
|
try:
|
||||||
family = sock.family
|
family = sock.family
|
||||||
SO_ORIGINAL_DST = 80
|
SO_ORIGINAL_DST = 80
|
||||||
@ -73,7 +71,7 @@ class BaseMethod(object):
|
|||||||
def send_udp(self, sock, srcip, dstip, data):
|
def send_udp(self, sock, srcip, dstip, data):
|
||||||
if srcip is not None:
|
if srcip is not None:
|
||||||
raise Fatal("Method %s send_udp does not support setting srcip to %r"
|
raise Fatal("Method %s send_udp does not support setting srcip to %r"
|
||||||
% (self.name, srcip))
|
% (self.name, srcip))
|
||||||
sock.sendto(data, dstip)
|
sock.sendto(data, dstip)
|
||||||
|
|
||||||
def setup_tcp_listener(self, tcp_listener):
|
def setup_tcp_listener(self, tcp_listener):
|
||||||
|
Loading…
Reference in New Issue
Block a user