mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-05-04 20:30:33 +00:00
Implement SOCKS4
This commit is contained in:
parent
7dec7f59f1
commit
341bab5586
6 changed files with 175 additions and 43 deletions
|
@ -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) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue