How to redirect local hotspot traffic to webserver I want to redirect all incoming traffic in my android shared hotspot to my local webserver (192.168.43.1:8080), so if anybody connected to me put any url like "www.google.com" will automatically be redirect to "192.168.43.1:8080", I do have root access, what should I do to accomplish this?
What you are talking about is called captive portal. On android this can be done by loading our own configuration file for dnsmasq. I made an a minimal UI app for this purpose. You can find it on XDA : https://forum.xda-developers.com/android/general/guide-setup-fake-captive-portal-android-t4011689
If you are android developer, please help us to improve the app.
And also this app requires root permission.