summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvery Pennarun <apenwarr@gmail.com>2012-07-06 16:26:45 -0400
committerAvery Pennarun <apenwarr@gmail.com>2012-07-06 16:26:45 -0400
commit87ca53cbc420008d59a5f6d1711314ad5a144721 (patch)
tree717f6d8a3f47d869803e5bfaaf3a79833cbc792d
parentd5c3aa61b8b77d3b12647bb15a83ba51a5f4d312 (diff)
MacOS precompiled app package for sshuttle-0.61sshuttle-0.61-macos-bin
-rwxr-xr-xSshuttle VPN.app/Contents/MacOS/Sshuttlebin37568 -> 25264 bytes
-rw-r--r--Sshuttle VPN.app/Contents/Resources/sshuttle/firewall.py2
-rwxr-xr-xSshuttle VPN.app/Contents/Resources/sshuttle/main.py3
-rw-r--r--Sshuttle VPN.app/Contents/Resources/sshuttle/server.py11
4 files changed, 14 insertions, 2 deletions
diff --git a/Sshuttle VPN.app/Contents/MacOS/Sshuttle b/Sshuttle VPN.app/Contents/MacOS/Sshuttle
index 334693b..cd94671 100755
--- a/Sshuttle VPN.app/Contents/MacOS/Sshuttle
+++ b/Sshuttle VPN.app/Contents/MacOS/Sshuttle
Binary files differ
diff --git a/Sshuttle VPN.app/Contents/Resources/sshuttle/firewall.py b/Sshuttle VPN.app/Contents/Resources/sshuttle/firewall.py
index 452715e..53d866e 100644
--- a/Sshuttle VPN.app/Contents/Resources/sshuttle/firewall.py
+++ b/Sshuttle VPN.app/Contents/Resources/sshuttle/firewall.py
@@ -471,6 +471,8 @@ def main(port, dnsport, syslog):
# disappears; we still have to clean up.
signal.signal(signal.SIGHUP, signal.SIG_IGN)
signal.signal(signal.SIGPIPE, signal.SIG_IGN)
+ signal.signal(signal.SIGTERM, signal.SIG_IGN)
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
# ctrl-c shouldn't be passed along to me. When the main sshuttle dies,
# I'll die automatically.
diff --git a/Sshuttle VPN.app/Contents/Resources/sshuttle/main.py b/Sshuttle VPN.app/Contents/Resources/sshuttle/main.py
index daf3b87..34d9fb1 100755
--- a/Sshuttle VPN.app/Contents/Resources/sshuttle/main.py
+++ b/Sshuttle VPN.app/Contents/Resources/sshuttle/main.py
@@ -57,6 +57,7 @@ dns capture local DNS requests and forward to the remote DNS server
python= path to python interpreter on the remote server
r,remote= ssh hostname (and optional username) of remote sshuttle server
x,exclude= exclude this subnet (can be used more than once)
+exclude-from= exclude the subnets in a file (whitespace separated)
v,verbose increase debug message verbosity
e,ssh-cmd= the command to use to connect to the remote [ssh]
seed-hosts= with -H, use these hostnames for initial scan (comma-separated)
@@ -104,6 +105,8 @@ try:
for k,v in flags:
if k in ('-x','--exclude'):
excludes.append(v)
+ if k in ('-X', '--exclude-from'):
+ excludes += open(v).read().split()
remotename = opt.remote
if remotename == '' or remotename == '-':
remotename = None
diff --git a/Sshuttle VPN.app/Contents/Resources/sshuttle/server.py b/Sshuttle VPN.app/Contents/Resources/sshuttle/server.py
index e1b327d..5f2e5e4 100644
--- a/Sshuttle VPN.app/Contents/Resources/sshuttle/server.py
+++ b/Sshuttle VPN.app/Contents/Resources/sshuttle/server.py
@@ -43,7 +43,12 @@ def _maskbits(netmask):
def _shl(n, bits):
- return n * int(2**bits)
+ # we use our own implementation of left-shift because
+ # results may be different between older and newer versions
+ # of python for numbers like 1<<32. We use long() because
+ # int(2**32) doesn't work in older python, which has limited
+ # int sizes.
+ return n * long(2**bits)
def _list_routes():
@@ -68,9 +73,11 @@ def _list_routes():
def list_routes():
+ l = []
for (ip,width) in _list_routes():
if not ip.startswith('0.') and not ip.startswith('127.'):
- yield (ip,width)
+ l.append((ip,width))
+ return l
def _exc_dump():