diff --git a/.gitignore b/.gitignore index d74d08d..9833871 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,15 @@ +# macOS .DS_Store +# Build /target + +# Editor/IDE +*.swp +*.swo +*~ +.vscode/ +.idea/ + +# Claude Code +.claude/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e311d6a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,33 @@ +# Contributing to FIPS + +## Getting Started + +Clone the repo and verify your setup: + +``` +git clone https://github.com/jmcorgan/fips.git +cd fips +cargo build +cargo test +``` + +Read [docs/design/](docs/design/) for protocol understanding, starting with +[fips-intro.md](docs/design/fips-intro.md). + +## Filing Issues + +- Search existing issues before opening a new one. +- Include FIPS version, Rust version, and OS. +- For bugs: steps to reproduce, expected vs actual behavior. + +## Pull Requests + +- All PRs must pass `cargo build`, `cargo test`, and `cargo clippy` with no + warnings. +- Keep commits focused — one logical change per commit. +- Add tests for new functionality. +- Reference relevant design docs if the change touches protocol behavior. + +## Questions + +Open a GitHub issue for design or implementation questions. diff --git a/Cargo.toml b/Cargo.toml index 18fcce1..68de178 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,11 @@ name = "fips" version = "0.1.0" edition = "2024" +description = "A distributed, decentralized network routing protocol for mesh nodes connecting over arbitrary transports" +license = "MIT" +authors = ["Johnathan Corgan "] +repository = "https://github.com/jmcorgan/fips" +readme = "README.md" [dependencies] secp256k1 = { version = "0.30", features = ["rand", "global-context"] } diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7bf9e15 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Johnathan Corgan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..3b7ec94 --- /dev/null +++ b/README.md @@ -0,0 +1,92 @@ +# FIPS: Free Internetworking Peering System + +A distributed, decentralized network routing protocol for mesh nodes +connecting over arbitrary transports. + +> **Status: Experimental / Pre-release** +> +> FIPS is under active development. The protocol and APIs are not stable. +> Expect breaking changes. + +## Overview + +FIPS is a self-organizing mesh network that operates natively over a variety +of physical and logical media — local area networks, Bluetooth, serial links, +radio, or the existing internet as an overlay. Nodes generate their own +identities, discover each other, and route traffic without any central +authority or global topology knowledge. + +FIPS uses Nostr keypairs (secp256k1/schnorr) as native node identities, +making every Nostr user a potential network participant. Nodes address each +other by npub, and the same cryptographic identity used in the Nostr ecosystem +serves as both the routing address and the basis for end-to-end encrypted +sessions across the mesh. + +## Features + +- **Self-organizing mesh routing** — spanning tree coordinates and bloom + filter candidate selection, no global routing tables +- **Multi-transport** — UDP/IP overlay today; designed for Ethernet, + Bluetooth, serial, radio, and Tor +- **Noise encryption** — hop-by-hop link encryption plus independent + end-to-end session encryption +- **Nostr-native identity** — secp256k1 keypairs as node addresses, no + registration or central authority +- **IPv6 adaptation** — TUN interface maps npubs to fd00::/8 addresses for + unmodified IP applications +- **Metrics Measurement Protocol** — per-link RTT, loss, jitter, and goodput + measurement +- **Zero configuration** — sensible defaults; a node can run with no config + file + +## Quick Start + +### Requirements + +- Rust 1.85+ (edition 2024) +- Linux (TUN interface requires `CAP_NET_ADMIN` or root) + +### Build + +``` +git clone https://github.com/jmcorgan/fips.git +cd fips +cargo build --release +``` + +### Run + +``` +# With default configuration (ephemeral identity, default ports): +sudo ./target/release/fips + +# With a configuration file: +sudo ./target/release/fips -c fips.yaml +``` + +See [docs/design/fips-configuration.md](docs/design/fips-configuration.md) for +the full configuration reference. + +### Multi-node Testing + +See [testing/](testing/) for Docker-based integration test harnesses including +static topology tests and stochastic chaos simulation. + +## Documentation + +Protocol design documentation is in [docs/design/](docs/design/), organized as +a layered protocol specification. Start with +[fips-intro.md](docs/design/fips-intro.md) for the full protocol overview. + +## Project Structure + +``` +src/ Rust source (library + daemon binary) +docs/design/ Protocol design specifications +testing/ Docker-based integration test harnesses +benches/ Criterion benchmarks +``` + +## License + +MIT — see [LICENSE](LICENSE).