fix: harden sing-box egress rollout

This commit is contained in:
2026-08-27 03:39:06 +05:00
parent adb3e849df
commit 8ac3b2b1ba
24 changed files with 228 additions and 48 deletions
+5
View File
@@ -50,6 +50,10 @@ class UriParserTests(unittest.TestCase):
endpoint = parse_hysteria2_uri("hysteria2://alice%3Acorrect%20horse@example.com")
self.assertEqual(endpoint.password, "alice:correct horse")
def test_percent_encoded_at_is_preserved(self) -> None:
endpoint = parse_hysteria2_uri("hysteria2://alice%40example@example.com")
self.assertEqual(endpoint.password, "alice@example")
def test_unicode_host_is_idna(self) -> None:
endpoint = parse_hysteria2_uri("hysteria2://secret@пример.рф")
self.assertEqual(endpoint.server, "xn--e1afmkfd.xn--p1ai")
@@ -89,6 +93,7 @@ class UriParserTests(unittest.TestCase):
("hysteria2://secret@example.com?pinSHA256=x", "safely"),
("hysteria2://secret@example.com?ech=x", "safely"),
("hysteria2://sec%ZZret@example.com", "percent"),
("hysteria2://alice@example@server.example", "percent-encoded"),
("hysteria2://secret@example.com?sni=%FF", "UTF-8"),
]
for uri, marker in cases: