add Proxy::custom to allow custom proxy functions

This commit is contained in:
Sean McArthur
2017-08-02 15:03:37 -07:00
parent df4b6bd8db
commit 229a2384a6
4 changed files with 155 additions and 44 deletions

View File

@@ -47,7 +47,7 @@ impl Service for Connector {
fn call(&self, uri: Uri) -> Self::Future {
for prox in self.proxies.iter() {
if let Some(puri) = proxy::proxies(prox, &uri) {
if let Some(puri) = proxy::intercept(prox, &uri) {
if uri.scheme() == Some("https") {
let host = uri.host().unwrap().to_owned();
let port = uri.port().unwrap_or(443);