mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-05-04 12:24: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
|
@ -168,7 +168,7 @@ pub struct HttpManager {
|
|||
|
||||
impl ConnectionManager for HttpManager {
|
||||
fn handles_connection(&self, connection: &Connection) -> bool {
|
||||
connection.proto == IpProtocol::Tcp.into()
|
||||
connection.proto == IpProtocol::Tcp
|
||||
}
|
||||
|
||||
fn new_connection(
|
||||
|
@ -176,7 +176,7 @@ impl ConnectionManager for HttpManager {
|
|||
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(HttpConnection::new(connection, manager)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue