switch-iot / hin2n

n2n support for mobiles
GNU General Public License v3.0
580 stars 125 forks source link

The gateway configuration not working properly #49

Closed galaxyskyknight closed 2 years ago

galaxyskyknight commented 3 years ago

My top like this,

  1. I have 3 openwrt routers run edge(10.0.0.x on n2n TAP dev) ---- Lan (192.168.x.0-254),
  2. a cloud machie with public ipv4 run supernode and also run an edge(10.0.0.1),
  3. I run hin2n on my Android 11 phone, with specified IP like 10.0.0.7
  4. I configure the gateway and dns in hin2n which pointed to one of openwrt routers TAP dev IP (which is 10.0.0.4)
  5. I counfgure the static route on each openwrt like 192.168.x.0 destination to its corresponding 10.0.0.x IF as next hop, so each Lans behinds routers ping other peer whatever the IP is 10.0.0.x or 192.168.x.0 working well.

however the problem is when I use Android netwokr tools to ping the openwrt router's Lan , it works very wired, it can ping time by time and sometimes it is unreachable , but the 10.0.0.x address can ping well. I not understand even if I have set the gateway and dns pointed to one of openwrt there, why it is not working stable? is the route table changed time by time mysteriously? what is t he mechanism of this on Android?

BTW: is it possible to enhance this app that I can define 3-5 static routers to wan or lan dev like what I could do on a PC, I guess it will resolve the issue above, seems configure a gw there would be problem and not working as desired in most senario.

tz527129804 commented 3 years ago

I think so. Android without root cannot edit routers,so I really need enhanced route function in hin2n,just like use ‘-n ’ in n2n-edge.😀

lucktu commented 2 years ago

Please try the latest one