yarrick / iodine

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

iodined.c: Fix automatically get external ip (-n auto) #18

Closed grandpaul closed 4 years ago

grandpaul commented 8 years ago

Dear iodine maintainers,

I implement the -n auto to get external ip through STUN protocol. Please review this patch and see if it is good.

This patch isn't important now because I just noticed that you fix the problem I met in Debian. In Debian, -n auto doesn't work because externalip.net is off. But you've already fix that.

But I still think using STUN might be good because it is quite common and standard.

Many Thanks, Paul

yarrick commented 8 years ago

If it still need some specific server to be reachable I don't really see the upside of this.

grandpaul commented 8 years ago

But stun server is more generic since its protocol is RFC 3489. That means there are many public STUN servers. Like the lists: https://gist.github.com/zziuni/3741933

Using web services is good but many of them are not quite standard. That means, if one shuts down, you pick another, and needs to change the code.

jiquera commented 7 years ago

Actually wouldn't it make more sense to use a dns service like myip.opendns.com for this? We need open DNS ports anyway and now we don't rely on anything else

yarrick commented 4 years ago

Changed to lookup via OpenDNS: https://github.com/yarrick/iodine/commit/2032b44949d7628480ea92463bee8d2c45e7bd2b