SunLionet is an offline-first, bundle-based privacy and resilient communication system designed for high-risk, restricted networks.
It ships as:
Migration note: this repository is still named SUNLIONET-agent during the transition. Some paths, package imports, release artifacts, and protocol identifiers may still use legacy SUNLIONET-* naming until the release pipeline is fully renamed.
Documentation site (GitHub Pages): https://kaveh8866.github.io/Sunlionet/
Persian: see README.fa.md.
Start here: docs/getting-started.md.
It covers the three first-time paths:
Prerequisites:
Run tests:
Windows:
.\scripts\run_tests.ps1
Linux/macOS:
./scripts/run_tests.sh
Prerequisites:
sing-box installed, or pass --sing-box-binRun the Linux MVP path (import -> select -> render -> execute):
go run ./cmd/inside \
--state-dir ./.tmp/state \
--import ./testdata/sample.bundle \
--master-key 0123456789abcdef0123456789abcdef \
--trusted-signer-pub-b64url "$(cat ./testdata/sample_signer_pub.b64url)" \
--age-identity "$(cat ./testdata/sample_age_identity.txt)"
Render only (no process launch):
go run ./cmd/inside \
--state-dir ./.tmp/state \
--import ./testdata/sample.bundle \
--master-key 0123456789abcdef0123456789abcdef \
--trusted-signer-pub-b64url "$(cat ./testdata/sample_signer_pub.b64url)" \
--age-identity "$(cat ./testdata/sample_age_identity.txt)" \
--render-only
SunLionet is designed for long-term resilience and community-driven maintenance.
This repository produces two binaries using Go build tags.
go build -tags inside -ldflags="-s -w" -o bin/sunlionet-inside ./cmd/inside/
./bin/sunlionet-inside
go build -tags outside -ldflags="-s -w" -o bin/sunlionet-outside ./cmd/outside/
./bin/sunlionet-outside
SunLionet intentionally avoids a central fetch API. Seed configs arrive via:
snb://v2: bundles.Bundle parsing/validation lives in pkg/importctl and pkg/bundle.
Inside devices can be seized. Design goals:
For the detailed threat model and dual-agent design, see /docs.
Generate keys:
go run -tags outside ./cmd/outside keygen \
--ed25519-priv ./keys/outside.ed25519 \
--ed25519-pub ./keys/outside.ed25519.pub \
--age-identity ./keys/inside.agekey \
--age-recipient ./keys/inside.agepub
Generate a bundle:
go run -tags outside ./cmd/outside \
--profiles ./profiles.json \
--templates-dir ./templates \
--signing-key ./keys/outside.ed25519 \
--recipient-pub ./keys/inside.agepub \
--out ./dist
Verify a bundle:
go run -tags outside ./cmd/outside verify \
--bundle ./dist/bundle.snb.json \
--signer-pub ./keys/outside.ed25519.pub \
--age-identity ./keys/inside.agekey \
--require-decrypt
Verify directly from URI text:
go run -tags outside ./cmd/outside verify \
--uri-file ./dist/bundle.uri.txt \
--signer-pub ./keys/outside.ed25519.pub \
--age-identity ./keys/inside.agekey \
--require-decrypt
Distribution helpers:
./dist/manifest.json is machine-readable (includes bundle SHA-256 and URI size hints)./dist/qr_payload.txt is written only if the URI is small enough (--qr-threshold-chars)./dist/bundle.chunks.txt is written only if the URI exceeds --chunk-threshold-chars (SNBCHUNK/1 lines)See:
--signing-key (Ed25519 seed base64url) or run keygen.--allow-plaintext or set --recipient-pub for encryption.--templates-dir points at ./templates and your profiles’ template_ref matches an existing *.json template.--age-identity, and use --require-decrypt in CI to fail closed.See CONTRIBUTING.md.