Supported Configuration Options

This section details all configuration options supported by the V2ROOT library for parsing VLESS, VMess, and Shadowsocks protocols. These options are derived from the parsing functions in the C library (libv2root).

VLESS Options

The VLESS protocol supports a wide range of transport and security configurations:

  • Transport Protocols: - TCP - HTTP/2 (h2) - WebSocket (ws) - mKCP - QUIC - gRPC

  • Security Options: - None - TLS - Reality

  • Encryption: - None (default)

  • Flow Control: - Optional flow parameter for advanced routing (e.g., xtls-rprx-vision)

  • TCP Settings: - Custom header types: none, http

  • HTTP/2 Settings: - path: URL path for HTTP/2 connections - host: Host header - headers: Custom HTTP headers (e.g., key=value)

  • WebSocket Settings: - path: WebSocket path - host: Host header

  • mKCP Settings: - headerType: Header type (e.g., none, srtp, utp) - seed: Seed for obfuscation - congestion: Congestion control (e.g., bbr)

  • QUIC Settings: - security: QUIC security mode - key: QUIC encryption key - headerType: Header type (e.g., none, srtp)

  • gRPC Settings: - serviceName: gRPC service name - multiMode: Enable/disable multi-mode (true/false)

  • TLS Settings: - sni: Server Name Indication - alpn: Application-Layer Protocol Negotiation (e.g., h2, http/1.1) - fingerprint: TLS fingerprint (e.g., chrome, firefox)

  • Reality Settings: - publicKey: Public key for Reality - shortIds: Short IDs for authentication - spiderX: SpiderX parameter - fingerprint: Reality fingerprint

  • Inbound Proxies: - HTTP proxy port (default: 10808) - SOCKS proxy port (default: 1080)

VMess Options

The VMess protocol supports similar transport options with additional encryption features:

  • Transport Protocols: - TCP - HTTP/2 (h2) - WebSocket (ws) - mKCP - QUIC - gRPC

  • Security Options: - None - TLS

  • Encryption Methods: - auto (default) - aes-128-gcm - chacha20-poly1305 - none

  • TCP Settings: - Custom header types: none, http

  • HTTP/2 Settings: - path: URL path - host: Host header - headers: Custom HTTP headers

  • WebSocket Settings: - path: WebSocket path - host: Host header

  • mKCP Settings: - headerType: Header type - seed: Seed for obfuscation - congestion: Congestion control (e.g., bbr)

  • QUIC Settings: - security: QUIC security mode - key: QUIC encryption key - headerType: Header type

  • gRPC Settings: - serviceName: gRPC service name - multiMode: Enable/disable multi-mode

  • TLS Settings: - sni: Server Name Indication - alpn: Application-Layer Protocol Negotiation

  • Inbound Proxies: - HTTP proxy port (default: 10808) - SOCKS proxy port (default: 1080)

  • Additional Features: - alterId: Alter ID for backward compatibility (integer, default: 0)

Shadowsocks Options

The Shadowsocks protocol supports simpler configurations with plugin support:

  • Transport Protocols: - TCP (default) - UDP (via SOCKS settings)

  • Security Options: - None - TLS (optional, via security parameter)

  • Encryption Methods: - Configurable via method (e.g., aes-256-gcm, chacha20-ietf-poly1305)

  • Plugin Support: - plugin: Plugin name (e.g., v2ray-plugin, obfs) - plugin-opts: Plugin-specific options

  • Additional Settings: - password: Encryption password - ota: One-Time Authentication (true/false, default: false) - level: User level (integer, default: 0) - tag: Optional tag for routing - network: Network type (e.g., tcp, udp)

  • Inbound Proxies: - HTTP proxy port (default: 10808) - SOCKS proxy port (default: 1080)

Usage Notes

  • All protocols support configurable HTTP and SOCKS proxy ports, with defaults applied if invalid ports are provided.

  • Ensure that the configuration strings (VLESS, VMess, Shadowsocks) are correctly formatted to avoid parsing errors.

  • For detailed error handling, check the logs generated by the log_message function in the C library.