Comment by Uptrenda

1 day ago

In network code: most people just let the OS choose a default adapter. It works fine, but it makes it hard to write software that works across machines with either (1) multiple NICs (and/or networks they point to.) or (2) multiple external Internet IPs. Look at STUN, for example.

A STUN server that lets people test what type of NAT they have uses two IPs. For such a server you have to manually specify the addresses to bind on to make for sure its setup right. As it goes, writing network software to do simple things like "bind on all local addresses", "bind publicly", "bind on all", is harder than it sounds. There are edge cases on different OSes and address families, so manually managing IPs is hard to do.

My network software lets devs easily manage NICs and routes they support without guessing about addressing. Additionally, I've written a bunch of software with the library already to do things like NAT traversal. So its really my own redesign of how to do networking on the Internet. Designed to hide a lot of the messiness. I'm still improving code quality so it's not ready yet. But I've been dog fooding with a lot of software written in it and smashing bugs every day.

Project page: https://github.com/robertsdotpm/p2pd Built this recently with it: http://ovh1.p2pd.net:8000/servers (server monitor for public STUN, TURN, MQTT, and NTP servers. Only checks every 4 hours to avoid spamming them though.)