Decode percent-encoded tags and filter release artifacts

This commit is contained in:
2026-07-08 21:14:00 +03:00
parent f6b722b22a
commit 2e80f7b8eb
8 changed files with 179 additions and 9 deletions

View File

@@ -44,6 +44,19 @@ fn parses_base64_vless_link_list() {
assert_eq!(outbound["packet_encoding"], "xudp");
}
#[test]
fn decodes_percent_encoded_vless_fragment_tag() {
let link = sample_vless_link(
"%D0%A3%D0%BC%D0%BD%D1%8B%D0%B9%20%F0%9F%87%B3%F0%9F%87%B1-%3E%F0%9F%87%B7%F0%9F%87%BA",
);
let parsed = parse_subscription_body(&link).expect("vless link should parse");
let outbound = &parsed.config["outbounds"][0];
assert_eq!(parsed.servers[0].tag, "Умный 🇳🇱->🇷🇺");
assert_eq!(outbound["tag"], "Умный 🇳🇱->🇷🇺");
}
#[test]
fn rejects_body_without_supported_outbounds() {
let error = parse_subscription_body(r#"{"outbounds":[{"type":"direct","tag":"direct"}]}"#)