pub struct Proxy { /* private fields */ }Expand description
Proxy server definition
Implementations§
source§impl Proxy
impl Proxy
sourcepub fn new<S: AsRef<str>>(proxy: S) -> Result<Self, Error>
pub fn new<S: AsRef<str>>(proxy: S) -> Result<Self, Error>
Create a proxy from a format string.
Arguments:
proxy- a str of format<protocol>://<user>:<password>@<host>:port. All parts except host are optional.
Protocols
http: HTTPsocks4: SOCKS4 (requires socks feature)socks4a: SOCKS4A (requires socks feature)socks5andsocks: SOCKS5 (requires socks feature)
Examples
http://127.0.0.1:8080socks5://john:smith@socks.google.comjohn:smith@socks.google.com:8000localhost