From 74bfdf8ed5498d4c49ae4746ad052c186f76acbf Mon Sep 17 00:00:00 2001 From: retoor Date: Tue, 10 Dec 2024 13:13:33 +0000 Subject: [PATCH] Made buffer smaller. --- src/shadowssh/__main__.py | 2 +- src/shadowssh/app.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shadowssh/__main__.py b/src/shadowssh/__main__.py index d38054c..b9186fd 100644 --- a/src/shadowssh/__main__.py +++ b/src/shadowssh/__main__.py @@ -12,7 +12,7 @@ def parse_args(): parser.add_argument("--host-service", type=str, required=False, default="127.0.0.1") parser.add_argument("--port-service", type=int, required=False, default=4433) parser.add_argument("--host-ssh", type=str, required=False, default="127.0.0.1") - parser.add_argument("--port-ssh", type=int, required=False, default=22) + parser.add_argument("--port-ssh", type=int, required=False, default=222) return parser.parse_args() diff --git a/src/shadowssh/app.py b/src/shadowssh/app.py index bfbcc2c..ed2e2ae 100644 --- a/src/shadowssh/app.py +++ b/src/shadowssh/app.py @@ -29,7 +29,7 @@ class Application(BaseApplication): async def stream(self, reader, writer, port): while True: - chunk = await reader.read(4096) + chunk = await reader.read(64) if not chunk: writer.close() log.info("Forward connection closed.")