On 10/19/2015 11:40 AM, Patrik Flykt wrote:
I was thinking of any connection going to e.g. port 80 would be forced
to the locally used x.x.x.1 address on the tether interface. Like an
automatic proxy solution. This can then be refined to work only for a
subset of hosts, by looking up e.g. www.google.fr and setting up a
transparent proxy/captive portal only for those. Besides, using
http://1.2.3.4 would go through unnoticed, as it is already an IP
address :-). device.config is not a proper host name as it does not
exist and ConnMan should respond properly to DNS lookups...
>
That said, reading the contents of e.g. /run/connman/hosts and replying
with those to DNS requests sounds like a decent solution to me.

Yeah, this solution could work, but this won't do the same…

Captive portal should capture *all* DNS requests. Sure, a good captive portal should answer the correct IP and then capture IP traffic as you said, but I don't have internet connectivity here, so I must lie and answer a « false » DNS record (with a TTL=0 so the client shouldn't cache it).

Your solution with a list of « captured domains » isn't a captive portal per se, we don't want to have to restrict which domain or not should be captured, as we just want that any smartphone/computer that connects to our device will have the device's http page as soon as they open their browser…

> But still that would not capture http://216.34.181.45.

Yes, I also have an iptables rule to redirect all port 80 request to the tether interface, but not done in connman for simplicity reasons. It can look to write a patch to do it inside connman if you think that's relevant.


Cheers,

        Patrik


Thanks,

Alexandre

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to