Commit Graph

341 Commits

Author SHA1 Message Date
max
2fa0cd06fb Route traffic by linux user 2017-09-17 15:33:34 +10:00
vieira
4e8c2b9c68 Avoid port forwarding from loopback address
When doing port forwarding on lo0 avoid the special case where the
traffic on lo0 did not came from sshuttle pass out rule but from the lo0
address itself. Fixes #159.
2017-07-29 17:15:32 +10:00
Itamar Turner-Trauring
be559fc78b Fix case where there is no --dns. 2017-07-18 17:15:03 +10:00
Itamar Turner-Trauring
d2e97a60f7 Add new option for overriding destination DNS server. 2017-07-18 17:15:03 +10:00
Itamar Turner-Trauring
cdbb379910 Talk to custom DNS server on pod, instead of the ones in /etc/resolv.conf 2017-07-18 17:15:03 +10:00
vieira
f9361d7014 Order first by port range and only then by swidth
This change makes the subnets with the most specific port ranges come
before subnets with larger, least specific, port ranges. Before this
change subnets with smaller swidth would always come first and only for
subnets with the same width would the size of the port range be
considered.

Example:
188.0.0.0/8 -x 0.0.0.0/0:443
Before: 188.0.0.0/8 would come first meaning that all ports would be
routed through the VPN for the subnet 188.0.0.0/8
After: 0.0.0.0/0:443 comes first, meaning that port 443 will be
excluded for all subnets, including 188.0.0.0/8. All other ports of
188.0.0.0/8 will be routed.
2017-05-08 16:56:42 +10:00
João Vieira
c4a41ada09 Adds support for tunneling specific port ranges (#144)
* Adds support for tunneling specific port ranges

This set of changes implements the ability of specifying a port or port
range for an IP or subnet to only tunnel those ports for that subnet.
Also supports excluding a port or port range for a given IP or subnet.

When, for a given subnet, there are intercepting ranges being added and
excluded, the most specific, i.e., smaller range, takes precedence. In
case of a tie the exclusion wins.

For different subnets, the most specific, i.e., largest swidth, takes
precedence independent of any eventual port ranges.

Examples:
Tunnels all traffic to the 188.0.0.0/8 subnet except those to port 443.
```
sshuttle -r <server> 188.0.0.0/8 -x 188.0.0.0/8:443
```

Only tunnels traffic to port 80 of the 188.0.0.0/8 subnet.
```
sshuttle -r <server> 188.0.0.0/8:80
```

Tunnels traffic to the 188.0.0.0/8 subnet and the port range that goes
from 80 to 89.
```
sshuttle -r <server> 188.0.0.0/8:80-89 -x 188.0.0.0/8:80-90
```

* Allow subnets to be specified with domain names

Simplifies the implementation of address parsing by using
socket.getaddrinfo(), which can handle domain resolution, IPv4 and IPv6
addresses. This was proposed and mostly implemented by @DavidBuchanan314
in #146.

Signed-off-by: David Buchanan <DavidBuchanan314@users.noreply.github.com>
Signed-off-by: João Vieira <vieira@yubo.be>

* Also use getaddrinfo for parsing listen addr:port

* Fixes tests for tunneling a port range

* Updates documentation to include port/port range

Adds some examples with subnet:port and subnet:port-port.
Also clarifies the versions of Python supported on the server while
maintaining the recommendation for Python 2.7, 3.5 or later.
Mentions support for pfSense.

* In Py2 only named arguments may follow *expression

Fixes issue in Python 2.7 where *expression may only be followed by
named arguments.

* Use right regex to extract ip4/6, mask and ports

* Tests for parse_subnetport
2017-05-07 13:18:13 +10:00
vieira
ef83a5c573 Work around non tabular headers in BSD netstat
netstat outputs some headers in BSD (that the Linux version does not)
that are not tabular and were breaking our 'split line into columns
and get nth column' logic. We now skip such headers.

Should fix #141.
2017-04-05 13:11:08 +10:00
S-trace
af9ebd0f4b Fix UDP and DNS support on Python 2.7 with tproxy method
There was runtime failure on UDP or DNS processing, because "socket" was redefined to PyXAPI's socket_ext in tproxy.py, but still was plain Python's socket in client.py
Fixed https://github.com/sshuttle/sshuttle/issues/134 for me
2017-02-21 16:42:18 +11:00
vieira
9a9015a75e Fixed tests after adding support for iproute2 2017-02-11 09:07:50 +11:00
vieira
d7d24f956b Small refactoring of netstat/iproute parsing 2017-02-11 09:07:50 +11:00
vieira
809fad537f Add support for iproute2
`netstat` has been deprecated for some time and some distros might
start shipping without it in the near future. This commit adds support
for `ip route` and uses it when available.
2017-02-11 09:07:50 +11:00
Stephen Levine
abce18cfc2 Allow remote hosts with colons in the username 2017-02-11 09:02:28 +11:00
Ermal Luci
5e90491344 Re-introduce ipfw support for sshuttle on FreeBSD with support for --DNS option as well
Sponsored-by: rsync.net
2017-01-28 11:36:26 +11:00
vieira
e8ceccc3d5 Add support for PfSense
PfSense is based on FreeBSD and its pf is pretty close to the one
FreeBSD ships, however some structures have different fields and two
offsets had to be fixed.
2017-01-15 19:08:53 +11:00
vieira
e39c4afce0 Set started_by_sshuttle False after disabling pf
We set it to true when we enable pf, but do not set it back to False
after disabling. When using IPv4 and IPv6 we end up trying to disable
twice which procudes an error while undoing changes in FreeBSD 11.
2017-01-09 10:07:38 +11:00
vieira
6d5d0d766f Tests and documentation for systemd integration
Some tests and documentation for the systemd notification feature.
Also fixes some corner case issues detected while writing the tests.
2016-10-30 10:58:03 +11:00
Jason Woods
fee5868196 Fix warning: closed channel got=STOP_SENDING 2016-10-28 08:25:21 +11:00
vieira
fbbcc05d58 Support sdnotify for better systemd integration
These changes introduce support for sdnotify allowing sshuttle to notify
systemd when it finishes connecting to the server and installing
firewall rules, and is ready to tunnel requests.
2016-10-24 17:54:33 +11:00
Joao Vieira
15b394da86 Fix #117 to allow for no subnets via file (-s)
This should fix an issue introduced in #117 where when no subnets are
given via file (-s file) the variable is None instead of an empty list
and the concatenation with the subnets given as positional parameters
fails.
2016-10-13 17:52:58 +11:00
Felix Dreissig
0ed5ef9a97 Fix argument splitting for multi-word arguments
By just splitting at spaces, multi-word arguments are torn apart even if
quoted. In case of custom ssh-cmd, this makes it practically impossible
to set certian options through `ssh -o`.
shlex splits arguments like a shell and e.g. respects quotes.
2016-10-04 18:19:59 +11:00
vieira
c0c3612e6d Allow subnets to be given only by file (-s)
This should fix #116. Handling this while still having the positional
arguments and -s both write to the same list turned out to be more
complicated than it's worth so each writes to their own variable and we
merge them at the end.
2016-09-27 08:12:39 +10:00
Brian May
1ffc3f52a1 Merge pull request #108 from vieira/pf-ipv6
IPv6 support for OSX and BSDs
2016-07-29 07:57:35 +10:00
vieira
8520ea2787 Use == instead of is to compare with AF_INET 2016-07-27 23:18:25 +00:00
vieira
6a394deaf2 Fixes missing comma from tuple in pf tests 2016-07-27 23:06:36 +00:00
vieira
83d5c59a57 Tests for IPv6 on pf 2016-07-27 22:17:02 +00:00
vieira
1cfd9eb9d7 Be more specific and consistent in some pf rules 2016-07-27 22:15:47 +00:00
vieira
f8d58fa4f0 IPv6 support for BSD and OSX
Adds IPv6 support for OpenBSD and OSX.
2016-07-24 22:04:29 +00:00
vieira
d2d5a37541 AF_INET6 is different between BSDs and Linux
AF_INET is the same constant on Linux and BSD but AF_INET6
is different. As the client and server can be running on
different platforms we can not just set the socket family
to what comes in the wire.
2016-07-24 22:02:17 +00:00
vieira
e9be2deea0 Exclude the IP where sshuttle is really listening
We were always excluding 127.0.0.1/8 but sshuttle might be listening on
other IP, e.g., ::1 for IPv6 or any other defined with -l
2016-07-24 21:58:20 +00:00
vieira
a43c668dde Fixes type mismatch between str and bytes
Should fix issue #104.
2016-07-09 22:49:12 +00:00
Huiqiang Liu
e0dfb95596 Fix OpenBSD pf test failure 2016-06-17 17:18:43 +08:00
João Vieira
f876c5db5e Add <forward_subnets> to divert rule in OpenBSD
Fixes bug where all traffic routed to loopback would end up being diverted to the same port.
2016-06-16 22:34:19 +01:00
Huiqiang Liu
2e1beefc9a Hack pf to enable multiple instances in Mac OS X 10.10 and above 2016-06-16 12:31:02 +08:00
Dan Lenski
5a20783baa tweak docs to match @vieira's changes 2016-05-02 21:40:53 -07:00
vieira
495b3c39ea Seed hosts without auto hosts
A possible implementation for the change requested in #94, so that seed
hosts can be used without auto hosts. In this scenario only the
specified hosts (or ips) will be looked up (or rev looked up).
2016-05-03 00:18:32 +00:00
Brian May
f3cbc5018a Fix PEP8 issues 2016-04-30 18:08:46 +10:00
Brian May
1d64879613 Fix tests 2016-04-23 13:19:06 +10:00
Brian May
8fad282bfd Ensure locale is set to C for external commands
Otherwise the output can vary and confuse our attempts to parse it.

Fixes: 93
2016-04-23 12:53:45 +10:00
Brian May
1dda9dd621 Add ENETUNREACH to NET_ERRS
We shouldn't come up with a fatal error because of a ENETUNREACH when
trying to contact the DNS server. Although this error shouldn't happen
either.

Fixes #89.
2016-04-20 15:18:59 +10:00
vieira
516ff7bc4a Correctly obtains the python executable to use
Previously the sshuttle shell script would pass the python to use as the
first argument of the command. The new run script no longer does this.
Instead we can obtain the python being used via sys.executable.
Fixes #88.
2016-04-20 15:15:44 +10:00
vieira
4241381d82 Backward compatibility with Python 2.4 (server)
It is often the case that the user has no administrative control over
the server that is being used. As such it is important to support as
many versions as possible, at least on the remote server end. These
fixes will allow sshuttle to be used with servers that have only
python 2.4 or python 2.6 installed while hopefully not breaking the
compatibility with 2.7 and 3.5.
2016-04-03 13:14:02 +10:00
vieira
6e15e69029 Support multiple subnet files (multiple -s options)
When passing multiple subnet files, e.g., by using -s/--subnets
multiple times or by using it together with subnets passed as positional
arguments append the content from all sources instead of only using the
subnets from the last source. This makes the behaviour of -s/--subnets
consistent with -x/--exclude.
2016-03-31 11:46:12 +11:00
vieira
8fa45885cc Remove --server option
As @brianmay observed in #82 this option is no longer used and can be
dropped.
2016-03-28 22:01:54 +00:00
Brian May
b8160c4a37 Fix pep8 issues 2016-03-22 13:19:32 +11:00
vieira
05bacf6fd6 Use argparse for command line options
Fixes the kind of problems reported on #75 but does break the command
line "API" (hopefully).
2016-03-22 13:12:59 +11:00
Brian May
dea3f21943 Write more server tests 2016-03-16 18:24:43 +11:00
Brian May
d522d1e1bd Split client/server tests
This allows disabling all client tests using a conftest.py file, if for
example #56 gets merged and the server supports more python versions
then the server.

The server side tests are very incomplete.
2016-03-16 17:40:48 +11:00
Brian May
3541e4bdfe Fix shell quoting
Due to nested shells, we need to have multiple layers of quoting. Yuck.

Closes #80
2016-03-16 16:38:22 +11:00
Andrew Gillham
7875d1b97a Explicitly call /bin/sh for compatibility with non POSIX shells.
The fish shell doesn’t support ‘||’ and requires a ‘—python python’
workaround.  This change explicitly calls /bin/sh for the remote shell
commands.
2016-03-08 15:30:59 -08:00
Brian May
2b0d0065c7 Don't force IPv6 if IPv6 name servers
Just because we may have found IPv6 DNS servers from /etc/resolv.conf
doesn't mean we should force IPv6 support.

Instead we should disable the IPv6 DNS servers if IPv6 is disabled.

Note: this will also result in any IPv6 servers specified on the command
line being silently ignored too.

Specifying an IPv6 subnet will still require IPv6 support.

Closes #74
2016-03-08 18:49:47 +11:00
vieira
cedc8dc146 Add support for OpenBSD 2016-03-02 18:50:37 +11:00
Brian May
e8047ce3a9 Fixed Python 3 issue 2016-03-02 18:38:43 +11:00
vieira
fae4cb1dbf Override the skip on lo that ends up in the chain
In some cases (see #43) it seems that some network configurations may
end up setting a skip on lo. As sshuttle adds rules that rely on
filtering/translating packets on lo, this causes problem. This fix
overrides the skip and makes the rules be applied again.
Should fix at least some of the problems reported on #43.
2016-03-02 18:36:14 +11:00
vieira
7d8309ef05 Refactor OS specific portions of PF
This will make it easier to support other platforms/versions in the
future, e.g., OpenBSD.
2016-03-02 18:04:43 +11:00
Matt Boswell
4a954c547a fix byte/string bug introduced in 1c46f25e
This is the error message that this commit fixes:
TypeError: sequence item 142: expected a bytes-like object, str found

Complete what 1c46f25e started, more or less.
2016-01-31 16:26:21 -05:00
Brian May
4fcf7c73da Fix regression: ensure we do bind
Closes: #68
2016-01-31 19:15:02 +11:00
Brian May
ba8e948c0d Don't allocate socket until we need it
Wew were trying to allocate an IPv6 socket even though we weren't using
IPv6, causing failures on systems without IPv6 support available.

This change means a number of methods on MultiListener, e.g. setsockopt,
should not be called until after the bind call.

Closes #68
2016-01-30 11:28:59 +11:00
Brian May
262affe94f Use Sphinx for documentation
See #60
2016-01-17 16:19:13 +11:00
shaiay
d80b590a71 Fix joining of seed hosts to be compatible with python 3.5
this should also be backwards compatible with python 2
2016-01-17 12:05:23 +11:00
Brian May
7f0b5c698b Fix installation from wheel
Fix the following error. Looks like we have to have a function to call
for the entrypoint.

$ pip install dist/sshuttle-0.76.dev8_ngf59508f-py2-none-any.whl
Processing ./dist/sshuttle-0.76.dev8_ngf59508f-py2-none-any.whl
Installing collected packages: sshuttle
Exception:
Traceback (most recent call last):
  File "/tmp/ddd/local/lib/python2.7/site-packages/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/tmp/ddd/local/lib/python2.7/site-packages/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/tmp/ddd/local/lib/python2.7/site-packages/pip/req/req_set.py", line 646, in install
    **kwargs
  File "/tmp/ddd/local/lib/python2.7/site-packages/pip/req/req_install.py", line 803, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/tmp/ddd/local/lib/python2.7/site-packages/pip/req/req_install.py", line 998, in move_wheel_files
    isolated=self.isolated,
  File "/tmp/ddd/local/lib/python2.7/site-packages/pip/wheel.py", line 479, in move_wheel_files
    maker.make_multiple(['%s = %s' % kv for kv in console.items()])
  File "/tmp/ddd/local/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py", line 364, in make_multiple
    filenames.extend(self.make(specification, options))
  File "/tmp/ddd/local/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py", line 353, in make
    self._make_script(entry, filenames, options=options)
  File "/tmp/ddd/local/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py", line 244, in _make_script
    script = self._get_script_text(entry).encode('utf-8')
  File "/tmp/ddd/local/lib/python2.7/site-packages/pip/wheel.py", line 396, in _get_script_text
    "import_name": entry.suffix.split(".")[0],
AttributeError: 'NoneType' object has no attribute 'split'
2016-01-17 10:21:21 +11:00
Brian May
1e82571b3d Experimental: Use setuptools-scm
Closes: #58
2016-01-13 19:00:08 +11:00
Nathan Aclander
fc5545ccde Remove a print from tproxy used for debug
Closes: #61
2016-01-13 19:00:08 +11:00
Nathan Aclander
629c386dc5 Add the option to disable sshuttle ipv6 support
Using --disable-ipv6 will now force sshuttle not to capture
ipv6 traffic, even if the client supports ipv6.
2016-01-12 13:07:07 +11:00
vieira
1c46f25e13 Fixed str being used as bytes in hostwatch
This should solve the TypeError reported in #53 and some others I found
while testing the fix.

Closes: #53
2016-01-07 14:16:03 +11:00
vieira
11838d65c2 Adds support for FreeBSD PF
The PF firewall that is included in the FreeBSD base system does not
have exactly the same data structures as the OSX version. This commit
fixes the offsets and some field types that are also different. Tested
with FreeBSD 10.2 and OSX 10.11.2.
2016-01-05 18:00:57 +11:00
Brian May
ba60d22478 Add another test. 2015-12-15 14:23:42 +11:00
Brian May
1e81bf3dfc Mirror setup/restore logic 2015-12-15 13:39:00 +11:00
Brian May
7362ba9f52 If listenip_v6 we should declare ipv6 required 2015-12-15 13:31:03 +11:00
Brian May
b207d1d0d6 Fixes for --auto-nets 2015-12-15 13:30:34 +11:00
Brian May
56e3b22820 Add FIXME comment. 2015-12-15 13:29:04 +11:00
Brian May
02fa49627f Fix server side Python3 issues.
Closes: #49.
2015-12-15 12:51:29 +11:00
Brian May
bdc7d3a97c Fix UDP Python 3.5 issues.
Closes: #48
2015-12-15 11:41:48 +11:00
Brian May
90654b4fb9 Simplify selection of features 2015-12-15 11:40:55 +11:00
Brian May
6b4e36c528 Declare DNS support as feature 2015-12-14 21:00:31 +11:00
Brian May
eed917f062 Don't declare udp feature without recvmsg 2015-12-14 20:59:26 +11:00
Brian May
74f2d9ca7e Ensure Fatal errors are really Fatal 2015-12-14 20:51:49 +11:00
vieira
117afc7a68 Fixed dictionary changed size during iteration
The removal loop should probably be outside the iteration loop.
2015-12-14 16:46:11 +11:00
Brian May
c61984088b Test PF on non-darwin. 2015-12-14 09:28:43 +11:00
Brian May
e63e121354 Print PF rules used.
Also support multiline debug output better.
2015-12-14 09:21:15 +11:00
Brian May
2b235331d0 Split setup_firewall method.
* setup_firewall sets the firewall up.
* restore_firewall restores the firewall to initial state.
2015-12-13 11:56:18 +11:00
vieira
2eeea9536a Fixed str being used as bytes in daemonize 2015-12-09 16:32:39 +11:00
vieira
9a77d03edf Respect --syslog as soon as possible
When executing with the option --syslog start redirecting to
syslog immediately after the command line options are validated.
This way when using with some init daemon, e.g., upstart all the
relevant information (connection failures, etc) can be retrieved from
the log instead of being lost to stdout or stderr.
2015-12-09 14:46:11 +11:00
Brian May
4fdd715bc1 Don't change object while iterating
Closes: #40
2015-12-09 10:29:40 +11:00
Brian May
1ae4fce6b3 Fix logging with pf method and Python 3.5 2015-12-07 13:16:47 +11:00
Brian May
118171af7f Fix get_tcp_dstip with MacOSX/Python3.5 2015-12-07 07:14:26 +11:00
Brian May
3367124e6b Fix more brokenness. 2015-12-06 11:45:49 +11:00
Brian May
aaa6062329 Remove IPFW support.
This is no longer used by modern MacOSX and not getting tested.

It also required a do_wait() function which was a complication for
sshuttle as a whole.

Can get resurrected if required.
2015-12-06 11:33:52 +11:00
Brian May
da4ce19121 Fix MacOSX tests. 2015-12-06 11:24:38 +11:00
Brian May
12d4b304c3 Fix another MacOSX/Python3.5 issue. 2015-12-06 11:24:11 +11:00
Brian May
bd97506f7d Fixup firewall tests. 2015-12-06 11:02:31 +11:00
Brian May
53c07f7d90 hostmap shouldn't be global. 2015-12-06 11:00:12 +11:00
Brian May
7e0c1534df Be more explicit 2015-12-06 10:58:51 +11:00
Brian May
a3fbf860ff Fix more MacOSX/Python3.5 issues. 2015-12-05 20:21:36 +11:00
Brian May
7a9e36d211 Fix MacOSX/Python3.5 issues.
Closes: #36.
2015-12-05 16:41:33 +11:00
Brian May
65e81d51c6 Try Python3.5 by default.
Python 3.0, 3.1, 3.2, and 3.4 not supported however.
2015-12-05 14:41:22 +11:00
Brian May
43084eb49a Fix typo. 2015-12-05 14:40:33 +11:00
Brian May
bbb4d31c3f Add accidentally removed line. 2015-12-05 14:39:07 +11:00
Brian May
f7682d4c33 Make firewall messages consistent 2015-12-05 14:26:20 +11:00
Brian May
d07a775d50 Don't fail if can't revert errors
We will log the errors, however no point in failing; not only can this
hide errors that occured setting up the firewall, but is pointless as we
can't actually handle these errors in a good way anyway.
2015-12-05 14:14:01 +11:00
Brian May
50a6e87237 Don't use Xtoken if not set 2015-12-05 14:12:57 +11:00
Brian May
ed0a92e714 Remove reference to obsolete global 2015-12-05 14:12:24 +11:00
Brian May
36a1d7ead9 Python 3.5 fix. 2015-12-01 10:29:24 +11:00
Brian May
43d6ad6a51 Print Python version used for the various stages. 2015-12-01 10:03:24 +11:00
Brian May
5ab76a6ba9 Merge pull request #33 from felixonmars/master
Fix bug reported by @matiwinnetou in #31
2015-12-01 09:47:41 +11:00
Felix Yan
61f9ae6fb4 Fix bug reported by @matiwinnetou in #31 2015-11-30 23:45:24 +08:00
Brian May
191df92824 Ensure tempfiles are chmod 600 2015-11-28 16:13:56 +11:00
Brian May
6dfbc467c0 Ensure verbose is never None.
None >= 1 not valid under Python3.

Fixes #31.
2015-11-28 16:03:01 +11:00
Brian May
7e10fc0756 Add to debugging messages. 2015-11-25 13:06:43 +11:00
Brian May
2c2ee12e58 Formatting change. 2015-11-25 12:59:48 +11:00
Brian May
256ed7d244 Fix reversed debug messages. 2015-11-25 12:59:17 +11:00
Brian May
151634cd8c Fix typo setting up UDP. 2015-11-25 12:58:39 +11:00
Brian May
c0748c2388 Support IPV6 DNS servers.
Closes #28.
2015-11-24 12:23:17 +11:00
Brian May
71d46d77bf Add sock paramater to Handler callbacks
As Handler objects can have multiple sockets, we need to know which one
was involved in the incoming event.
2015-11-24 12:19:31 +11:00
Brian May
c1083e983f Pass correct method back from firewall.
Don't pass auto back.
2015-11-24 12:08:12 +11:00
Brian May
9944b97629 Remove legacy MACOSX files.
Broken and not been maintained in some time. See #21.
2015-11-24 07:17:19 +11:00
Brian May
eaad54f68b Add FIXME comment. 2015-11-18 20:08:15 +11:00
Brian May
6ebf76a5d8 Avoid hardcoding packed address lengths. 2015-11-18 20:07:41 +11:00
Brian May
51eb7862c4 Fix tests under PyPy. 2015-11-18 20:07:03 +11:00
Brian May
75b6865a1d Tests for pf method. 2015-11-17 20:52:31 +11:00
Brian May
e3a1c56e54 Add more methods tests.
Fix bug in tproxy recv_udp() method.
2015-11-17 17:55:30 +11:00
Brian May
99050aacb3 Fix for Python3.5. 2015-11-17 13:14:28 +11:00
Brian May
021e6f57af Add more tests. 2015-11-17 13:08:12 +11:00
Brian May
9cc6d63684 Fix firewall tests. 2015-11-17 12:46:35 +11:00
Brian May
43566ebda6 Remove unused import. 2015-11-17 10:58:44 +11:00
Brian May
537899c1df Remove unused function. 2015-11-17 10:58:29 +11:00
Brian May
641a193d3d Use readline instead of next. 2015-11-17 09:39:53 +11:00
Brian May
9d443e4155 Don't use nested.
Is Python 2.x only. Not supported under Python 3.x.
2015-11-17 09:32:40 +11:00
Brian May
54de23aae3 Add firewall tests. 2015-11-17 09:19:20 +11:00
Brian May
ac723694bf Restructure code
Pull out firewall methods code into seperate files.

Fix problems starting with method=='auto'; we were making decisions
based on the method, before the method had been finalized by the
firewall.

Only very basic testing so far. What could go wrong?
2015-11-16 18:55:56 +11:00
Brian May
bcd3205db1 Fix passing latency_control to server. 2015-11-16 11:32:17 +11:00
Brian May
a651d748cd Remove unused code. 2015-11-16 09:23:24 +11:00
Brian May
fe48c7c026 Fix PEP8 issues. 2015-11-16 09:10:02 +11:00
Brian May
4bd6ec8f01 Remove broken su fallback.
Was broken by passing environment variable PYTHONPATH to process. Will
fix this if there is a use case for it.
2015-11-16 09:09:02 +11:00
Brian May
ba1cf58a6c Add Python 3.5 support. 2015-11-16 09:09:01 +11:00
Brian May
e6f2395dac Fixup PEP8 issues. 2015-11-15 16:49:20 +11:00
Brian May
d4f10b232a Restructure code
* Make compatible with setuptools.
* Load modules via ssh into separate modules, not the one name space.
2015-11-15 16:45:26 +11:00
Jim Wyllie
7442eb61e9 Mass relocation of files to their own subdirectory 2014-09-15 14:14:51 +10:00
kaizoku
8636378870 Dereference symlink for sshuttle launch script
(Modified slightly by apenwarr)
2011-04-24 22:42:50 -04:00
Avery Pennarun
a62975e0ce client: workaround for idiotic ArchLinux renaming of python to python2.
First try running under python2, then python if that doesn't exist.
2011-02-07 00:18:58 -08:00
Avery Pennarun
2f3c86e962 Initial commit.
Importing options.py, ssh.py, and LICENSE from the bup project.
2010-05-01 16:15:37 -04:00