Update METATAG_RULES and PORT_FORMAT for improved icon representation and formatting

This commit is contained in:
2026-01-05 15:32:10 +03:00
parent 8f535becc2
commit 143f41dcde

View File

@@ -151,16 +151,16 @@ const PROTOCOL_ICON_DEFAULT = ""; // fallback icon if type is unknown
const METATAG_RULES = { const METATAG_RULES = {
// Keys are "network/type" OR "/type" (network-agnostic) OR "network/" (type-agnostic) // Keys are "network/type" OR "/type" (network-agnostic) OR "network/" (type-agnostic)
// Matching priority: exact "network/type" -> "/type" -> "network/" -> default // Matching priority: exact "network/type" -> "/type" -> "network/" -> default
// 🇬‌🇹‌ 🇹‌🇸‌ 🇹‌🇻‌ 🇼‌🇻‌ 🇽‌🇻‌ 🇼‌🇬‌ 🇳‌🇮‌ // 🅶🆃 🆃🆂 🆃🆅 🆆🆅 🆇🆅 🆆🅶 🅽🅸
pairMap: { pairMap: {
"grpc/trojan": "🇬‌🇹‌", "grpc/trojan": "🅶🆃",
"tcp/ss": "‌🇹‌🇸", "tcp/ss": "🆃🆂",
"tcp/vless": "🇹‌🇻‌", "tcp/vless": "🆃🆅",
"ws/vless": "🇼‌🇻‌", "ws/vless": "🆆🆅",
"xhttp/vless": "🇽‌🇻‌", "xhttp/vless": "🆇🆅",
"/wireguard": "🇼‌🇬", "/wireguard": "🆆🅶",
"/naive": "🇳‌🇮‌", "/naive": "🅽🅸",
}, },
defaultPair: "▫️", // fallback if nothing matches defaultPair: "▫️", // fallback if nothing matches
@@ -168,11 +168,12 @@ const METATAG_RULES = {
}; };
// Port formatting: superscript digits with left padding to 4 chars // Port formatting: superscript digits with left padding to 4 chars
// 𝟎𝟏𝟐𝟑𝟒𝟓𝟔𝟕𝟖𝟗
const PORT_FORMAT = { const PORT_FORMAT = {
padLeftTo: 5, padLeftTo: 5,
padChar: "0", padChar: "0",
superscripts: { superscripts: {
"0": "", "1": "¹", "2": "²", "3": "³", "4": "", "5": "", "6": "", "7": "", "8": "", "9": "", "0": "𝟎", "1": "𝟏", "2": "𝟐", "3": "𝟑", "4": "𝟒", "5": "𝟓", "6": "𝟔", "7": "𝟕", "8": "𝟖", "9": "𝟗",
}, },
}; };