Commit Graph

628 Commits

Author SHA1 Message Date
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
0e52cce9d1 Fix punctuation and explain Type=notify
Added missing full stops and explain that Type=notify is needed in the
systemd service unit.
2016-10-30 10:58:03 +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
vieira
08fb3be7a0 Move pytest-runner to tests_require
As it is only required to run the tests move pytest-runner from
setup_requires to tests_require as suggested by @jonathanunderwood
on #115.
2016-10-29 12:04:22 +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
0033efca11 Merge pull request #113 from RichiH/patch-1
requirements.rst: Fix mistakes
2016-09-05 07:32:38 +10:00
Richard Hartmann
ae6e25302f requirements.rst: Fix mistakes 2016-09-04 18:54:12 +02:00
Brian May
ffd95fb776 Fix typo, space not required here 2016-09-01 18:38:13 +10:00
Brian May
acb5aa5386 Update installation instructions
Closes #111.
2016-09-01 18:37:39 +10:00
Brian May
4801ae6627 Support using run from different directory 2016-08-30 19:03:46 +10:00
Brian May
f57ad356b9 Ensure we update sshuttle/version.py in run 2016-08-30 18:52:26 +10:00
Brian May
a441a03e57 Don't print python version in run 2016-08-30 18:52:06 +10:00
Brian May
d2fdb6c029 Add CWD to PYTHONPATH in run 2016-08-30 18:51:19 +10:00
Brian May
2c20a1fd5a New release 2016-08-06 18:58:00 +10:00
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