Genymobile / gnirehtet

Gnirehtet provides reverse tethering for Android
Apache License 2.0
6.29k stars 576 forks source link

cant connect to code-server thats running inside of termux on android from web browser on pc #516

Open james28909 opened 10 months ago

james28909 commented 10 months ago

Internet is working fine on my android device. i can access all my sites i usually do without fail. but when i open my web browser on pc and type in 10.0.0.2:8099 (i started code-server in termux on android with code-server --bind-addr 10.0.0.2:8099 --auth none but i get the error in my web browser that 10.0.0.2:8099 took to long to respond. if i try to ping 10.0.0.2 i get destination host unreachable.

so i am unsure how to get connectivity with my code server that is hosted in termux on my android device

rom1v commented 10 months ago

10.0.2.2 on the computer is just an alias for 127.0.0.1 on the device.

So on the device, you should really use 127.0.0.1. In your code, probably something like:

code-server --bind-addr 127.0.0.1:8099 --auth none
james28909 commented 10 months ago

i will try this shortly. thanks for the quick response.