yarrick / iodine

Official git repo for iodine dns tunnel
https://code.kryo.se/iodine
ISC License
6.26k stars 508 forks source link

External IP deduction doesn't work #78

Closed dmitrmax closed 2 years ago

dmitrmax commented 2 years ago

Hi! The source code tries to resolve external IP of server by using API of api.externalip.net which is no longer available. It is no problem to replace it with another service's URL. But why do it at all? Why can't we use DNS to find out NS record responsible for the given domain and then retrive A record for it? I cannot figure out the case where external IP doesn't match the IP in A-record for the nameserver. Do you?

yarrick commented 2 years ago

The code in git uses myip.opendns.com since 2032b44949d7628480ea92463bee8d2c45e7bd2b.

I have been thinking about something similar for the other bug when the server might be asked over IPv6 and needs to know its v4 address.