mediachain / concat

Mediachain daemons
MIT License
42 stars 13 forks source link

Setup ifconfig server, with fallback to public service #83

Closed vyzo closed 7 years ago

vyzo commented 7 years ago

The IP auto-detection implementation utilizes a public ip lookup service: initially ifconfig.me, which proved unreliable, and as of #82 ifconfig.co.

The code behind ifconfig.co is available at https://github.com/martinp/ipd, so we can easily setup and run our own ifconfig server at ifconfig.mediachain.io. We can then use it as primary, with fallback to the public server.

parkan commented 7 years ago

So just for fun I adapted ipd to be 1-click Heroku deployable and set up an instance at https://evening-journey-25199.herokuapp.com/

See https://github.com/parkan/ipd

Can setup an alias or w/e, presumably we want it to be https tho

parkan commented 7 years ago

Can drop in cert from letsencrypt or w/e for custom name too https://blog.heroku.com/announcing_heroku_free_ssl_beta_and_flexible_dyno_hours

vyzo commented 7 years ago

i don't think we care about https for this.

parkan commented 7 years ago

@jessewalden can you CNAME ifconfig.mediachain.io to mediachain-ifconfig.herokuapp.com?

vyzo commented 7 years ago

Is this actually any more reliable than using ifconfig.co?

parkan commented 7 years ago

@vyzo at least if it fails, it is our fault

parkan commented 7 years ago

hmm though ifconfig.co is also on heroku so maybe not

jessewalden commented 7 years ago

done

parkan commented 7 years ago
[master//aleph]% curl ifconfig.mediachain.io
67.244.113.119

nice

vyzo commented 7 years ago

ok, will open a PR for using it.