diff --git a/easytier/src/instance/instance.rs b/easytier/src/instance/instance.rs index e241f8f..c242cb8 100644 --- a/easytier/src/instance/instance.rs +++ b/easytier/src/instance/instance.rs @@ -71,7 +71,6 @@ impl IpProxy { async fn start(&self) -> Result<(), Error> { if (self.global_ctx.get_proxy_cidrs().is_empty() - || self.global_ctx.proxy_forward_by_system() || self.started.load(Ordering::Relaxed)) && !self.global_ctx.enable_exit_node() && !self.global_ctx.no_tun() @@ -79,6 +78,13 @@ impl IpProxy { return Ok(()); } + // Actually, if this node is enabled as an exit node, + // we still can use the system stack to forward packets. + if self.global_ctx.proxy_forward_by_system() + && !self.global_ctx.no_tun() { + return Ok(()); + } + self.started.store(true, Ordering::Relaxed); self.tcp_proxy.start(true).await?; if let Err(e) = self.icmp_proxy.start().await {