Skip to content

parseProxyConfig()

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / parseProxyConfig

parseProxyConfig(config): ParsedProxyConfig

Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:16882

Parse a proxy configuration string into structured data

ProxyConfig

Proxy configuration string

ParsedProxyConfig

Parsed configuration

parseProxyConfig('tor')
// { type: 'tor', host: '127.0.0.1', port: 9050 }
parseProxyConfig('socks5://proxy.example.com:1080')
// { type: 'socks5', host: 'proxy.example.com', port: 1080, url: '...' }
parseProxyConfig('http://user:pass@proxy.com:8080')
// { type: 'http', host: 'proxy.com', port: 8080, username: 'user', password: 'pass' }