capmonster-python docs

class Proxy

class Proxy

Methods

set_proxy

ParameterTypeRequiredDefault valuePurpose
proxy_typeStringYes-Type of the proxy

http - usual http/https proxy
https - try this only if "http" doesn't work (required by some custom proxy servers)
socks4 - socks4 proxy
socks5 - socks5 proxy
proxy_addressStringYes-Proxy IP address IPv4/IPv6. Not allowed to use:

  • host names instead of IPs
  • transparent proxies (where client IP is visible)
  • proxies from local networks (192.., 10.., 127...)
proxy_portIntegerYes-Proxy port
proxy_loginStringNo *-Login for proxy which requires authorizaiton (basic)
proxy_passwordStringNo *-Proxy password

* If your proxy isn't authorized by IP you must pass the both of them. But the proxy is authorized by IP, then be sure to add 116.203.55.208 to the white list.

method disable_proxy

Doesn't have any specific parameters, it's disables and clear the proxy.

Edit this page on GitHub