I would like to create a proxy server that should run on an Android device with the enabled tethering.
The goal should be that every user that want to navigate through this device must see first a web page where he must type in an username and a password,
just like a opened free public access point where you must register to navigate.
Does somebody know if it's possible to do with B4A?
You haven't idea on how it can do the routing to the selected host ?
I would integrate a web server into the Android app, not to route to another website...
Anyway, thanks a lot for your job !
Regards
Fabrizio
On the contrary, just look at what Adblock Plus did.
It would probably require hosting a small web server, having superuser privileges, and editing a host file to redirect everything through your web server, which, when logged in, would act as a proxy.
I think that isn't enough an host file editing because the goal is to give internet access through the tethering .
I think that is necessary to "insert" something into the TCP protocol that filter the traffic.... something like a firewall .... who redirect any internet request coming from the wifi (tethering) to the internal (localhost) webserver just until the user don't give a valid username/password.
Then the proxy can forward his traffic from wifi to cellular network.
I think that isn't enough an host file editing because the goal is to give internet access through the tethering .
I think that is necessary to "insert" something into the TCP protocol that filter the traffic.... something like a firewall .... who redirect any internet request coming from the wifi (tethering) to the internal (localhost) webserver just until the user don't give a valid username/password.
Then the proxy can forward his traffic from wifi to cellular network.
Maybe you don't understand. Let me draw a diagram of how every other service in the world does it:
Device >--Wifi--> Host device (Phone) >--Hosts file redirect--> Login server (app hosted on phone) >--When logged in--> Internet
Every time something requests data through the login server, the login server checks to see if the user is validated and logged in, based on IP. If not, it shows them a login page, if so, then it handles the request.
ok, I agree but if we modify the hosts file, when the "login server" try to access the internet, its request are filtered again by the host file (that act at TCP level) .... that redirect the traffic to itself (to the login server) due to the rules inside the file... or not ??