penguin/tinyproxy

An L4 proxy designed to act as a tiny transparent shim

commit 6eaad830b0fa68056ba16bfe59bf9ab0efecf185

author斟酌 鵬兄 <tgckpg@gmail.com>
date2026-05-28T13:59:23Z
subjectFixed tests
commit 6eaad830b0fa68056ba16bfe59bf9ab0efecf185
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2026-05-28T13:59:23Z

    Fixed tests
---
 tests/test_tcp_keep_alive.py   | 7 ++++---
 tests/test_udp_idle_timeout.py | 4 ++--
 tests/test_udp_proxy_v2.py     | 4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tests/test_tcp_keep_alive.py b/tests/test_tcp_keep_alive.py
index ddffc7f..35678e4 100644
--- a/tests/test_tcp_keep_alive.py
+++ b/tests/test_tcp_keep_alive.py
@@ -118,9 +118,10 @@ async def test_tcp_keep_alive_sets_socket_option() -> None:
 		raise SkipTest("TINYPROXY_BIN is not set")
 
 	conf_text = (
-		f"{LISTEN_HOST}:{PROXY_PORT} "
-		f"{LISTEN_HOST}:{BACKEND_PORT} "
-		f"tcp keep_alive,idle_timeout=5\n"
+		f"listen"
+		f" tcp {LISTEN_HOST}:{PROXY_PORT}"
+		f" tcp {LISTEN_HOST}:{BACKEND_PORT}"
+		f" keep_alive,idle_timeout=5\n"
 	)
 
 	backend_server = await asyncio.start_server(
diff --git a/tests/test_udp_idle_timeout.py b/tests/test_udp_idle_timeout.py
index 12d23b4..59d517c 100644
--- a/tests/test_udp_idle_timeout.py
+++ b/tests/test_udp_idle_timeout.py
@@ -48,8 +48,8 @@ async def test_udp_idle_timeout_expires_client_but_route_still_works() -> None:
 
 	conf_text = (
 		f"listen"
-		f" udp {LISTEN_HOST}:{PROXY_PORT} "
-		f" udp {LISTEN_HOST}:{BACKEND_PORT} "
+		f" udp {LISTEN_HOST}:{PROXY_PORT}"
+		f" udp {LISTEN_HOST}:{BACKEND_PORT}"
 		f" idle_timeout=1\n"
 	)
 
diff --git a/tests/test_udp_proxy_v2.py b/tests/test_udp_proxy_v2.py
index 2426189..928bd69 100644
--- a/tests/test_udp_proxy_v2.py
+++ b/tests/test_udp_proxy_v2.py
@@ -20,8 +20,8 @@ async def test_tinyproxy_sends_proxy_v2_for_udp() -> None:
 
 	conf_text = (
 		f"listen"
-		f" udp {LISTEN_HOST}:{PROXY_PORT} "
-		f" udp {LISTEN_HOST}:{UDP_PROXY_V2_BACKEND_PORT} "
+		f" udp {LISTEN_HOST}:{PROXY_PORT}"
+		f" udp {LISTEN_HOST}:{UDP_PROXY_V2_BACKEND_PORT}"
 		f" proxy_v2\n"
 	)