clash-verge-rev/clash-verge-rev · error · Error

Invalid socks uri

Error message

Invalid socks uri

What it means

Error "Invalid socks uri" thrown in clash-verge-rev/clash-verge-rev.

Source

Thrown at src/utils/uri-parser/socks.ts:20

  decodeAndTrim,
  parseBoolOrPresence,
  parseIpVersion,
  parsePortOrDefault,
  parseQueryStringNormalized,
  parseUrlLike,
  safeDecodeURIComponent,
  splitOnce,
  stripUriScheme,
} from './helpers'

export function URI_SOCKS(line: string): IProxySocks5Config {
  const afterScheme = stripUriScheme(
    line,
    ['socks5', 'socks'],
    'Invalid socks uri',
  )
  if (!afterScheme) {
    throw new Error('Invalid socks uri')
  }
  const {
    auth: authRaw,
    host: server,
    port,
    query: addons,
    fragment: nameRaw,
  } = parseUrlLike(afterScheme, { errorMessage: 'Invalid socks uri' })
  const portNum = parsePortOrDefault(port, 443)

  const auth = safeDecodeURIComponent(authRaw) ?? authRaw
  const decodedName = decodeAndTrim(nameRaw)
  const name = decodedName ?? `SOCKS5 ${server}:${portNum}`
  const proxy: IProxySocks5Config = {
    type: 'socks5',
    name,
    server,
    port: portNum,

View on GitHub (pinned to 5cad0f2799)

When it happens

Trigger: Thrown at src/utils/uri-parser/socks.ts:20 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/a6da706ba2fc9505. Report an issue: GitHub.