SimpleSallap:SimpleProxy:use RequestHandler's setup after ssl hs

Instead of manually setting up rfile and wfile after switching to
ssl mode wrt a client request, now use the builtin setup provided
by the RequestHandler logic, so that these and any other needed
things will be setup as needed after the ssl hs based new socket,
just in case new things are needed in future.
This commit is contained in:
hanishkvc 2025-12-05 22:28:55 +05:30
parent d470d7e47d
commit a52ac5ddde
1 changed files with 3 additions and 2 deletions

View File

@ -161,8 +161,9 @@ class ProxyHandler(http.server.BaseHTTPRequestHandler):
try:
if (gMe.op.sslContext):
self.request = gMe.op.sslContext.wrap_socket(self.request, server_side=True)
self.rfile = self.request.makefile('rb', self.rbufsize)
self.wfile = self.request.makefile('wb', self.wbufsize)
self.setup()
#self.rfile = self.request.makefile('rb', self.rbufsize)
#self.wfile = self.request.makefile('wb', self.wbufsize)
except:
print(f"ERRR:ProxyHandler:SSLHS:{traceback.format_exception_only(sys.exception())}")
return