mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-06-09 16:17:45 +00:00
switch to smoltcp dev version
to support IpProtocol with Hash trait
This commit is contained in:
parent
4eddcfd02b
commit
bfa1bbc462
4 changed files with 13 additions and 14 deletions
|
@ -299,7 +299,7 @@ pub struct Socks5Manager {
|
|||
|
||||
impl ConnectionManager for Socks5Manager {
|
||||
fn handles_connection(&self, connection: &Connection) -> bool {
|
||||
connection.proto == IpProtocol::Tcp.into()
|
||||
connection.proto == IpProtocol::Tcp
|
||||
}
|
||||
|
||||
fn new_connection(
|
||||
|
@ -307,7 +307,7 @@ impl ConnectionManager for Socks5Manager {
|
|||
connection: &Connection,
|
||||
manager: Rc<dyn ConnectionManager>,
|
||||
) -> Option<Box<dyn TcpProxy>> {
|
||||
if connection.proto != IpProtocol::Tcp.into() {
|
||||
if connection.proto != IpProtocol::Tcp {
|
||||
return None;
|
||||
}
|
||||
Some(Box::new(SocksConnection::new(connection, manager)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue