Implement SOCKS4

This commit is contained in:
B. Blechschmidt 2023-03-25 01:39:46 +01:00
parent 7dec7f59f1
commit 341bab5586
6 changed files with 175 additions and 43 deletions

View file

@ -178,11 +178,11 @@ impl ConnectionManager for HttpManager {
&self,
connection: &Connection,
manager: Rc<dyn ConnectionManager>,
) -> Option<Box<dyn TcpProxy>> {
) -> Result<Option<Box<dyn TcpProxy>>, Error> {
if connection.proto != IpProtocol::Tcp.into() {
return None;
return Ok(None);
}
Some(Box::new(HttpConnection::new(connection, manager)))
Ok(Some(Box::new(HttpConnection::new(connection, manager))))
}
fn close_connection(&self, _: &Connection) {}