dndx / phantun

Transforms UDP stream into (fake) TCP streams that can go through Layer 3 & Layer 4 (NAPT) firewalls/NATs.
Apache License 2.0
1.71k stars 137 forks source link

Run phantun in the Android #99

Closed zyf0330 closed 1 year ago

zyf0330 commented 1 year ago

I run phantun from the phantun_arm-unknown-linux-musleabihf.zip build in my Android, but it shows this error.

~ $ RUST_BACKTRACE=1 RUST_LOG=info ./phantun_client --local 127.0.0.1:9999 --remote 192.168.10.198:4556

 INFO  client > Remote address is: 192.168.10.198:4556
 INFO  client > 8 cores available
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: EBADF', phantun/src/bin/client.rs:162:10
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
   2: core::result::unwrap_failed
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/result.rs:1814:5
   3: client::main::{{closure}}
   4: std::thread::local::LocalKey<T>::with
   5: tokio::park::thread::CachedParkThread::block_on
   6: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
   7: tokio::runtime::Runtime::block_on
   8: client::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace

Has anyone run phantun in the Android successfully?

dndx commented 1 year ago

It appears that you do not have Tun module compiled in the Kernel.