Add support for SOCKS5 proxies, and parsing proxy authorizations from URLs

This commit is contained in:
Diggory Blake
2019-04-05 15:59:18 -07:00
committed by Sean McArthur
parent 871ec6f989
commit c45ff29bfb
8 changed files with 486 additions and 103 deletions

View File

@@ -579,11 +579,11 @@ impl Client {
for proxy in self.inner.proxies.iter() {
if proxy.is_match(dst) {
match proxy.auth() {
Some(::proxy::Auth::Basic(ref header)) => {
match proxy.http_basic_auth(dst) {
Some(header) => {
headers.insert(
PROXY_AUTHORIZATION,
header.clone()
header,
);
},
None => (),