File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11__title__ = "pproxy"
2- __version__ = "1.9.8 "
2+ __version__ = "1.9.9 "
33__license__ = "MIT"
44__description__ = "Proxy server that can tunnel among remote servers by regex rules."
55__keywords__ = "proxy socks http shadowsocks shadowsocksr ssr redirect pf tunnel cipher ssl udp"
Original file line number Diff line number Diff line change 44
55SOCKET_TIMEOUT = 300
66PACKET_SIZE = 65536
7- UDP_LIMIT = 150
7+ UDP_LIMIT = 30
88DUMMY = lambda s : s
99
1010asyncio .StreamReader .read_ = lambda self : self .read (PACKET_SIZE )
@@ -239,7 +239,9 @@ def connection_lost(prot, exc):
239239 self .connection_change (1 )
240240 if len (self .udpmap ) > UDP_LIMIT :
241241 min_addr = min (self .udpmap , key = lambda x : self .udpmap [x ].update )
242- self .udpmap .pop (min_addr ).transport .close ()
242+ prot = self .udpmap .pop (min_addr )
243+ if prot .transport :
244+ prot .transport .close ()
243245 prot = Protocol (data )
244246 remote_addr = (host , port ) if self .direct else (self .host_name , self .port )
245247 await asyncio .get_event_loop ().create_datagram_endpoint (lambda : prot , remote_addr = remote_addr )
You can’t perform that action at this time.
0 commit comments