Inet256
Identity Based Network API with 256-Bit Addresses
Install / Use
/learn @inet256/Inet256README
INET256
<img src="https://discord.com/assets/cb48d2a8d4991281d7a6a95d2f58195e.svg" width="80">
A 256 bit address space for peer-to-peer hosts/applications.
The value proposition:
All you have to know to send messages to another process is its address, which will never change.
All you have to do to recieve messages is generate a private, public key pair and connect to the INET256 daemon
The INET256 API and Address Spec: Spec
The architecture of the reference implementation: Mesh256
Documentation for the daemon's config file: Daemon Config
Features
- Stable addresses derived from public keys
- Secure communication to other nodes in the network
- Best-effort delivery like IP or UDP. At-most-once delivery, unlike IP and UDP.
- Messages are never corrupted. If it gets there, it's correct.
- Easy to add/remove/change routing algorithms.
- Addresses are plentiful. Spawn a new node for each process. Every process gets its own address, no need for ports.
- Daemon can run without root or
NET_ADMINcapability. - IPv6 Portal for IPv6 over INET256. Exposed as a TUN device. (requires
NET_ADMIN). - Autopeering and transport address discovery help make peering easy.
Getting Started
Running with Systemd
Install the inet256 binary to /usr/local/bin/inet256
Install the systemd unit files
$ just install-systemd
Start the service
$ systemctl start inet256
Running with Docker
First build the docker image
$ just docker
Then create the configuration files
$ mkdir myconfig
$ inet256 create-config > myconfig/config.yml
$ inet256 keygen > myconfig/private_key
Finally, run docker container.
$ docker run -it --rm --net=host -v ./myconfig:/config:ro inet256:local
Mesh256
The reference implementation of an INET256 Service, which lives in this repository, is called mesh256.
It uses a distributed routing algorithm to allow nodes on the network to discover paths between one another.
Network Routing Protocols
The autoconfiguring, distributed routing algorithms of the sort required are under active research, and we don't want to couple mesh256 to any one algorithm as the state of the art could change rapidly.
Users are ultimately in control of which networks they participate in. Networks can be selected in the configuration file.
We are eager to add other protocols.
Check out networks/beaconnet for an example of simple routing protocol. It's a good place to start.
Utilities/Applications
This project provides tools for using INET256 networks, some of which are not yet implemented
- [x] IPv6 Portal (TUN Device). Similar to CJDNS and Yggdrasil.
- [ ] IPv4 VPN, declarative mappings from INET256 -> IPv4. similar to WireGuard.
- [x] netcat. Send newline separated messages to other nodes:
inet256 nc. - [x] echo. A server to echo messages back to the sender:
inet256 echo. - [x] Central Discovery Server to keep track of roaming peers.
inet256 central-discovery
Code Tour
-
pkg/inet256API definitions. Mostly things required by the spec. -
pkg/mesh256The reference implementation of an INET256 Service. -
pkg/inet256dThe daemon that manages setting up transports, autopeering, discovery, the actual INET256 service, and the HTTP API. -
pkg/inet256ipv6Logic for bridging INET256 to IPv6. Includes the IPv6 portal. -
pkg/inet256testA test suite for Network implementations. -
pkg/autopeeringAutopeering interface definition and implementations -
pkg/discoverydiscovery interface definition and implementations -
networks/Network implementations, routing logic is in these. -
client/Client implementations, these connect to the daemon.
License
Code in this repository is by default licensed under the GPL as defined in LICENSE.
Some of the sub-directories contain their own LICENSE files for the LGPL, or MPL as defined therein.
That license applies to the sub-directory.
In summary: you should be able to import an INET256 client in a language of your choice and do whatever you want. But other than clients, the implementation is strongly copyleft.
Related Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
