Commit Graph

1178 Commits

Author SHA1 Message Date
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
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
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
b8160c4a37 Fix pep8 issues 2016-03-22 13:19:32 +11:00
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
dea3f21943 Write more server tests 2016-03-16 18:24:43 +11:00
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
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
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
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
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
9e3f02c199 Fix LGPL2 license. v0.77.2 2016-03-07 10:03:22 +11:00
8bdefcd10d Release 0.77.1 v0.77.1 2016-03-07 09:46:01 +11:00
29b6e8301f Update GPL2 license text
Closes #73.
2016-03-06 17:27:02 +11:00
083293ea0d Version 0.77 v0.77 2016-03-03 10:38:33 +11:00
2c07985924 Prepare documentation for release 2016-03-03 10:35:45 +11:00
756025b1bc Add date and version to docs 2016-03-03 10:30:20 +11:00
cedc8dc146 Add support for OpenBSD 2016-03-02 18:50:37 +11:00
e8047ce3a9 Fixed Python 3 issue 2016-03-02 18:38:43 +11:00
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
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
b7d37e44fb Remove legacy file 2016-03-02 12:47:45 +11:00
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
4fcf7c73da Fix regression: ensure we do bind
Closes: #68
2016-01-31 19:15:02 +11:00
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
e06f0240cb Make sure we use Python 3.5 2016-01-30 11:27:37 +11:00
517fc2c930 Remove references to number of years
Closes: #65
2016-01-21 08:42:34 +11:00
11533869a8 Fix description of excludes in Windows setup
And some subtle grammar.

Closes: #66
2016-01-21 08:38:38 +11:00
0392a779a2 Update usage documentation 2016-01-20 21:19:44 +11:00
ee26157faa Add Windows documentation
Copied from https://coderwall.com/p/adfxgw/sshuttle-on-windows

Closes #64
2016-01-20 20:55:10 +11:00
0bdfb883aa Don't distribute sshuttle/version.py
It is autogenerated.
2016-01-18 09:00:00 +11:00
ff9756f290 Release version 0.76 v0.76 2016-01-17 18:38:43 +11:00
59865269ac Update documentation
Closes #60.
2016-01-17 18:34:10 +11:00
28017303f2 Add link to documentation 2016-01-17 18:20:42 +11:00
c5af6fef8c Remove table.
Suspect it is causing sphinx to crash on readthedocs. See
https://github.com/sphinx-doc/sphinx/issues/1871
2016-01-17 18:07:52 +11:00
6835183b37 Attempt work around of sphinx bug 2016-01-17 17:58:48 +11:00
242c266e7d Move recvmsg to requirements 2016-01-17 17:58:36 +11:00
7408ab3c53 Remove coverage
Not required as we are not documenting the source code.
2016-01-17 17:24:13 +11:00
ea10ff1305 Fix broken link. 2016-01-17 16:43:25 +11:00
d9939b8460 Add changelog to documentation 2016-01-17 16:37:47 +11:00
80f363842d Add requirements.txt for readthedocs 2016-01-17 16:32:53 +11:00
262affe94f Use Sphinx for documentation
See #60
2016-01-17 16:19:13 +11:00
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
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
f59508f41b Be explicit
These files were included, however just to make sure.
2016-01-13 20:51:09 +11:00
329867a090 Move pyXAPI requirement 2016-01-13 19:34:20 +11:00
1e82571b3d Experimental: Use setuptools-scm
Closes: #58
2016-01-13 19:00:08 +11:00
aab973f12e Small grammar changes 2016-01-13 19:00:08 +11:00
d982b36521 Remove verbose debugging from example usage 2016-01-13 19:00:08 +11:00
a90877b49b Use correct rst formatting for inline monospace 2016-01-13 19:00:08 +11:00