1 parent 476b538 commit 39adbf7Copy full SHA for 39adbf7
2 files changed
pproxy/__doc__.py
@@ -1,5 +1,5 @@
1
__title__ = "pproxy"
2
-__version__ = "2.0.5"
+__version__ = "2.0.6"
3
__license__ = "MIT"
4
__description__ = "Proxy server that can tunnel among remote servers by regex rules."
5
__keywords__ = "proxy socks http shadowsocks shadowsocksr ssr redirect pf tunnel cipher ssl udp"
pproxy/server.py
@@ -303,10 +303,10 @@ def prepare_udp_connection(self, host, port, data):
303
return data
304
def start_udp_server(self, args):
305
class Protocol(asyncio.DatagramProtocol):
306
- def connection_made(self, transport):
307
- self.transport = transport
308
- def datagram_received(self, data, addr):
309
- asyncio.ensure_future(datagram_handler(self.transport, data, addr, **vars(self), **args))
+ def connection_made(prot, transport):
+ prot.transport = transport
+ def datagram_received(prot, data, addr):
+ asyncio.ensure_future(datagram_handler(prot.transport, data, addr, **vars(self), **args))
310
return asyncio.get_event_loop().create_datagram_endpoint(Protocol, local_addr=(self.host_name, self.port))
311
async def open_connection(self, host, port, local_addr, lbind):
312
if self.reuse:
0 commit comments