Sunlionet

SunLionet

SunLionet

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.


Getting Started (MVP)

Start here: docs/getting-started.md.

It covers the three first-time paths:

Quick Start (Development)

Prerequisites:

Run tests:

Linux MVP (Inside)

Prerequisites:

Run 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

Project Stewardship

SunLionet is designed for long-term resilience and community-driven maintenance.


Build

This repository produces two binaries using Go build tags.

SunLionet Inside

go build -tags inside -ldflags="-s -w" -o bin/sunlionet-inside ./cmd/inside/
./bin/sunlionet-inside

SunLionet Outside

go build -tags outside -ldflags="-s -w" -o bin/sunlionet-outside ./cmd/outside/
./bin/sunlionet-outside

Config Distribution (Outside → Inside)

SunLionet intentionally avoids a central fetch API. Seed configs arrive via:

  1. Signal disappearing messages: signed/encrypted snb://v2: bundles.
  2. QR codes (in-person bootstrap).
  3. Local Bluetooth mesh (Inside ↔ Inside) for blackout scenarios.

Bundle parsing/validation lives in pkg/importctl and pkg/bundle.


Security Model (Summary)

Inside devices can be seized. Design goals:

For the detailed threat model and dual-agent design, see /docs.

Documentation

SunLionet Outside (MVP usage)

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:

See:

problems_and_diagnostics

Contributing

See CONTRIBUTING.md.