release: prepare 0.2.0 for sing-box 1.14

This commit is contained in:
2026-09-08 19:26:00 +05:00
parent 81ea89f7fa
commit 76dce5b47a
42 changed files with 1634 additions and 549 deletions
+23 -3
View File
@@ -30,6 +30,24 @@ class UriParserTests(unittest.TestCase):
self.assertEqual(endpoint.obfs_type, "salamander")
self.assertEqual(endpoint.obfs_password, "o@p")
def test_production_gecko_uri(self) -> None:
endpoint = parse_hysteria2_uri(
"hysteria2://peer%2Bsecret@example.com:443/"
"?insecure=0&obfs=gecko&obfs-password=a%26b%3Dc%2Bd&sni=vpn.example.com"
)
self.assertEqual(endpoint.password, "peer+secret")
self.assertEqual(endpoint.obfs_type, "gecko")
self.assertEqual(endpoint.obfs_password, "a&b=c+d")
def test_raw_plus_in_query_is_not_decoded_as_space(self) -> None:
endpoint = parse_hysteria2_uri(
"hy2://secret@example.com?obfs=gecko&obfs-password=a+b"
)
self.assertEqual(endpoint.obfs_password, "a+b")
def test_encoded_duplicate_name_is_rejected(self) -> None:
self.assert_invalid("hy2://secret@example.com?sni=a&%73ni=b", "Duplicate")
def test_ipv6(self) -> None:
endpoint = parse_hysteria2_uri("hysteria2://secret@[2001:db8::1]:444/")
self.assertEqual(endpoint.server, "2001:db8::1")
@@ -87,11 +105,13 @@ class UriParserTests(unittest.TestCase):
("hysteria2://secret@example.com?unknown=x", "Unsupported"),
("hysteria2://secret@example.com?sni=a&sni=b", "Duplicate"),
("hysteria2://secret@example.com?insecure=true", "exactly"),
("hysteria2://secret@example.com?obfs=gecko", "1.13.19"),
("hysteria2://secret@example.com?obfs=gecko", "obfs-password"),
("hysteria2://secret@example.com?obfs=salamander", "obfs-password"),
("hysteria2://secret@example.com?obfs-password=x", "requires"),
("hysteria2://secret@example.com?pinSHA256=x", "safely"),
("hysteria2://secret@example.com?ech=x", "safely"),
("hysteria2://secret@example.com?pinSHA256=x", "not implemented"),
("hysteria2://secret@example.com?ech=x", "not implemented"),
("hysteria2://secret@example.com?sni", "query parameter"),
("hysteria2://secret@example.com?sni=a&&insecure=0", "Empty"),
("hysteria2://sec%ZZret@example.com", "percent"),
("hysteria2://alice@example@server.example", "percent-encoded"),
("hysteria2://secret@example.com?sni=%FF", "UTF-8"),