clash-verge-rev/clash-verge-rev · error · Error
Invalid hysteria2 uri
Error message
Invalid hysteria2 uri
What it means
Error "Invalid hysteria2 uri" thrown in clash-verge-rev/clash-verge-rev.
Source
Thrown at src/utils/uri-parser/hysteria2.ts:18
import {
decodeAndTrim,
parseBoolOrPresence,
parsePortOrDefault,
parseQueryStringNormalized,
parseUrlLike,
safeDecodeURIComponent,
stripUriScheme,
} from './helpers'
export function URI_Hysteria2(line: string): IProxyHysteria2Config {
const afterScheme = stripUriScheme(
line,
['hysteria2', 'hy2'],
'Invalid hysteria2 uri',
)
if (!afterScheme) {
throw new Error('Invalid hysteria2 uri')
}
const {
auth: passwordRaw,
host: server,
port,
query: addons,
fragment: nameRaw,
} = parseUrlLike(afterScheme, {
requireAuth: true,
errorMessage: 'Invalid hysteria2 uri',
})
const portNum = parsePortOrDefault(port, 443)
const password = safeDecodeURIComponent(passwordRaw) ?? passwordRaw
const decodedName = decodeAndTrim(nameRaw)
const name = decodedName ?? `Hysteria2 ${server}:${portNum}`
View on GitHub (pinned to 5cad0f2799)
When it happens
Trigger: Thrown at src/utils/uri-parser/hysteria2.ts:18 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of clash-verge-rev/clash-verge-rev@5cad0f2799 (2026-08-12).
Data as JSON: /api/errors/ae12ef815b0bda42.
Report an issue: GitHub.