So, I have binary program (arm64) for tunneling. It’s working fine when runs on termux. It act as socks5 server, therefore it will open port on 127.0.0.1:1080
.
I expect any layer 3 traffic on my phone will be redirected to socks5 proxy which is 127.0.0.1:1080
Actually I can achieve it, there is an app on playstore named Tun2Socks.
In a nutshell, Tun2Socks is socks5 client and termux is socks5 server.
Now, I want combine both into single app, I want to run the binary program and redirect all traffic of my phone with some IP exceptions into/from to the socks5 proxy. How do I create the app with flutter? Basically it’s just:
- Run the binary program on background:
./mybin --socks5-listen 127.0.0.1:1080
- Allow VPN access API and redirect all traffic (with some IP exceptions) into/from socks5 proxy
So, at the end. The UI is just an enable/disable toggle when open the app.