mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-05-04 12:24:45 +00:00
Merge SOCKS4 support
The SOCKS4 tests in the CI pipeline will currently fail, as no SOCKS4 test server for automated testing has been set up yet.
This commit is contained in:
commit
a5aac8c0a4
7 changed files with 175 additions and 45 deletions
|
@ -175,11 +175,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 {
|
||||
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