mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-02-16 18:32:03 +01:00
Fix concatening string to tuple. Allow for forwarding a single port.
This commit is contained in:
parent
6ec42adbf4
commit
1f5ed9c66e
@ -40,8 +40,10 @@ class Method(BaseMethod):
|
|||||||
for _, swidth, sexclude, snet, fport, lport \
|
for _, swidth, sexclude, snet, fport, lport \
|
||||||
in sorted(subnets, key=subnet_weight, reverse=True):
|
in sorted(subnets, key=subnet_weight, reverse=True):
|
||||||
tcp_ports = ('ip', 'protocol', 'tcp')
|
tcp_ports = ('ip', 'protocol', 'tcp')
|
||||||
if fport:
|
if fport and fport != lport:
|
||||||
tcp_ports = tcp_ports + ('dport { %d-%d }' % (fport, lport))
|
tcp_ports = tcp_ports + ('tcp', 'dport', '{ %d-%d }' % (fport, lport))
|
||||||
|
elif fport and fport == lport:
|
||||||
|
tcp_ports = tcp_ports + ('tcp', 'dport', '%d' % (fport))
|
||||||
|
|
||||||
if sexclude:
|
if sexclude:
|
||||||
_nft('add rule', chain, *(tcp_ports + (
|
_nft('add rule', chain, *(tcp_ports + (
|
||||||
|
Loading…
Reference in New Issue
Block a user