Document ID: DEV-001
Status: Active
Version: v1.16.0
Updated: 2026-11-29
RelayLink/
├── README.md English product overview and doc entry
├── README.zh-CN.md Chinese product overview and doc entry
├── AGENTS.md Repository-level agent collaboration rules
├── CONTRIBUTING.md Contributor and commit guidelines
├── Directory.Build.props Solution-wide .NET 10 build, analyzer, and SemVer defaults
├── NuGet.Config NuGet package source configuration
├── RelayLink.slnx Solution file
├── .editorconfig Formatting baseline
├── .gitattributes Line-ending rules
├── .gitignore Local artifact and secret exclusions
├── .github/workflows/ GitHub Actions CI, Release, and Pages workflows
├── website/ GitHub Pages product and docs static site source
│ └── en/ Native English docs source tree (guides/ and docs/)
├── docs/
│ ├── README.md Documentation index
│ ├── research/ Research reports and technical evaluations
│ ├── requirements/ Requirements and acceptance criteria
│ ├── design/ Technical designs and protocol specifications
│ ├── adr/ Architecture Decision Records
│ ├── development/ Development and documentation policies
│ ├── operations/ Installation and operations guides
│ ├── testing/ Verification status and test evidence
│ ├── releases/ Version release notes
│ └── intro/ External presentation sources, assets, and build scripts
├── src/
│ ├── RelayLink.Protocol/ Wire protocol (v3-v5), DTOs, error codes, SemVer, platform probe, update helpers
│ ├── RelayLink.Transport/ TLS, framing, UDP encapsulation, duplex pump, and P2P direct primitives
│ ├── RelayLink.Logging/ Serilog file logging, level splitting, and rolling retention
│ ├── RelayLink.AdminWeb/ React/TypeScript Server Admin Web UI source
│ ├── RelayLink.AgentWeb/ React/TypeScript Agent local Web UI source
│ ├── RelayLink.Agent.ConfigMigrator/ Standalone pre-start Agent configuration migrator
│ ├── RelayLink.AutomationClient/ Shared Automation HTTP and ECDSA proof client for CLI
│ ├── RelayLink.Cli/ AI automation command-line tool (relaylink)
│ ├── RelayLink.Sdk/ C#/.NET data-plane discovery and connection SDK (netstandard2.0/net8.0/net10.0)
│ ├── RelayLink.Server/ Linux/Windows Server, dashboard, admin API, STUN, and automation surface
│ └── RelayLink.Agent/ Windows/Linux/macOS Agent service and local loopback dashboard host
├── sdk/ Python, TypeScript, Go, Java, Rust data-plane SDKs (6 languages with RelayLink.Sdk)
├── skills/relaylink-admin/ Operations agent skill shipped with CLI distributions
├── contract/ Automation OpenAPI spec, error/exit code maps, conformance fixtures
├── tests/ Unit and integration test suites
│ ├── RelayLink.UnitTests/ Config, framing, state machines, P2P policy, tokens, updates, and SDK tests
│ ├── RelayLink.IntegrationTests/ Real TCP/TLS, P2P direct, HTTP, CLI, fault, and SQL integration tests
│ └── Support/ Shared test fixtures and private directory helpers
├── tools/ Simulated target and caller executables
│ ├── RelayLink.SimulatedCaller/ Simulated business caller
│ └── RelayLink.SimulatedTarget/ Simulated private target
├── config/examples/ Sanitized committable config examples (*.example.json)
├── deploy/ Platform deployment templates and guides
│ ├── docker/ Server container image, Compose files, and guide
│ ├── linux/ Linux systemd unit templates and guide
│ ├── macos/ macOS launchd plist, wrapper script, and guide
│ └── windows/ Windows Server/Agent service scripts and Inno Setup installer
└── scripts/ Build, verification, publish, and website generation scripts
Directory Ownership
- P2P Direct and Relay Fallback (DES-011) modules:
src/RelayLink.Server/Runtime/hosts server-side control coordination, persistent direct lease occupancy recovery, and the optional STUN responder:DirectLeaseStore.cs,PeerDirectSession.cs, andStunServerService.cs.src/RelayLink.Agent/hosts Agent candidate exchange, probe coordination, and lease renewal:PeerDirectAgentAttempt.cs.src/RelayLink.Transport/hosts direct transports, probe policy, mutual binding authentication, STUN wire protocol, and suspend-aware monotonic clock:PeerQuicDirectTransport.cs,PeerPlainTcpDirectTransport.cs,PeerProbePolicy.cs,PeerDirectAuth.cs,StunProtocol.cs, andSuspendAwareClock.cs.
- HTTP/HTTPS Reverse Proxy (DES-008): The virtual HTTP host and YARP forwarder live in
src/RelayLink.Agent/HttpProxyRuntime.cs;PeerApplicationStreaminRelayLink.Transportunwraps inner peer TLS application records;RelayLink.Protocoldefines v5 HTTP options, ingress context, and status messages;RelayLink.Serverhandles centralized config, version/readiness checks, and relay pairing. Business HTTP virtual ingresses open no OS listening socket and stay separate from local status dashboards. See HTTP Reverse Proxy Guide and HTTP Verification. - Agent Local Web UI (AgentWeb): Provides clickable browser URLs and URL copy for ready HTTP/HTTPS peer entries, and loopback
127.0.0.1:<port>address copy for raw TCP and unicast UDP entries (the former raw TCP "Connection Methods" dropdown was removed under REQ-001Q). It also displays routing policy badges, active direct transport paths (direct_quic/direct_tcp/relay), and assisted-update banners per DES-004. - Shared Library Boundaries: The solution root uses
RelayLink.slnxand per-project.csprojfiles. Shared libraries must never depend onServerorAgent, andProtocolmust not depend on host abstractions. Aside from system path inspection needed for shared update platform detection, directory permission checks, and external upgrade command helpers,Protocolperforms no host filesystem I/O or config file loading. - File Logging: Server and Agent share file logging policy through
RelayLink.Logging; each component chooses its directory and filename prefix, and the logging library has zero dependencies on protocol types, runtime configuration, or business payloads. - Assisted Updates (DES-012): Shared SemVer parsing and external command generation live in
src/RelayLink.Protocol/; Server release polling, caching, leases, and endpoints live insrc/RelayLink.Server/Runtime/(GitHubReleaseClient.cs,UpdateCacheStore.cs,UpdateCheckService.cs,UpdateDownloadRegistry.cs) andUpdateEndpoints.cs; Agent download coordination and rate-limited transfer live insrc/RelayLink.Agent/AgentUpdateCoordinator.csandAgentUpdateDownloads.cs. - Configuration and Deployment Templates:
config/examples/stores sanitized examples named*.example.json. Real deployment configurations belong outside the repository; any temporary local config needed during testing must live in the git-ignored.local/directory.deploy/holds executable deployment templates (docker/,linux/,macos/,windows/), whiledocs/design/explains policy so duplicate templates are never maintained in two places. - Scripts, Tools, and CI:
scripts/contains repeatable development, packaging, website build, and local acceptance scripts; scratch files go into git-ignoredwork/, and build outputs go into git-ignoredartifacts/..github/workflows/holds daily CI validation, tag releases, and GitHub Pages deployment without real secrets or credentials; see CI Pipeline.tools/contains standalone simulated caller and target executables with zero runtime dependency from Server or Agent. - Product Website and Multilingual Docs (
website/andwebsite/en/):website/contains the GitHub Pages template, social preview image (og-image.png), AI agent installation instructions (install.md/install.zh-CN.md), content catalog (content.json), quick-start fragments (quickstart.html), English UI and release note translations (locale.js,release-translations.en.json), locked npm dependencies, and site tests (tests/site.test.mjs).website/en/holds native English documentation (website/en/guides/andwebsite/en/docs/) mapped viasourceEnincontent.json. Note thatscripts/build-website.mjsresolves relative links inwebsite/en/entries against the directory of their corresponding Chinesesourcefile so cross-references todocs/and repository files resolve uniformly. Build output lands in git-ignoredartifacts/site/with Chinese at root and English under/en/; see Website Maintenance. - External Presentation Sources:
docs/intro/is the sole location for slide decks and launch articles, withpages.jsonas page source; generated PPTX and figures are committed while.build/,.cache/,.slidep/, andlegacy-bak/are excluded by the local.gitignore. - Standalone Frontend Bundles: Server Admin UI source lives in
src/RelayLink.AdminWeband Agent local UI source lives insrc/RelayLink.AgentWeb; generateddist/directories are not committed and are copied intowwwroot/during Server and Agent build/publish for same-origin Kestrel hosting; see ADR-0004 and ADR-0021. - AI Automation and 6-Language SDKs: The automation surface lives in
src/RelayLink.Server/Automation/(config section, pairing, tokens, ECDSA device proof, change requests, store) with HTTP endpoints insrc/RelayLink.Server/AutomationEndpoints.cs, sharing the same process state, write lock, audit store, and config editors. The CLI lives insrc/RelayLink.Cli/(relaylink), the shared automation client lives insrc/RelayLink.AutomationClient/, and the C#/.NET data-plane SDK lives insrc/RelayLink.Sdk/(BCL-only—it never referencesRelayLink.Protocol, which targetsnet10.0only). The other five data-plane SDKs (Python, TypeScript, Go, Java, Rust) live insdk/.contract/holds the OpenAPI spec, error/exit code maps, and cross-language conformance fixtures as the single source of truth;skills/relaylink-admin/provides the operations agent skill (SKILL.md,references/, andscripts/relaylink.mjs). See DES-010.
Naming
Projects, assemblies, and namespaces use the RelayLink prefix. Linux deployment paths use /opt/relaylink and /etc/relaylink, with recommended service account relaylink. The wire magic NTP1 is part of the original protocol design and must not be silently renamed; any future change requires updating the protocol specification and compatibility notes.