Skip to content

Compatible with Python 3.11 #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions pproxy/proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,12 +616,21 @@ def abort(self):
self.close()
ssl.connection_made(Transport())
async def channel():
read_size=65536
buffer=None
if hasattr(ssl,'get_buffer'):
buffer=ssl.get_buffer(read_size)
try:
while not reader.at_eof() and not ssl._app_transport._closed:
data = await reader.read(65536)
data = await reader.read(read_size)
if not data:
break
ssl.data_received(data)
if buffer!=None:
data_len=len(data)
buffer[:data_len]=data
ssl.buffer_updated(data_len)
else:
ssl.data_received(data)
except Exception:
pass
finally:
Expand Down