fix: support VLESS xhttp and normalize IPv6 addresses

This commit is contained in:
wonfen
2026-07-17 23:51:29 +08:00
parent 950e8195fb
commit b7978705af
7 changed files with 42 additions and 7 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ import {
decodeBase64OrOriginal,
getCipher,
getIfNotBlank,
normalizeHost,
parseQueryString,
parseRequiredPort,
stripUriScheme,
@@ -27,7 +28,7 @@ export function URI_SSR(uri: string): IProxyshadowsocksRConfig {
if (portIdx === -1) {
throw new Error('Invalid ssr uri: missing port')
}
const server = serverAndPort.substring(0, portIdx)
const server = normalizeHost(serverAndPort.substring(0, portIdx))
const port = parseRequiredPort(
serverAndPort.substring(portIdx + 1),
'Invalid ssr uri: invalid port',