yttrium,
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.
uhmmmmm.....
not exactly an easy job !!
Fab