Hello community,

here is the log from the commit of package sshuttle for openSUSE:Factory 
checked in at 2020-11-10 13:39:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sshuttle (Old)
 and      /work/SRC/openSUSE:Factory/.sshuttle.new.11331 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sshuttle"

Tue Nov 10 13:39:55 2020 rev:7 rq:845613 version:1.0.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/sshuttle/sshuttle.changes        2020-08-10 
15:04:20.860201627 +0200
+++ /work/SRC/openSUSE:Factory/.sshuttle.new.11331/sshuttle.changes     
2020-11-10 13:45:11.619789171 +0100
@@ -1,0 +2,13 @@
+Wed Oct 28 10:07:54 UTC 2020 - Michael Ströder <[email protected]>
+
+- Update to 1.0.4:
+  * Allow Mux() flush/fill to work with python < 3.5
+  * Fix parse_hostport to always return string for host.
+  * Require -r/--remote parameter.
+  * Add missing package in OpenWRT documentation.
+  * Fix doc about --listen option.
+  * README: add Ubuntu.
+  * Increase IP4 ttl to 63 hops instead of 42.
+  * Fix formatting in installation.rst
+
+-------------------------------------------------------------------

Old:
----
  sshuttle-1.0.3.tar.gz

New:
----
  sshuttle-1.0.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sshuttle.spec ++++++
--- /var/tmp/diff_new_pack.ugW2p3/_old  2020-11-10 13:45:13.083786262 +0100
+++ /var/tmp/diff_new_pack.ugW2p3/_new  2020-11-10 13:45:13.087786254 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           sshuttle
-Version:        1.0.3
+Version:        1.0.4
 Release:        0
 Summary:        VPN over an SSH tunnel
 License:        LGPL-2.1-only

++++++ sshuttle-1.0.3.tar.gz -> sshuttle-1.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/CHANGES.rst 
new/sshuttle-1.0.4/CHANGES.rst
--- old/sshuttle-1.0.3/CHANGES.rst      2020-07-12 11:09:09.000000000 +0200
+++ new/sshuttle-1.0.4/CHANGES.rst      2020-08-24 00:00:36.000000000 +0200
@@ -9,6 +9,21 @@
 .. _`Semantic Versioning`: http://semver.org/
 
 
+1.0.3 - 2020-08-24
+------------------
+
+Fixed
+~~~~~
+* Allow Mux() flush/fill to work with python < 3.5
+* Fix parse_hostport to always return string for host.
+* Require -r/--remote parameter.
+* Add missing package in OpenWRT documentation.
+* Fix doc about --listen option.
+* README: add Ubuntu.
+* Increase IP4 ttl to 63 hops instead of 42.
+* Fix formatting in installation.rst
+
+
 1.0.3 - 2020-07-12
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/PKG-INFO new/sshuttle-1.0.4/PKG-INFO
--- old/sshuttle-1.0.3/PKG-INFO 2020-07-12 11:10:36.000000000 +0200
+++ new/sshuttle-1.0.4/PKG-INFO 2020-08-24 00:06:45.025690600 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: sshuttle
-Version: 1.0.3
+Version: 1.0.4
 Summary: Full-featured" VPN over an SSH tunnel
 Home-page: https://github.com/sshuttle/sshuttle
 Author: Brian May
@@ -38,6 +38,10 @@
         Obtaining sshuttle
         ------------------
         
+        - Ubuntu 16.04 or later::
+        
+              apt-get install sshuttle
+        
         - Debian stretch or later::
         
               apt-get install sshuttle
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/README.rst 
new/sshuttle-1.0.4/README.rst
--- old/sshuttle-1.0.3/README.rst       2020-06-05 00:18:27.000000000 +0200
+++ new/sshuttle-1.0.4/README.rst       2020-08-13 00:01:33.000000000 +0200
@@ -30,6 +30,10 @@
 Obtaining sshuttle
 ------------------
 
+- Ubuntu 16.04 or later::
+
+      apt-get install sshuttle
+
 - Debian stretch or later::
 
       apt-get install sshuttle
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/docs/installation.rst 
new/sshuttle-1.0.4/docs/installation.rst
--- old/sshuttle-1.0.3/docs/installation.rst    2019-12-12 22:16:46.000000000 
+0100
+++ new/sshuttle-1.0.4/docs/installation.rst    2020-08-13 00:01:33.000000000 
+0200
@@ -6,7 +6,8 @@
       pip install sshuttle
 
 - Debain package manager::
-               sudo apt install sshuttle
+
+      sudo apt install sshuttle
 
 - Clone::
 
@@ -18,5 +19,6 @@
 Optionally after installation
 -----------------------------
 
-- Add to sudoers file
-               sshuttle --sudoers
+- Add to sudoers file::
+
+      sshuttle --sudoers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/docs/manpage.rst 
new/sshuttle-1.0.4/docs/manpage.rst
--- old/sshuttle-1.0.3/docs/manpage.rst 2020-06-17 23:33:19.000000000 +0200
+++ new/sshuttle-1.0.4/docs/manpage.rst 2020-08-13 00:01:33.000000000 +0200
@@ -65,7 +65,8 @@
     :program:`sshuttle`, e.g. ``--listen localhost``.
 
     For the tproxy and pf methods this can be an IPv6 address. Use this option 
-    twice if required, to provide both IPv4 and IPv6 addresses.
+    with comma separated values if required, to provide both IPv4 and IPv6
+    addresses, e.g. ``--listen 127.0.0.1:0,[::1]:0``.
 
 .. option:: -H, --auto-hosts
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/docs/openwrt.rst 
new/sshuttle-1.0.4/docs/openwrt.rst
--- old/sshuttle-1.0.3/docs/openwrt.rst 2020-02-09 09:44:12.000000000 +0100
+++ new/sshuttle-1.0.4/docs/openwrt.rst 2020-08-13 00:01:33.000000000 +0200
@@ -3,6 +3,6 @@
 
 Run::
 
-    opkg install python3 python3-pip iptables-mod-nat-extra iptables-mod-ipopt
+    opkg install python3 python3-pip iptables-mod-extra iptables-mod-nat-extra 
iptables-mod-ipopt
     python3 /usr/bin/pip3 install sshuttle
     sshuttle -l 0.0.0.0 -r <IP> -x 192.168.1.1 0/0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/requirements-tests.txt 
new/sshuttle-1.0.4/requirements-tests.txt
--- old/sshuttle-1.0.3/requirements-tests.txt   2020-06-17 23:33:19.000000000 
+0200
+++ new/sshuttle-1.0.4/requirements-tests.txt   2020-08-24 00:00:36.000000000 
+0200
@@ -1,7 +1,7 @@
 -r requirements.txt
-attrs==19.3.0
-pytest==5.4.3
-pytest-cov==2.10.0
+attrs==20.1.0
+pytest==6.0.1
+pytest-cov==2.10.1
 mock==2.0.0
 flake8==3.8.3
 pyflakes==2.2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/sshuttle/client.py 
new/sshuttle-1.0.4/sshuttle/client.py
--- old/sshuttle-1.0.3/sshuttle/client.py       2020-06-04 23:43:00.000000000 
+0200
+++ new/sshuttle-1.0.4/sshuttle/client.py       2020-08-19 01:12:03.000000000 
+0200
@@ -557,6 +557,11 @@
          subnets_include, subnets_exclude, daemon, to_nameserver, pidfile,
          user, sudo_pythonpath):
 
+    if not remotename:
+        # XXX: We can't make it required at the argparse level,
+        #      because sshuttle calls out to itself in FirewallClient.
+        raise Fatal("You must specify -r/--remote.")
+
     if daemon:
         try:
             check_daemon(pidfile)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/sshuttle/linux.py 
new/sshuttle-1.0.4/sshuttle/linux.py
--- old/sshuttle-1.0.3/sshuttle/linux.py        2020-02-09 09:44:12.000000000 
+0100
+++ new/sshuttle-1.0.4/sshuttle/linux.py        2020-08-13 00:01:33.000000000 
+0200
@@ -71,10 +71,10 @@
     global _no_ttl_module
     if not _no_ttl_module:
         # we avoid infinite loops by generating server-side connections
-        # with ttl 42.  This makes the client side not recapture those
+        # with ttl 63.  This makes the client side not recapture those
         # connections, in case client == server.
         try:
-            argsplus = list(args) + ['-m', 'ttl', '!', '--ttl', '42']
+            argsplus = list(args) + ['-m', 'ttl', '!', '--ttl', '63']
             ipt(family, *argsplus)
         except Fatal:
             ipt(family, *args)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/sshuttle/methods/ipfw.py 
new/sshuttle-1.0.4/sshuttle/methods/ipfw.py
--- old/sshuttle-1.0.3/sshuttle/methods/ipfw.py 2019-12-12 22:16:39.000000000 
+0100
+++ new/sshuttle-1.0.4/sshuttle/methods/ipfw.py 2020-08-13 00:01:33.000000000 
+0200
@@ -70,7 +70,7 @@
     found = False
     for line in p.stdout:
         if line.startswith(b'%05d ' % n):
-            if not ('ipttl 42' in line or 'check-state' in line):
+            if not ('ipttl 63' in line or 'check-state' in line):
                 log('non-sshuttle ipfw rule: %r\n' % line.strip())
                 raise Fatal('non-sshuttle ipfw rule #%d already exists!' % n)
             found = True
@@ -185,7 +185,7 @@
         sender.setsockopt(socket.SOL_IP, IP_BINDANY, 1)
         sender.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
         sender.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
-        sender.setsockopt(socket.SOL_IP, socket.IP_TTL, 42)
+        sender.setsockopt(socket.SOL_IP, socket.IP_TTL, 63)
         sender.bind(srcip)
         sender.sendto(data, dstip)
         sender.close()
@@ -224,7 +224,7 @@
         ipfw('add', '1', 'fwd', '127.0.0.1,%d' % port,
              'tcp',
              'from', 'any', 'to', 'table(126)',
-             'not', 'ipttl', '42', 'keep-state', 'setup')
+             'not', 'ipttl', '63', 'keep-state', 'setup')
 
         ipfw_noexit('table', '124', 'flush')
         dnscount = 0
@@ -235,11 +235,11 @@
             ipfw('add', '1', 'fwd', '127.0.0.1,%d' % dnsport,
                  'udp',
                  'from', 'any', 'to', 'table(124)',
-                 'not', 'ipttl', '42')
+                 'not', 'ipttl', '63')
         ipfw('add', '1', 'allow',
              'udp',
              'from', 'any', 'to', 'any',
-             'ipttl', '42')
+             'ipttl', '63')
 
         if subnets:
             # create new subnet entries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/sshuttle/methods/nft.py 
new/sshuttle-1.0.4/sshuttle/methods/nft.py
--- old/sshuttle-1.0.3/sshuttle/methods/nft.py  2020-02-09 09:44:12.000000000 
+0100
+++ new/sshuttle-1.0.4/sshuttle/methods/nft.py  2020-08-13 00:01:33.000000000 
+0200
@@ -50,17 +50,17 @@
                      'ip daddr %s/%s' % (snet, swidth), 'return')))
             else:
                 _nft('add rule', chain, *(tcp_ports + (
-                     'ip daddr %s/%s' % (snet, swidth), 'ip ttl != 42',
+                     'ip daddr %s/%s' % (snet, swidth), 'ip ttl != 63',
                      ('redirect to :' + str(port)))))
 
         for _, ip in [i for i in nslist if i[0] == family]:
             if family == socket.AF_INET:
                 _nft('add rule', chain, 'ip protocol udp ip daddr %s' % ip,
-                     'udp dport { 53 }', 'ip ttl != 42',
+                     'udp dport { 53 }', 'ip ttl != 63',
                      ('redirect to :' + str(dnsport)))
             elif family == socket.AF_INET6:
                 _nft('add rule', chain, 'ip6 protocol udp ip6 daddr %s' % ip,
-                     'udp dport { 53 }', 'ip ttl != 42',
+                     'udp dport { 53 }', 'ip ttl != 63',
                      ('redirect to :' + str(dnsport)))
 
     def restore_firewall(self, port, family, udp, user):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/sshuttle/server.py 
new/sshuttle-1.0.4/sshuttle/server.py
--- old/sshuttle-1.0.3/sshuttle/server.py       2020-06-04 23:43:00.000000000 
+0200
+++ new/sshuttle-1.0.4/sshuttle/server.py       2020-08-13 00:01:33.000000000 
+0200
@@ -195,7 +195,7 @@
 
         family, sockaddr = self._addrinfo(peer, port)
         sock = socket.socket(family, socket.SOCK_DGRAM)
-        sock.setsockopt(socket.SOL_IP, socket.IP_TTL, 42)
+        sock.setsockopt(socket.SOL_IP, socket.IP_TTL, 63)
         sock.connect(sockaddr)
 
         self.peers[sock] = peer
@@ -252,7 +252,7 @@
         self.chan = chan
         self.sock = sock
         if family == socket.AF_INET:
-            self.sock.setsockopt(socket.SOL_IP, socket.IP_TTL, 42)
+            self.sock.setsockopt(socket.SOL_IP, socket.IP_TTL, 63)
 
     def send(self, dstip, data):
         debug2('UDP: sending to %r port %d\n' % dstip)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/sshuttle/ssh.py 
new/sshuttle-1.0.4/sshuttle/ssh.py
--- old/sshuttle-1.0.3/sshuttle/ssh.py  2020-07-12 11:06:37.000000000 +0200
+++ new/sshuttle-1.0.4/sshuttle/ssh.py  2020-08-13 00:01:33.000000000 +0200
@@ -65,12 +65,12 @@
         try:
             # try to parse host as an IP adress,
             # if that works it is an IPv6 address
-            host = ipaddress.ip_address(host)
+            host = str(ipaddress.ip_address(host))
         except ValueError:
             # if that fails parse as URL to get the port
             parsed = urlparse('//{}'.format(host))
             try:
-                host = ipaddress.ip_address(parsed.hostname)
+                host = str(ipaddress.ip_address(parsed.hostname))
             except ValueError:
                 # else if both fails, we have a hostname with port
                 host = parsed.hostname
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/sshuttle/ssnet.py 
new/sshuttle-1.0.4/sshuttle/ssnet.py
--- old/sshuttle-1.0.3/sshuttle/ssnet.py        2020-06-17 23:33:19.000000000 
+0200
+++ new/sshuttle-1.0.4/sshuttle/ssnet.py        2020-08-19 00:13:12.000000000 
+0200
@@ -4,6 +4,7 @@
 import errno
 import select
 import os
+import fcntl
 
 from sshuttle.helpers import b, log, debug1, debug2, debug3, Fatal
 
@@ -436,7 +437,13 @@
                 callback(cmd, data)
 
     def flush(self):
-        os.set_blocking(self.wfile.fileno(), False)
+        try:
+            os.set_blocking(self.wfile.fileno(), False)
+        except AttributeError:
+            # python < 3.5
+            flags = fcntl.fcntl(self.wfile.fileno(), fcntl.F_GETFL)
+            flags |= os.O_NONBLOCK
+            flags = fcntl.fcntl(self.wfile.fileno(), fcntl.F_SETFL, flags)
         if self.outbuf and self.outbuf[0]:
             wrote = _nb_clean(os.write, self.wfile.fileno(), self.outbuf[0])
             debug2('mux wrote: %r/%d\n' % (wrote, len(self.outbuf[0])))
@@ -446,7 +453,13 @@
             self.outbuf[0:1] = []
 
     def fill(self):
-        os.set_blocking(self.rfile.fileno(), False)
+        try:
+            os.set_blocking(self.rfile.fileno(), False)
+        except AttributeError:
+            # python < 3.5
+            flags = fcntl.fcntl(self.rfile.fileno(), fcntl.F_GETFL)
+            flags |= os.O_NONBLOCK
+            flags = fcntl.fcntl(self.rfile.fileno(), fcntl.F_SETFL, flags)
         try:
             read = _nb_clean(os.read, self.rfile.fileno(), LATENCY_BUFFER_SIZE)
         except OSError:
@@ -570,7 +583,7 @@
 def connect_dst(family, ip, port):
     debug2('Connecting to %s:%d\n' % (ip, port))
     outsock = socket.socket(family)
-    outsock.setsockopt(socket.SOL_IP, socket.IP_TTL, 42)
+    outsock.setsockopt(socket.SOL_IP, socket.IP_TTL, 63)
     return SockWrapper(outsock, outsock,
                        connect_to=(ip, port),
                        peername='%s:%d' % (ip, port))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/sshuttle/version.py 
new/sshuttle-1.0.4/sshuttle/version.py
--- old/sshuttle-1.0.3/sshuttle/version.py      2020-07-12 11:10:36.000000000 
+0200
+++ new/sshuttle-1.0.4/sshuttle/version.py      2020-08-24 00:06:44.000000000 
+0200
@@ -1,4 +1,4 @@
 # coding: utf-8
 # file generated by setuptools_scm
 # don't change, don't track in version control
-version = '1.0.3'
+version = '1.0.4'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/sshuttle.egg-info/PKG-INFO 
new/sshuttle-1.0.4/sshuttle.egg-info/PKG-INFO
--- old/sshuttle-1.0.3/sshuttle.egg-info/PKG-INFO       2020-07-12 
11:10:36.000000000 +0200
+++ new/sshuttle-1.0.4/sshuttle.egg-info/PKG-INFO       2020-08-24 
00:06:44.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: sshuttle
-Version: 1.0.3
+Version: 1.0.4
 Summary: Full-featured" VPN over an SSH tunnel
 Home-page: https://github.com/sshuttle/sshuttle
 Author: Brian May
@@ -38,6 +38,10 @@
         Obtaining sshuttle
         ------------------
         
+        - Ubuntu 16.04 or later::
+        
+              apt-get install sshuttle
+        
         - Debian stretch or later::
         
               apt-get install sshuttle
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/sshuttle.egg-info/SOURCES.txt 
new/sshuttle-1.0.4/sshuttle.egg-info/SOURCES.txt
--- old/sshuttle-1.0.3/sshuttle.egg-info/SOURCES.txt    2020-07-12 
11:10:36.000000000 +0200
+++ new/sshuttle-1.0.4/sshuttle.egg-info/SOURCES.txt    2020-08-24 
00:06:45.000000000 +0200
@@ -67,4 +67,5 @@
 tests/client/test_methods_tproxy.py
 tests/client/test_options.py
 tests/client/test_sdnotify.py
-tests/server/test_server.py
\ No newline at end of file
+tests/server/test_server.py
+tests/ssh/test_parse_hostport.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sshuttle-1.0.3/tests/ssh/test_parse_hostport.py 
new/sshuttle-1.0.4/tests/ssh/test_parse_hostport.py
--- old/sshuttle-1.0.3/tests/ssh/test_parse_hostport.py 1970-01-01 
01:00:00.000000000 +0100
+++ new/sshuttle-1.0.4/tests/ssh/test_parse_hostport.py 2020-08-13 
00:01:33.000000000 +0200
@@ -0,0 +1,20 @@
+from sshuttle.ssh import parse_hostport
+
+
+def test_host_only():
+    assert parse_hostport("host") == (None, None, None, "host")
+    assert parse_hostport("1.2.3.4") == (None, None, None, "1.2.3.4")
+    assert parse_hostport("2001::1") == (None, None, None, "2001::1")
+    assert parse_hostport("[2001::1]") == (None, None, None, "2001::1")
+
+
+def test_host_and_port():
+    assert parse_hostport("host:22") == (None, None, 22, "host")
+    assert parse_hostport("1.2.3.4:22") == (None, None, 22, "1.2.3.4")
+    assert parse_hostport("[2001::1]:22") == (None, None, 22, "2001::1")
+
+
+def test_username_and_host():
+    assert parse_hostport("user@host") == ("user", None, None, "host")
+    assert parse_hostport("user:@host") == ("user", None, None, "host")
+    assert parse_hostport("user:pass@host") == ("user", "pass", None, "host")


Reply via email to