BYDLO — Bypass Your Digital Limitations Online. One app. Every protocol.
This file is the single instruction file for coding agents working on this repository.
Never create AGENTS.md or any other parallel instruction file.
Contributors' machines may depend on their current network setup (existing VPNs, mesh networks, remote access). Development work must never break the developer's connectivity.
Agents MUST NOT, under any circumstances:
- Run Zapret,
winws.exe, WinDivert, Flowseal strategies (general*.bat,service.bat) or their tests. - Run real VPN tunnels or proxies (sing-box, Xray, WireGuard, AmneziaWG, OpenVPN, tg-ws-proxy) for testing.
- Change routes, DNS, network interfaces, firewall,
hosts, system proxy settings or drivers. - Stop, restart or reconfigure VPN / mesh-network clients already installed on the machine.
- Install or remove system network services.
- Run any command or script that could break the current connection.
- Automatically verify that a censorship-bypass method works.
Allowed: reading docs, reading source code, fetching dependencies, static analysis, compiling, and isolated tests that do not touch system networking.
Before any .NET / NuGet / Python command, load scripts/env.ps1 or scripts/env.sh.
Keep BYDLO_SAFE_DEV=1 throughout agent work. For every UI / flow run, explicitly pass --mock
(or set BYDLO_MOCK=1); do not rely on a saved preference. Build and run isolated tests only.
Never execute the user commands that clear the safety flags as part of agent verification.
README.md and docs/BUILD.md document a separate manual workflow: no env.*, no --mock,
no BYDLO_MOCK=1 or BYDLO_SAFE_DEV=1, and the saved Mock Mode switch turned off.
Fresh settings default to real adapters. Only the maintainer verifies real connectivity.
BYDLO_DATA_DIR selects the settings directory; clearing it leaves development data intact and
returns to the normal user data directory, whose saved mock preference must also be checked.
Do not weaken the guard or force mock in normal entry points to reconcile these workflows.
Safety mechanisms in the code base (keep them working):
BYDLO_SAFE_DEV=1(set byscripts/env.sh/scripts/env.ps1and by every hook) makesNetworkSafetyGuardrefuse to launch any real engine or privileged operation.- Mock Mode (
--mockflag,BYDLO_MOCK=1, or Settings → Advanced) replaces every engine withMockEngine. Use it for every UI / flow test. Mock Mode is a test tool, never a feature claim. - Unit tests use
FakeProcessRunnerand fake HTTP handlers. Tests must never spawn engines.
If a test could possibly affect the connection — do not run it. The maintainer runs real network tests manually.
src/Bydlo.Core Shared business logic: models, import, config builders, engines API,
connection manager, mock engine, security, process supervision.
src/Bydlo.Engines Real engine adapters (sing-box, Xray, WireGuard, AmneziaWG, OpenVPN,
Zapret (Flowseal), TgWsProxy (Flowseal)) + engine installer.
src/Bydlo.Platform Platform services: paths, secret storage, privileges, system proxy.
src/Bydlo.App Cross-platform Avalonia UI (views, view models, themes, localization).
src/Bydlo.Desktop Desktop head (Windows / Linux / macOS).
tests/Bydlo.Tests Isolated unit tests (no network, no processes).
engines/engines.lock.json Pinned third-party engine versions + SHA-256 digests.
flake.nix, nix/ Nix flake: package, NixOS module, dev shell, NuGet lock (nix/deps.json).
packaging/ Linux distribution files: .deb/AppImage assets, Arch PKGBUILDs.
docs/ Architecture, build, compatibility, testing, roadmap.
scripts/ Environment + build/check scripts (bash and PowerShell).
.claude/ Agent skills, hooks, settings (see .claude/README.md).
Dependency direction: App → Engines → Platform → Core; Core depends on nothing project-local.
UI never talks to processes directly — only through ConnectionManager.
- Never hardcode absolute paths, drive letters or the repository location. Resolve everything relative to the checkout.
- Temporary files:
<repo>/.tmp/. Build output stays inside the project (bin/,obj/,artifacts/). - Before using .NET / NuGet / Python, run
source scripts/env.sh(bash) or. ./scripts/env.ps1(PowerShell). They setTMP,TEMP,TMPDIR,DOTNET_CLI_HOME,NUGET_PACKAGES, NuGet caches, pip cache andBYDLO_SAFE_DEV=1for the current shell only. - Do not install tools globally, change persistent environment variables, write agent memory to the user profile, create files in system directories, or delete foreign files/caches without explicit permission.
source scripts/env.sh
./scripts/check.sh # restore + build (Release) + tests, never runs enginesPowerShell: . ./scripts/env.ps1; ./scripts/check.ps1.
Android is not part of v0.1 (planned; see docs/ROADMAP.md).
- Every network technology is an
IEngineadapter registered inEngineRegistry. Adding a protocol = new parser + builder/adapter + registry entry + tests + compatibility-matrix row. - Profiles hold non-secret options only. Secrets (UUIDs, passwords, private keys, raw WG/OVPN configs) live in
ISecretStore. - Never log secrets. All engine output passes through
LogRedactor. - Privileged operations (TUN, tunnel services, WinDivert, system proxy, DNS, routes) go through
IPrivilegedOperations/ISystemProxyServiceand are guarded byNetworkSafetyGuard. They are disabled by default and never activated during development. - Downloaded engines must match the SHA-256 in
engines/engines.lock.json(IntegrityVerifier). - Do not claim support for a feature on a platform where it is not implemented. Unimplemented paths return
EngineAvailability.NotImplementedand the UI must say so. Keepdocs/COMPATIBILITY.mdtruthful. - Prefer stable upstream implementations (Flowseal Zapret, Flowseal tg-ws-proxy, sing-box, Xray, WireGuard, AmneziaWG, OpenVPN) over rewrites.
- Credit upstream projects in
THIRD_PARTY_NOTICES.mdand in the app (Settings → About). Respect their licenses.
- Beauty and simplicity first: big connect button on Home, advanced options hidden under Advanced.
- Themes: base switch Light, Black (
Oled), System (default for fresh installs; Light or Black by OS). Purple is not built in: it ships as the gallery themethemes/purple.json; savedPurplemigrates to System. Colors live only insrc/Bydlo.App/Themes/*.axaml. - All user-visible strings go through localization (
Assets/Strings/en.json,ru.json). Add both languages. - Desktop: sidebar navigation; narrow windows (and the future Android head): bottom navigation. Same visual language everywhere.
- User-facing documentation is written in Russian:
README.md,THIRD_PARTY_NOTICES.md, everything indocs/, and README files inside the repository. Keep names of tools, protocols, commands and code identifiers as they are. - This file (
CLAUDE.md) and.claude/stay in English (agent configuration). Code comments and commit messages stay in English. - Screenshots in
docs/imagesare rendered with the Russian UI:dotnet run --project tools/Bydlo.Screenshots -- <dir> ru.
- Default branch:
mainfor this repository; for future automation never hardcode the branch name or remote URL — detect them. - Integration branch:
developer. Every PR targetsdeveloper; branch fromdeveloper, notmain. After fixes, the maintainer mergesdeveloperintomainwith a separate PR. Never open a feature PR intomain. Both branches share the same protection ruleset (PR required, required CI checks, no force push, no deletion). - The initial version was committed directly as
Initial commit(no issue, no PR — one-time exception). - After the Initial commit, every independent task follows: issue → dedicated branch → implement → checks →
PR into
developerwithCloses #<issue>. Create/publish PRs only when the maintainer asks. Never open a PR without an issue. Merge only with explicit permission. Check conflicts withdeveloperbefore publishing. - Detect the hosting: GitHub →
gh, Gitea →tea. - Branch names describe the task; never use
codex(any case) in branch names. - Never push without permission.
- Commit messages: clear, English, imperative.
- Do not add AI to AUTHORS/CONTRIBUTORS, commit authors/co-authors, maintainers, reviewers or committers.
- No AI
Co-Authored-Bytrailers, no agent signatures in commits or PRs. - Do not change
git config user.name/user.email. Do not rewrite history to hide or fake authorship. - Do not list AI as a project participant in metadata.
Only these are allowed: skills .claude/skills/<name>/SKILL.md, hooks .claude/hooks/,
registration .claude/settings.json, inventory .claude/README.md.
Never create .agents, .codex, .cursor or similar directories.
Hooks must never start engines, touch the network configuration or do anything risky.