Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pproxy for openSUSE:Factory checked in at 2021-06-09 21:53:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pproxy (Old) and /work/SRC/openSUSE:Factory/.python-pproxy.new.32437 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pproxy" Wed Jun 9 21:53:05 2021 rev:2 rq:897208 version:2.7.8 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pproxy/python-pproxy.changes 2021-02-26 21:59:20.315814874 +0100 +++ /work/SRC/openSUSE:Factory/.python-pproxy.new.32437/python-pproxy.changes 2021-06-09 21:53:26.466596554 +0200 @@ -1,0 +2,12 @@ +Thu Jun 3 09:29:40 UTC 2021 - Antonio Larrosa <alarr...@suse.com> + +- Update to v2.7.8 + * ssh reconnect +- Update to v2.7.7 + * UDP multiple jumps not working +- Update to v2.7.6 + * quic config +- Update to v2.7.5 + * quic param + +------------------------------------------------------------------- Old: ---- pproxy-2.7.4.tar.gz New: ---- pproxy-2.7.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pproxy.spec ++++++ --- /var/tmp/diff_new_pack.Qi4Tm2/_old 2021-06-09 21:53:26.874597281 +0200 +++ /var/tmp/diff_new_pack.Qi4Tm2/_new 2021-06-09 21:53:26.878597289 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-pproxy # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-pproxy -Version: 2.7.4 +Version: 2.7.8 Release: 0 Summary: Proxy server that can tunnel among remote servers by regex rules License: MIT ++++++ pproxy-2.7.4.tar.gz -> pproxy-2.7.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pproxy-2.7.4/PKG-INFO new/pproxy-2.7.8/PKG-INFO --- old/pproxy-2.7.4/PKG-INFO 2021-02-23 03:08:04.618472600 +0100 +++ new/pproxy-2.7.8/PKG-INFO 2021-05-09 05:23:25.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pproxy -Version: 2.7.4 +Version: 2.7.8 Summary: Proxy server that can tunnel among remote servers by regex rules. Home-page: https://github.com/qwj/python-proxy Author: Qian Wenjie @@ -9,7 +9,7 @@ Description: python-proxy ============ - |made-with-python| |PyPI-version| |Hit-Count| |Downloads| + |made-with-python| |PyPI-version| |Hit-Count| |Downloads| |Downloads-month| |Downloads-week| .. |made-with-python| image:: https://img.shields.io/badge/Made%20with-Python-1f425f.svg :target: https://www.python.org/ @@ -19,6 +19,10 @@ :target: https://pypi.python.org/pypi/pproxy/ .. |Downloads| image:: https://pepy.tech/badge/pproxy :target: https://pepy.tech/project/pproxy + .. |Downloads-month| image:: https://pepy.tech/badge/pproxy/month + :target: https://pepy.tech/project/pproxy + .. |Downloads-week| image:: https://pepy.tech/badge/pproxy/week + :target: https://pepy.tech/project/pproxy HTTP/HTTP2/HTTP3/Socks4/Socks5/Shadowsocks/SSH/Redirect/Pf/QUIC TCP/UDP asynchronous tunnel proxy implemented in Python3 asyncio. @@ -109,7 +113,7 @@ +-------------------+------------+------------+------------+------------+--------------+ | http v2 (connect) | ??? | ??? | | | h2:// | +-------------------+------------+------------+------------+------------+--------------+ - | http v3 (connect) | ??? | ??? | | | h3:// | + | http v3 (connect) | ??? by UDP | ??? by UDP | | | h3:// | +-------------------+------------+------------+------------+------------+--------------+ | https | ??? | ??? | | | http+ssl:// | +-------------------+------------+------------+------------+------------+--------------+ @@ -129,7 +133,7 @@ +-------------------+------------+------------+------------+------------+--------------+ | ssh tunnel | | ??? | | | ssh:// | +-------------------+------------+------------+------------+------------+--------------+ - | quic | ??? | ??? | ??? | ??? | http+quic:// | + | quic | ??? by UDP | ??? by UDP | ??? | ??? | http+quic:// | +-------------------+------------+------------+------------+------------+--------------+ | iptables nat | ??? | | | | redir:// | +-------------------+------------+------------+------------+------------+--------------+ @@ -730,16 +734,17 @@ - QUIC protocol example - QUIC is a UDP stream protocol in HTTP/3. Library **aioquic** is required if you want to proxy via QUIC. + QUIC is a UDP stream protocol used in HTTP/3. Library **aioquic** is required if you want to proxy via QUIC. + QUIC is listened on UDP port, but can handle TCP or UDP traffic. If you want to handle TCP traffic, you should use "-l quic+http" instead of "-ul quic+http". .. code:: rst $ pip3 install aioquic - $ pproxy --ssl ssl.crt,ssl.key -l quic://:1234 + $ pproxy --ssl ssl.crt,ssl.key -l quic+http://:1234 On the client: - $ pproxy -r quic://server:1234 + $ pproxy -r quic+http://server:1234 QUIC protocol can transfer a lot of TCP streams on one single UDP stream. If the connection number is hugh, QUIC can benefit by reducing TCP handshake time. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pproxy-2.7.4/README.rst new/pproxy-2.7.8/README.rst --- old/pproxy-2.7.4/README.rst 2021-02-21 05:21:32.000000000 +0100 +++ new/pproxy-2.7.8/README.rst 2021-02-24 05:56:17.000000000 +0100 @@ -1,7 +1,7 @@ python-proxy ============ -|made-with-python| |PyPI-version| |Hit-Count| |Downloads| +|made-with-python| |PyPI-version| |Hit-Count| |Downloads| |Downloads-month| |Downloads-week| .. |made-with-python| image:: https://img.shields.io/badge/Made%20with-Python-1f425f.svg :target: https://www.python.org/ @@ -11,6 +11,10 @@ :target: https://pypi.python.org/pypi/pproxy/ .. |Downloads| image:: https://pepy.tech/badge/pproxy :target: https://pepy.tech/project/pproxy +.. |Downloads-month| image:: https://pepy.tech/badge/pproxy/month + :target: https://pepy.tech/project/pproxy +.. |Downloads-week| image:: https://pepy.tech/badge/pproxy/week + :target: https://pepy.tech/project/pproxy HTTP/HTTP2/HTTP3/Socks4/Socks5/Shadowsocks/SSH/Redirect/Pf/QUIC TCP/UDP asynchronous tunnel proxy implemented in Python3 asyncio. @@ -101,7 +105,7 @@ +-------------------+------------+------------+------------+------------+--------------+ | http v2 (connect) | ??? | ??? | | | h2:// | +-------------------+------------+------------+------------+------------+--------------+ -| http v3 (connect) | ??? | ??? | | | h3:// | +| http v3 (connect) | ??? by UDP | ??? by UDP | | | h3:// | +-------------------+------------+------------+------------+------------+--------------+ | https | ??? | ??? | | | http+ssl:// | +-------------------+------------+------------+------------+------------+--------------+ @@ -121,7 +125,7 @@ +-------------------+------------+------------+------------+------------+--------------+ | ssh tunnel | | ??? | | | ssh:// | +-------------------+------------+------------+------------+------------+--------------+ -| quic | ??? | ??? | ??? | ??? | http+quic:// | +| quic | ??? by UDP | ??? by UDP | ??? | ??? | http+quic:// | +-------------------+------------+------------+------------+------------+--------------+ | iptables nat | ??? | | | | redir:// | +-------------------+------------+------------+------------+------------+--------------+ @@ -722,16 +726,17 @@ - QUIC protocol example - QUIC is a UDP stream protocol in HTTP/3. Library **aioquic** is required if you want to proxy via QUIC. + QUIC is a UDP stream protocol used in HTTP/3. Library **aioquic** is required if you want to proxy via QUIC. + QUIC is listened on UDP port, but can handle TCP or UDP traffic. If you want to handle TCP traffic, you should use "-l quic+http" instead of "-ul quic+http". .. code:: rst $ pip3 install aioquic - $ pproxy --ssl ssl.crt,ssl.key -l quic://:1234 + $ pproxy --ssl ssl.crt,ssl.key -l quic+http://:1234 On the client: - $ pproxy -r quic://server:1234 + $ pproxy -r quic+http://server:1234 QUIC protocol can transfer a lot of TCP streams on one single UDP stream. If the connection number is hugh, QUIC can benefit by reducing TCP handshake time. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pproxy-2.7.4/pproxy/cipher.py new/pproxy-2.7.8/pproxy/cipher.py --- old/pproxy-2.7.4/pproxy/cipher.py 2021-02-16 09:52:48.000000000 +0100 +++ new/pproxy-2.7.8/pproxy/cipher.py 2021-03-15 06:55:45.000000000 +0100 @@ -43,6 +43,7 @@ self._buffer = bytearray() self._declen = None self.setup() + return self @property def nonce(self): ret = self._nonce.to_bytes(self.NONCE_LENGTH, 'little') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pproxy-2.7.4/pproxy/proto.py new/pproxy-2.7.8/pproxy/proto.py --- old/pproxy-2.7.4/pproxy/proto.py 2021-02-23 03:06:55.000000000 +0100 +++ new/pproxy-2.7.8/pproxy/proto.py 2021-05-09 05:22:04.000000000 +0200 @@ -320,7 +320,7 @@ authtable.set_authed(user) if method == 'CONNECT': host_name, port = netloc_split(authority or path) - return user, host_name, port, lambda writer: reply(200, f'{ver} 200 OK\r\nConnection: close\r\n\r\n'.encode()) + return user, host_name, port, lambda writer: reply(200, f'{ver} 200 Connection established\r\nConnection: close\r\n\r\n'.encode()) else: host_name, port = netloc_split(url.netloc or host, default_port=80) newpath = url._replace(netloc='', scheme='').geturl() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pproxy-2.7.4/pproxy/server.py new/pproxy-2.7.8/pproxy/server.py --- old/pproxy-2.7.4/pproxy/server.py 2021-02-21 06:20:04.000000000 +0100 +++ new/pproxy-2.7.8/pproxy/server.py 2021-05-09 05:21:53.000000000 +0200 @@ -268,7 +268,7 @@ return self.users[0] if self.users else b'' def udp_packet_unpack(self, data): data = self.cipher.datagram.decrypt(data) if self.cipher else data - return self.rproto.udp_unpack(data) + return self.jump.udp_packet_unpack(self.rproto.udp_unpack(data)) def destination(self, host, port): return self.host_name, self.port def udp_prepare_connection(self, host, port, data): @@ -615,7 +615,7 @@ writer.get_extra_info = dict(peername=remote_addr, sockname=remote_addr).get return reader, writer async def wait_ssh_connection(self, local_addr=None, family=0, tunnel=None): - if self.sshconn is not None: + if self.sshconn is not None and not self.sshconn.cancelled(): if not self.sshconn.done(): await self.sshconn else: @@ -633,18 +633,24 @@ conn = await asyncssh.connect(host=self.host_name, port=self.port, local_addr=local_addr, family=family, x509_trusted_certs=None, known_hosts=None, username=username, password=password, client_keys=client_keys, keepalive_interval=60, tunnel=tunnel) self.sshconn.set_result(conn) async def wait_open_connection(self, host, port, local_addr, family, tunnel=None): - await self.wait_ssh_connection(local_addr, family, tunnel) - conn = self.sshconn.result() - if isinstance(self.jump, ProxySSH): - reader, writer = await self.jump.wait_open_connection(host, port, None, None, conn) - else: - host, port = self.jump.destination(host, port) - if self.jump.unix: - reader, writer = await conn.open_unix_connection(self.jump.bind) + try: + await self.wait_ssh_connection(local_addr, family, tunnel) + conn = self.sshconn.result() + if isinstance(self.jump, ProxySSH): + reader, writer = await self.jump.wait_open_connection(host, port, None, None, conn) else: - reader, writer = await conn.open_connection(host, port) - reader, writer = self.patch_stream(reader, writer, host, port) - return reader, writer + host, port = self.jump.destination(host, port) + if self.jump.unix: + reader, writer = await conn.open_unix_connection(self.jump.bind) + else: + reader, writer = await conn.open_connection(host, port) + reader, writer = self.patch_stream(reader, writer, host, port) + return reader, writer + except Exception as ex: + if not self.sshconn.done(): + self.sshconn.set_exception(ex) + self.sshconn = None + raise async def start_server(self, args, stream_handler=stream_handler, tunnel=None): if type(self.jump) is ProxyDirect: raise Exception('ssh server mode unsupported') @@ -776,8 +782,8 @@ import ssl, aioquic.quic.configuration except Exception: raise Exception('Missing library: "pip3 install aioquic"') - quicserver = aioquic.quic.configuration.QuicConfiguration(is_client=False, max_stream_data=2**30, max_data=2**30) - quicclient = aioquic.quic.configuration.QuicConfiguration(max_stream_data=2**30, max_data=2**30) + quicserver = aioquic.quic.configuration.QuicConfiguration(is_client=False, max_stream_data=2**60, max_data=2**60, idle_timeout=SOCKET_TIMEOUT) + quicclient = aioquic.quic.configuration.QuicConfiguration(max_stream_data=2**60, max_data=2**60, idle_timeout=SOCKET_TIMEOUT*5) quicclient.verify_mode = ssl.CERT_NONE sslcontexts.append(quicserver) sslcontexts.append(quicclient) @@ -874,7 +880,7 @@ print(body.decode('utf8', 'ignore')) print(f'============ success ============') -def main(): +def main(args = None): parser = argparse.ArgumentParser(description=__description__+'\nSupported protocols: http,socks4,socks5,shadowsocks,shadowsocksr,redirect,pf,tunnel', epilog=f'Online help: <{__url__}>') parser.add_argument('-l', dest='listen', default=[], action='append', type=proxies_by_uri, help='tcp server uri (default: http+socks4+socks5://:8080/)') parser.add_argument('-r', dest='rserver', default=[], action='append', type=proxies_by_uri, help='tcp remote server uri (default: direct)') @@ -894,7 +900,7 @@ parser.add_argument('--daemon', dest='daemon', action='store_true', help='run as a daemon (Linux only)') parser.add_argument('--test', help='test this url for all remote proxies and exit') parser.add_argument('--version', action='version', version=f'%(prog)s {__version__}') - args = parser.parse_args() + args = parser.parse_args(args) if args.sslfile: sslfile = args.sslfile.split(',') for context in sslcontexts: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pproxy-2.7.4/pproxy.egg-info/PKG-INFO new/pproxy-2.7.8/pproxy.egg-info/PKG-INFO --- old/pproxy-2.7.4/pproxy.egg-info/PKG-INFO 2021-02-23 03:08:04.000000000 +0100 +++ new/pproxy-2.7.8/pproxy.egg-info/PKG-INFO 2021-05-09 05:23:24.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pproxy -Version: 2.7.4 +Version: 2.7.8 Summary: Proxy server that can tunnel among remote servers by regex rules. Home-page: https://github.com/qwj/python-proxy Author: Qian Wenjie @@ -9,7 +9,7 @@ Description: python-proxy ============ - |made-with-python| |PyPI-version| |Hit-Count| |Downloads| + |made-with-python| |PyPI-version| |Hit-Count| |Downloads| |Downloads-month| |Downloads-week| .. |made-with-python| image:: https://img.shields.io/badge/Made%20with-Python-1f425f.svg :target: https://www.python.org/ @@ -19,6 +19,10 @@ :target: https://pypi.python.org/pypi/pproxy/ .. |Downloads| image:: https://pepy.tech/badge/pproxy :target: https://pepy.tech/project/pproxy + .. |Downloads-month| image:: https://pepy.tech/badge/pproxy/month + :target: https://pepy.tech/project/pproxy + .. |Downloads-week| image:: https://pepy.tech/badge/pproxy/week + :target: https://pepy.tech/project/pproxy HTTP/HTTP2/HTTP3/Socks4/Socks5/Shadowsocks/SSH/Redirect/Pf/QUIC TCP/UDP asynchronous tunnel proxy implemented in Python3 asyncio. @@ -109,7 +113,7 @@ +-------------------+------------+------------+------------+------------+--------------+ | http v2 (connect) | ??? | ??? | | | h2:// | +-------------------+------------+------------+------------+------------+--------------+ - | http v3 (connect) | ??? | ??? | | | h3:// | + | http v3 (connect) | ??? by UDP | ??? by UDP | | | h3:// | +-------------------+------------+------------+------------+------------+--------------+ | https | ??? | ??? | | | http+ssl:// | +-------------------+------------+------------+------------+------------+--------------+ @@ -129,7 +133,7 @@ +-------------------+------------+------------+------------+------------+--------------+ | ssh tunnel | | ??? | | | ssh:// | +-------------------+------------+------------+------------+------------+--------------+ - | quic | ??? | ??? | ??? | ??? | http+quic:// | + | quic | ??? by UDP | ??? by UDP | ??? | ??? | http+quic:// | +-------------------+------------+------------+------------+------------+--------------+ | iptables nat | ??? | | | | redir:// | +-------------------+------------+------------+------------+------------+--------------+ @@ -730,16 +734,17 @@ - QUIC protocol example - QUIC is a UDP stream protocol in HTTP/3. Library **aioquic** is required if you want to proxy via QUIC. + QUIC is a UDP stream protocol used in HTTP/3. Library **aioquic** is required if you want to proxy via QUIC. + QUIC is listened on UDP port, but can handle TCP or UDP traffic. If you want to handle TCP traffic, you should use "-l quic+http" instead of "-ul quic+http". .. code:: rst $ pip3 install aioquic - $ pproxy --ssl ssl.crt,ssl.key -l quic://:1234 + $ pproxy --ssl ssl.crt,ssl.key -l quic+http://:1234 On the client: - $ pproxy -r quic://server:1234 + $ pproxy -r quic+http://server:1234 QUIC protocol can transfer a lot of TCP streams on one single UDP stream. If the connection number is hugh, QUIC can benefit by reducing TCP handshake time.