Commit Graph

1107 Commits

Author SHA1 Message Date
Brian May
915f72de35 Add changes for next release 2016-08-06 18:52:26 +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
Brian May
22b1b54bfd Add pytest-runner support 2016-07-10 11:26:32 +10: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
Huiqiang Liu
5d28ce8272 Merge pull request #1 from vieira/patch-1
Add <forward_subnets> to divert rule in OpenBSD
2016-06-17 08:25:59 +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
e73e797f33 Update files list 2016-04-30 18:05:47 +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
74e308a29f Don't mix tab and spaces in shell script
Sometime ago I was in python mode and incorrectly indented a line of the
shell script with spaces instead of tabs. Shame on me. This should bring
things back to their natural order.
2016-04-20 15:17:07 +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
Brian May
89c5b57019 Attempt readthedocs workaround
readthedocs alters docs/conf.py which in turn means python_scm detects a
version and incorrectly adjusts the version number. Here we try to work
around this problem.

We do this by renaming the docs/conf.py file and copying it back to
docs/conf.py when setup.py is invoked. This way, hopefully, scm won't
see the changes to docs/conf.py

References:
http://stackoverflow.com/questions/35811267/readthedocs-and-setuptools-scm-version-wrong/36386177
https://github.com/pypa/setuptools_scm/issues/84
2016-04-18 11:44:05 +10:00
Brian May
a8b288338b Release version 0.78.0 2016-04-08 12:01:37 +10:00
Brian May
6fd02933dd Revert "Test for RTD"
This reverts commit 7ea2d973c7.
2016-04-08 12:00:45 +10:00
Brian May
7ea2d973c7 Test for RTD 2016-04-06 11:28:41 +10:00
Brian May
8ec5d1a5ac Update changes
In preparation for new release.
2016-04-05 21:14:50 +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
vieira
efdb9b8f94 If 3.5 not available, try to fallback to 2.7
In situations where 2.7 is available and some unsupported 3.x is the
system's default we should probably fallback to 2.7 instead of the
default (that might be e.g. 3.4). This might fix #78.
2016-03-16 16:16:53 +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
Brian May
9e3f02c199 Fix LGPL2 license. 2016-03-07 10:03:22 +11:00
Brian May
8bdefcd10d Release 0.77.1 2016-03-07 09:46:01 +11:00
Brian May
29b6e8301f Update GPL2 license text
Closes #73.
2016-03-06 17:27:02 +11:00
Brian May
083293ea0d Version 0.77 2016-03-03 10:38:33 +11:00
Brian May
2c07985924 Prepare documentation for release 2016-03-03 10:35:45 +11:00
Brian May
756025b1bc Add date and version to docs 2016-03-03 10:30:20 +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