(&self, host: &str, port: u16)
| 488 | } |
| 489 | |
| 490 | fn make_request(&self, host: &str, port: u16) -> String { |
| 491 | let mut request = format!( |
| 492 | "CONNECT {host}:{port} HTTP/1.1\r\nHost: {host}:{port}\r\n", |
| 493 | host = host, |
| 494 | port = port |
| 495 | ); |
| 496 | |
| 497 | if let Some(auth) = self.intercept.maybe_auth() { |
| 498 | request = format!("{}{}", request, auth.get_proxy_authorization()); |
| 499 | } |
| 500 | |
| 501 | request.push_str("\r\n"); |
| 502 | request |
| 503 | } |
| 504 | } |
| 505 | |
| 506 | fn get_domain_and_port<'a, T: IntoTargetAddr<'a>>(target: T) -> Result<(String, u16), ProxyError> { |
no test coverage detected