Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to add static route in android #319

Closed
mnaveedpaki opened this issue Jul 19, 2024 · 5 comments
Closed

I want to add static route in android #319

mnaveedpaki opened this issue Jul 19, 2024 · 5 comments

Comments

@mnaveedpaki
Copy link

Describe the goal

I want to add static route in android

Describe what does not work

i have compiled .so files for android anf after running it is showing
Starting UDP server listening cnx on 127.0.0.1:51820 with cnx timeout of 0s

But i can not not add static rout like sudo ip route add ip.of.my.server.com dev eth0 via 192.168.0.1
because it require ROOT access and i am developing app to distribute on play store for public use.

Describe your wstunnel setup

wstunnel client -L 'udp://51820:127.0.0.1:51820?timeout_sec=0' wss://my_server:443/

Desktop (please complete the following information):

  • OS: Android
@erebe
Copy link
Owner

erebe commented Jul 20, 2024

You should look into wireguard app to know how they do it. Must have some android API that make it possible without being root.

@mnaveedpaki
Copy link
Author

mnaveedpaki commented Jul 22, 2024

https://developer.android.com/reference/android/net/VpnService.Builder#addRoute(java.net.InetAddress,%20int)

This is not working because of Wireguard already using vpnservice class and i can not use 2nd vpnservice class.

@mnaveedpaki
Copy link
Author

mnaveedpaki commented Jul 22, 2024

is there any other way like if i use HTTPS or Socks5, So i don't have to use static route????

@maytom2016
Copy link

it seems wstunnel is work on Application layer.all of route is controlled by wireguard.why you have to add static route?if you want to add a route,you should change wireguard config file AllowedIPs option.

is there any other way like if i use HTTPS or Socks5, So i don't have to use static route????

@erebe erebe closed this as completed Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants