diff options
author | Tianyi Cui <tianyicui@gmail.com> | 2011-04-19 20:19:06 +0800 |
---|---|---|
committer | Avery Pennarun <apenwarr@gmail.com> | 2012-07-06 15:13:30 -0400 |
commit | 29d2e06bf5cd3d575015e23c638ca9e5a10ee29c (patch) | |
tree | ce4b5884177e4e8feee451982b841625350372dd /main.py | |
parent | bff16100509ed94e93c0331819f1a0730fc0431a (diff) |
Added --exclude-from feature.sshuttle-0.61
(Slightly modified by apenwarr)
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |