Skip to main content

parse_proxy_chain

Function parse_proxy_chain 

Source
pub fn parse_proxy_chain(uri: &str) -> Result<ProxyChainSpec, UriParseError>
Expand description

Parse a proxy chain URI string into a chain specification.

Grammar:

  • Protocol lists joined with + (e.g., http+socks4+socks5)
  • Proxy hops joined with __ (e.g., socks5://hop1:1080__http://hop2:8080)
  • Standard URI components: scheme, host, port
  • Bracketed IPv6 (e.g., [::1])
  • Credentials in userinfo (e.g., user:pass@host:port)
  • Query parameters for rules (e.g., ?rule=regex)
  • Local bind modifier (e.g., @127.0.0.1)