feat: add hy2 validator

This commit is contained in:
divocat
2025-11-30 18:35:06 +02:00
parent 82345047cb
commit 622e092317
10 changed files with 581 additions and 81 deletions

View File

@@ -3,35 +3,35 @@
"call": "✔ Enabled",
"key": "✔ Enabled",
"places": [
"src/podkop/tabs/dashboard/initController.ts:342"
"src/podkop/tabs/dashboard/initController.ts:345"
]
},
{
"call": "✔ Running",
"key": "✔ Running",
"places": [
"src/podkop/tabs/dashboard/initController.ts:353"
"src/podkop/tabs/dashboard/initController.ts:356"
]
},
{
"call": "✘ Disabled",
"key": "✘ Disabled",
"places": [
"src/podkop/tabs/dashboard/initController.ts:343"
"src/podkop/tabs/dashboard/initController.ts:346"
]
},
{
"call": "✘ Stopped",
"key": "✘ Stopped",
"places": [
"src/podkop/tabs/dashboard/initController.ts:354"
"src/podkop/tabs/dashboard/initController.ts:357"
]
},
{
"call": "Active Connections",
"key": "Active Connections",
"places": [
"src/podkop/tabs/dashboard/initController.ts:304"
"src/podkop/tabs/dashboard/initController.ts:307"
]
},
{
@@ -379,8 +379,8 @@
"call": "Downlink",
"key": "Downlink",
"places": [
"src/podkop/tabs/dashboard/initController.ts:238",
"src/podkop/tabs/dashboard/initController.ts:272"
"src/podkop/tabs/dashboard/initController.ts:241",
"src/podkop/tabs/dashboard/initController.ts:275"
]
},
{
@@ -637,6 +637,83 @@
"src/validators/validateSubnet.ts:11"
]
},
{
"call": "Invalid HY2 URL: insecure must be 0 or 1",
"key": "Invalid HY2 URL: insecure must be 0 or 1",
"places": [
"src/validators/validateHysteriaUrl.ts:73"
]
},
{
"call": "Invalid HY2 URL: invalid port number",
"key": "Invalid HY2 URL: invalid port number",
"places": [
"src/validators/validateHysteriaUrl.ts:62"
]
},
{
"call": "Invalid HY2 URL: missing credentials/server",
"key": "Invalid HY2 URL: missing credentials/server",
"places": [
"src/validators/validateHysteriaUrl.ts:32"
]
},
{
"call": "Invalid HY2 URL: missing host",
"key": "Invalid HY2 URL: missing host",
"places": [
"src/validators/validateHysteriaUrl.ts:49"
]
},
{
"call": "Invalid HY2 URL: missing host & port",
"key": "Invalid HY2 URL: missing host & port",
"places": [
"src/validators/validateHysteriaUrl.ts:43"
]
},
{
"call": "Invalid HY2 URL: missing password",
"key": "Invalid HY2 URL: missing password",
"places": [
"src/validators/validateHysteriaUrl.ts:38"
]
},
{
"call": "Invalid HY2 URL: missing port",
"key": "Invalid HY2 URL: missing port",
"places": [
"src/validators/validateHysteriaUrl.ts:53"
]
},
{
"call": "Invalid HY2 URL: must not contain spaces",
"key": "Invalid HY2 URL: must not contain spaces",
"places": [
"src/validators/validateHysteriaUrl.ts:19"
]
},
{
"call": "Invalid HY2 URL: must start with hysteria2:// or hy2://",
"key": "Invalid HY2 URL: must start with hysteria2:// or hy2://",
"places": [
"src/validators/validateHysteriaUrl.ts:12"
]
},
{
"call": "Invalid HY2 URL: parsing failed",
"key": "Invalid HY2 URL: parsing failed",
"places": [
"src/validators/validateHysteriaUrl.ts:103"
]
},
{
"call": "Invalid HY2 URL: unsupported obfs type",
"key": "Invalid HY2 URL: unsupported obfs type",
"places": [
"src/validators/validateHysteriaUrl.ts:82"
]
},
{
"call": "Invalid IP address",
"key": "Invalid IP address",
@@ -880,7 +957,7 @@
"call": "Memory Usage",
"key": "Memory Usage",
"places": [
"src/podkop/tabs/dashboard/initController.ts:308"
"src/podkop/tabs/dashboard/initController.ts:311"
]
},
{
@@ -1023,7 +1100,7 @@
"call": "Podkop",
"key": "Podkop",
"places": [
"src/podkop/tabs/dashboard/initController.ts:340"
"src/podkop/tabs/dashboard/initController.ts:343"
]
},
{
@@ -1290,7 +1367,7 @@
"call": "Services info",
"key": "Services info",
"places": [
"src/podkop/tabs/dashboard/initController.ts:337"
"src/podkop/tabs/dashboard/initController.ts:340"
]
},
{
@@ -1312,7 +1389,7 @@
"call": "Sing-box",
"key": "Sing-box",
"places": [
"src/podkop/tabs/dashboard/initController.ts:351"
"src/podkop/tabs/dashboard/initController.ts:354"
]
},
{
@@ -1425,7 +1502,7 @@
"call": "System info",
"key": "System info",
"places": [
"src/podkop/tabs/dashboard/initController.ts:301"
"src/podkop/tabs/dashboard/initController.ts:304"
]
},
{
@@ -1453,13 +1530,7 @@
"call": "Text List",
"key": "Text List",
"places": [
"../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:368"
]
},
{
"call": "Text List (comma/space/newline separated)",
"key": "Text List (comma/space/newline separated)",
"places": [
"../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:368",
"../luci-app-podkop/htdocs/luci-static/resources/view/podkop/section.js:448"
]
},
@@ -1502,14 +1573,14 @@
"call": "Traffic",
"key": "Traffic",
"places": [
"src/podkop/tabs/dashboard/initController.ts:235"
"src/podkop/tabs/dashboard/initController.ts:238"
]
},
{
"call": "Traffic Total",
"key": "Traffic Total",
"places": [
"src/podkop/tabs/dashboard/initController.ts:265"
"src/podkop/tabs/dashboard/initController.ts:268"
]
},
{
@@ -1572,15 +1643,15 @@
"call": "Uplink",
"key": "Uplink",
"places": [
"src/podkop/tabs/dashboard/initController.ts:237",
"src/podkop/tabs/dashboard/initController.ts:268"
"src/podkop/tabs/dashboard/initController.ts:240",
"src/podkop/tabs/dashboard/initController.ts:271"
]
},
{
"call": "URL must start with vless://, ss://, trojan://, or socks4/5://",
"key": "URL must start with vless://, ss://, trojan://, or socks4/5://",
"places": [
"src/validators/validateProxyUrl.ts:29"
"src/validators/validateProxyUrl.ts:37"
]
},
{
@@ -1675,6 +1746,7 @@
"src/validators/validateDns.ts:18",
"src/validators/validateDomain.ts:13",
"src/validators/validateDomain.ts:30",
"src/validators/validateHysteriaUrl.ts:101",
"src/validators/validateIp.ts:8",
"src/validators/validateOutboundJson.ts:7",
"src/validators/validatePath.ts:16",