improve experience of subnet/kcp proxy

1. add self to windows firewall on windows
2. android always use smoltcp
This commit is contained in:
sijie.sun
2025-02-06 11:19:10 +08:00
committed by Sijie.Sun
parent 8b89a037e8
commit e833c2a28b
6 changed files with 156 additions and 45 deletions

View File

@@ -452,7 +452,10 @@ impl<C: NatDstConnector> TcpProxy<C> {
async fn get_proxy_listener(&self) -> Result<ProxyTcpListener> {
#[cfg(feature = "smoltcp")]
if self.global_ctx.get_flags().use_smoltcp || self.global_ctx.no_tun() {
if self.global_ctx.get_flags().use_smoltcp
|| self.global_ctx.no_tun()
|| cfg!(target_os = "android")
{
// use smoltcp network stack
self.local_port
.store(8899, std::sync::atomic::Ordering::Relaxed);