|Loki Verloren 2c676c072d first commit||2 months ago|
|.idea||2 months ago|
|go.mod||2 months ago|
|go.sum||2 months ago|
|machinename.go||2 months ago|
|readme.md||2 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.