Skip to content

URI Parsers

v2rayroot edited this page Jun 14, 2026 · 1 revision

URI Parsers

All parser functions return allocated UTF-8 JSON. On failure they return an allocated empty string. Release both successful and empty results with FreeCString.

Parse

char *Parse(char *optionsJSON);

Recommended entry point. It detects:

  • vless://
  • vmess://
  • trojan://
  • ss://

Protocol-Specific Functions

char *ParseVless(char *optionsJSON);
char *ParseTrojan(char *optionsJSON);
char *ParseVmess(char *optionsJSON);
char *ParseShadowsocks(char *optionsJSON);

Use these when the protocol is already known.

Minimal Input

{
  "uri": "vless://..."
}

Default local inbounds:

  • HTTP: 10809
  • SOCKS: 10808

Output

Generated configuration normally contains:

  • HTTP and SOCKS inbounds
  • Main outbound tagged Proxy
  • Freedom outbound tagged Direct
  • Blackhole outbound tagged Reject
  • Optional DNS and routing rules

See Parser Options and Transport Support.

Clone this wiki locally