Agent: Use timeout in build_tcprelay_deps()

This commit is contained in:
Kekoa Kaaikala 2022-09-07 12:17:49 +00:00 committed by Mike Salvatore
parent 732751f007
commit 5c7c54e450
1 changed files with 3 additions and 3 deletions

View File

@ -1,14 +1,14 @@
from . import TCPConnectionHandler, TCPPipeSpawner, RelayUserHandler, RelayConnectionHandler
from ipaddress import IPv4Address
from typing import Tuple
from . import RelayConnectionHandler, RelayUserHandler, TCPConnectionHandler, TCPPipeSpawner
def build_tcprelay_deps(
local_port: int, dest_addr: IPv4Address, dest_port: int, client_disconnect_timeout: float
) -> Tuple[RelayUserHandler, TCPPipeSpawner, TCPConnectionHandler]:
# TODO: Add the timeouts
relay_user_handler = RelayUserHandler()
relay_user_handler = RelayUserHandler(client_disconnect_timeout=client_disconnect_timeout)
pipe_spawner = TCPPipeSpawner(dest_addr, dest_port)
relay_filter = RelayConnectionHandler(pipe_spawner, relay_user_handler)
connection_handler = TCPConnectionHandler(