mirror of
https://github.com/sshuttle/sshuttle.git
synced 2024-11-21 23:43:18 +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 \
|
||||
in sorted(subnets, key=subnet_weight, reverse=True):
|
||||
tcp_ports = ('ip', 'protocol', 'tcp')
|
||||
if fport:
|
||||
tcp_ports = tcp_ports + ('dport { %d-%d }' % (fport, lport))
|
||||
if fport and 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:
|
||||
_nft('add rule', chain, *(tcp_ports + (
|
||||
|
Loading…
Reference in New Issue
Block a user