diff --git a/clash_lib/src/config/internal/config.rs b/clash_lib/src/config/internal/config.rs index 5e159682d..770267ac0 100644 --- a/clash_lib/src/config/internal/config.rs +++ b/clash_lib/src/config/internal/config.rs @@ -254,6 +254,10 @@ pub struct TunConfig { /// default: 198.18.0.0/16 pub network: Option, pub gateway: Option, + /// auto manage route + pub auto_route: Option, + /// fwmark for preveting loop + pub mark: Option, } #[derive(Clone, Default)] diff --git a/clash_lib/src/proxy/tun/inbound.rs b/clash_lib/src/proxy/tun/inbound.rs index 7e1a33393..a4dc3ed89 100644 --- a/clash_lib/src/proxy/tun/inbound.rs +++ b/clash_lib/src/proxy/tun/inbound.rs @@ -21,6 +21,7 @@ async fn handle_inbound_stream( remote_addr: SocketAddr, dispatcher: Arc, ) { + // TODO add fwmark here let sess = Session { network: Network::Tcp, typ: Type::Tun, @@ -53,6 +54,7 @@ async fn handle_inbound_datagram( // and send back packets to this channel, which is to the tun let udp_stream = TunDatagram::new(l_tx, d_rx, local_addr); + // TODO add fwmark here let sess = Session { network: Network::Udp, typ: Type::Tun,