forked from shaba/openuds
Fixed Complains about curio "runtime" types
This commit is contained in:
parent
265d4f5103
commit
cdca39779b
2
tunnel-server/.env
Normal file
2
tunnel-server/.env
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
PYTHONPATH=./src:${PYTHONPATH}
|
||||||
|
|
@ -117,7 +117,7 @@ async def tunnel_proc_async(
|
|||||||
tunneler = proxy.Proxy(cfg, ns)
|
tunneler = proxy.Proxy(cfg, ns)
|
||||||
|
|
||||||
# Generate SSL context
|
# Generate SSL context
|
||||||
context = curio.ssl.SSLContext(curio.ssl.PROTOCOL_TLS_SERVER)
|
context = curio.ssl.SSLContext(curio.ssl.PROTOCOL_TLS_SERVER) # type: ignore
|
||||||
context.load_cert_chain(cfg.ssl_certificate, cfg.ssl_certificate_key)
|
context.load_cert_chain(cfg.ssl_certificate, cfg.ssl_certificate_key)
|
||||||
|
|
||||||
if cfg.ssl_ciphers:
|
if cfg.ssl_ciphers:
|
||||||
@ -136,7 +136,7 @@ async def tunnel_proc_async(
|
|||||||
f'CONNECTION from {address!r} (pid: {os.getpid()})'
|
f'CONNECTION from {address!r} (pid: {os.getpid()})'
|
||||||
)
|
)
|
||||||
sock = await context.wrap_socket(
|
sock = await context.wrap_socket(
|
||||||
curio.io.Socket(sock), server_side=True
|
curio.io.Socket(sock), server_side=True # type: ignore
|
||||||
)
|
)
|
||||||
await group.spawn(tunneler, sock, address)
|
await group.spawn(tunneler, sock, address)
|
||||||
del sock
|
del sock
|
||||||
|
Loading…
Reference in New Issue
Block a user