simple one function library that creates and interprets special URLs for use in mDNS lans and p2p networks
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Loki Verloren 2c676c072d
first commit
4 months ago
.idea first commit 4 months ago
go.mod first commit 4 months ago
go.sum first commit 4 months ago
machinename.go first commit 4 months ago first commit 4 months ago


This is a simple library that can be called to generate a special url for p2p networks of cryptocurrency servers to use as identifiers, it contains the network id of the cryptocurrency network, an optional human readable node identifier, an optional subnetwork name that nodes understand to mean to connect only to nodes with that same subnetwork name (for testing purposes ), and acquires a network port automatically which can be used with the IP address to contact it.

In the data structure it creates, it records a lan address and finds the external IP and if the two match it records that the machine should not use mDNS broadcast for LAN peer discovery. There may be other uses for automatic detection of being on a LAN or not but that is what it was written for.