Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/ohookins/upnp_tunnel_updater

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/ohookins/upnp_tunnel_updater

  • v0.0.0-20170612132232-d02de4622a51
  • Source
  • Go
  • Socket score

Version published
Created
Source

UPnP-based tunnelbroker.net endpoint updater

Hurricane Electric offers free IPv6 over IPv4 tunnels, but requires the endpoint to be aware of your own IPv4 endpoint in order for the tunnel to operate (which makes perfect sense - it is an IP-based tunnel which has no awareness of connections and needs to know where to forward inbound packets).

If you are on a dynamic IP address (especially one that changes as frequently as mine), this poses a small problem. There are a variety of methods available to you such as Dynamic DNS updaters, adding shell scripting to a field in your router if it is Linux-based, etc. Actually there is no shortage of solutions at all. I chose to implement something using Universal Plug'n'Play for several reasons:

  • My router's ability to run DynDNS updating scripts is fairly limited, and quite unreliable.
  • I cannot (easily) have a script running that updates both my tunnel broker endpoint and actual DynDNS.
  • It seems unnecessary to have to go out to the internet (e.g. one of the many "what is my IP"-style sites) just to figure out your public address.
  • I wanted to learn about UPnP.
  • There's always time for more Go programming.

References

Building

  • Download and configure Golang (at least 1.2 recommended)
  • go fmt; go build

Running

./upnp_tunnel_updater \
  -user-id=<USERID> \
  -password=<PASSWORD> \
  -tunnel-id=<TUNNEL_ID>

You can also specify -noop to find the IP but not update the Tunnelbroker configuration.

A local cache file will be saved (named by default .upnp_tunnel_updater.cache) in the current directory, with the current IP address. This will be checked on each run to avoid making unnecessary updates to the Tunnelbroker config.

TODO

  • Subscribing to the event endpoint and remaining resident for continuous updates.
  • Code cleanup.

FAQs

Package last updated on 12 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc