cloudflare-ddns icon indicating copy to clipboard operation
cloudflare-ddns copied to clipboard

Add the "interface" method to get public IP

Open kaoet opened this issue 7 years ago • 2 comments

Some ISPs do NAT on the way to public IP discovery services like icanhazip.com.

This MR adds a new method to get public IP, which is to get it from IP of primary interface directly.

kaoet avatar Mar 04 '18 09:03 kaoet

Hey, thanks for your contribution.

So if I understand, it'll work for devices which are not behind a NAT?

adrienbrignon avatar Mar 05 '18 22:03 adrienbrignon

Yes. I have a globally routable IPv4 address on my router. But my ISP is really bad. There is NAT on the way to some websites, including icanhazip.com. I can't get correct IP with them.

kaoet avatar Mar 06 '18 02:03 kaoet