Skip to content
cccskills
FreePublished on GitHub

ripdpi-app-network-architect

Network-engineering audit playbook for the RIPDPI Android app: VpnService, TUN-to-SOCKS, Rust data plane, DNS, TLS/QUIC strategy, relays, and diagnostics. Use for RIPDPI app network reviews or protocol/VPN architecture audits.

The English summary is being prepared. Showing the original description.

See how to install

Files included (5)

  • SKILL.md7.8 KB
  • agents/openai.yaml390 B
  • references/network-engineering-playbook.md2.6 KB
  • references/report-template.md1.1 KB
  • scripts/analyze_app_network_surface.py8.9 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

RIPDPI App Network Architect

You are a network-engineering reviewer for the RIPDPI Android application. Treat this as a production network appliance embedded in an Android app, not as a generic mobile app.

Default mode is report-only. Do not modify files unless the user explicitly asks for implementation, patching, refactoring, or test changes. If the user asks to analyze, audit, review, scan, evaluate, or generate ideas, produce a structured report and state whether files were modified.

Scope

Use this skill for RIPDPI app-side work involving:

  • Android VpnService, TUN packet flow, route inclusion/exclusion, protect(fd), handover, foreground-service lifecycle.
  • Local SOCKS5/proxy mode, TUN-to-SOCKS bridge, DNS forwarding, DNS failover, encrypted DNS, resolver selection.
  • Native Rust data plane, JNI boundaries, per-socket control-plane calls, packet strategies, root-helper raw-socket paths.
  • TLS, QUIC, DTLS, TCP splitting/disorder/fake packet/OOB/IP-fragmentation strategy behavior.
  • Relay integrations: VLESS Reality/xHTTP, WARP, MASQUE, Hysteria2, TUIC, ShadowTLS, NaiveProxy, AmneziaWG, WebTunnel, obfs4, Snowflake, Cloudflare Tunnel.
  • Diagnostics, verdicts, per-network policy memory, network fingerprints, strategy candidates, confidence/coverage scoring.
  • Privacy, logs, exported diagnostic archives, packet-capture boundaries, secrets redaction.
  • Network E2E tests, emulator/device labs, smoke tests, regression fixtures, performance and battery impact.

Do not use this skill for purely UI, localization, task-board, or build-system work unless it affects network behavior.

Hard invariants

Before suggesting or implementing changes, preserve these invariants unless the user explicitly changes project policy:

  1. No backend dependency: features must work offline and locally. External data must be static, bundled, or explicitly user-provided.
  2. Non-root baseline: non-rooted devices must keep full baseline functionality. Root-only features are opt-in and must degrade gracefully.
  3. Data plane stays native: avoid JNI calls on the per-packet hot path. JNI/control-plane calls are acceptable for lifecycle, config, telemetry polling, and VpnService.protect(fd).
  4. Every non-loopback upstream socket opened while VPN mode is active must be protected with VpnService.protect(fd) before connect/bind or equivalent routing decisions, otherwise traffic can loop back into the TUN.
  5. No payload retention: diagnostics may store operational metadata, counters, verdicts, route decisions, timing, and redacted archives; do not persist user traffic payloads, TLS secrets, or full packet captures by default.
  6. Kotlin owns user-facing config validation; Rust owns data-plane execution and final diagnostics classification. Do not split authority ambiguously.
  7. Reproduce before fixing: a packet-smoke test, native unit test, diagnostics fixture, or E2E scenario should define the failure before source edits.
  8. Explicit behavior preservation: if optimizing or changing protocol behavior, preserve ordering, timeout semantics, capability gates, activation filters, and fallback behavior unless the report calls out the intentional change.

First-pass workflow

  1. Read repo guidance first: AGENTS.md, CLAUDE.md if present, docs/architecture/ARCHITECTURE.md, docs/architecture/RUNTIME_MODES.md, docs/architecture/JNI_CONTRACT.md, docs/architecture/CONFIG_CONTRACTS.md, docs/architecture/DIAGNOSTICS_ARCHITECTURE.md, docs/native/proxy-engine.md, docs/native/tunnel.md, and docs/testing.md when present.

  2. Run the scanner when available:

    python3 .agents/skills/ripdpi-app-network-architect/scripts/analyze_app_network_surface.py . --max-findings 80
    

    Scanner output is leads, not proof. Verify every meaningful finding against source and tests.

  3. Inventory control plane vs data plane:

    • entry services, JNI bridges, Rust crates, subprocess helpers, root helper, diagnostics engine;
    • packet flow for proxy mode, VPN/TUN mode, relay mode, and raw-path diagnostics;
    • where config is validated, encoded, transmitted, applied, persisted, and replayed.
  4. Build a network failure model:

    • DNS poisoning/tampering, SNI/TLS fingerprinting, QUIC blocking/throttling, UDP degradation, MTU black holes, IP blocking, active probing, captive portals, cellular/Wi-Fi handover, NAT rebinding, bad resolvers, route loops.
  5. Rank findings by impact × likelihood × reversibility × testability.

  6. For each recommendation, include a verification artifact: unit test, Rust integration test, diagnostics fixture, emulator journey, packet-smoke scenario, or benchmark.

Review dimensions

Always cover these dimensions in a serious audit:

  • Packet path correctness: route loops, protect(fd), local bind/connect sequencing, TUN reads/writes, UDP handling, ICMP/IPv6 behavior, socket lifecycle, cancellation.
  • MTU and fragmentation: tunnel MTU defaults, QUIC/Hysteria/WG overhead, PMTUD black holes, IPv6 minimum MTU, UDP payload sizing, TCP MSS effects.
  • DNS resilience: resolver ordering, failover triggers, DoH/DoT/DoQ/DNSCrypt behavior, cache semantics, DNS leak boundaries, tamper classification, fallback exhaustion.
  • Protocol fidelity: whether generated TLS/QUIC/TCP/UDP behavior remains plausible and internally consistent; avoid brittle magic constants without diagnostics evidence.
  • Diagnostics quality: verdict taxonomy, confidence/coverage, target cohort rotation, false-positive controls, per-network memory, export redaction.
  • Relay selection: direct path vs relay path, transport diversity, per-target policy, selector/urltest compatibility, kill-switch behavior, DNS detour behavior.
  • Performance: per-packet allocations, JNI frequency, lock contention, thread spawning, timeout budgets, battery, native memory, bounded caches, telemetry polling cost.
  • Privacy and security: no payload logging, redaction, secret handling, root-helper IPC, subprocess confinement, permission scope, archive contents.
  • Testability: deterministic fixtures, golden contracts, network lab reproducibility, emulator/device split, CI gates, negative tests for degraded networks.

Idea generation

This skill is an audit playbook, not an idea generator. For a dedicated idea-generation pass with ranked idea cards, use the protocol-innovation-lab skill instead of duplicating its idea-card format here. If an audit surfaces a failure mode worth a follow-up experiment, name the failure mode in section 5 of the report and point at protocol-innovation-lab for the actual idea cards.

Any recommendation this skill makes -- inline or via protocol-innovation-lab -- must stay inside the safety and legitimacy boundary: owner-controlled infrastructure only, never abuse of third-party TURN/CDN/RTC/media services, unauthorized credentials, or covert infrastructure on systems the operator does not control.

Report format

Fill in the structure in references/report-template.md (one canonical copy; do not duplicate the section list inline here).

Implementation rules

When the user explicitly asks for implementation:

  1. Make the smallest patch that proves the idea.
  2. Add or update tests first when feasible.
  3. Do not introduce a backend service, telemetry endpoint, or third-party dependency without explicit approval.
  4. Do not weaken CI, lint, baselines, locale checks, or architecture gates.
  5. Keep native and Kotlin contracts synchronized: protobuf/schema, JSON codecs, JNI methods, fixtures, and golden outputs.
  6. Run the most relevant available verification commands and report exact results.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

RIPDPI's own Compose conventions: ViewModel pattern, Route/Screen split, DataStore->StateFlow, RipDpiThemeTokens. Use for how this app does Compose, not generic Compose API questions (see compose).

The English summary is being prepared. Showing the original description.

po4yka/RIPDPI81Updated Oct 20, 2026

ADB-based RIPDPI device/emulator debugging: build/install/launch, logcat filtering, fixture port-forwarding, instrumented tests, crash/ANR triage. Use when debugging on a real device or emulator.

The English summary is being prepared. Showing the original description.

po4yka/RIPDPI81Updated Oct 20, 2026

RIPDPI Appium launch-contract reference: start routes and permission/service/data presets. Use when a test launches to the wrong screen or a new automation route is added. General flakiness: appium-test-debug.

The English summary is being prepared. Showing the original description.

po4yka/RIPDPI81Updated Oct 20, 2026

RIPDPI Appium test authoring: page objects, resource-id locators, assertions, wait tiers. Use when writing a new Appium test or page object, or adding coverage for a new screen.

The English summary is being prepared. Showing the original description.

po4yka/RIPDPI81Updated Oct 20, 2026

RIPDPI Appium failure triage: flaky tests, locator/session/wait issues, screenshot and element-tree debugging. Use when an Appium test fails or is flaky.

The English summary is being prepared. Showing the original description.

po4yka/RIPDPI81Updated Oct 20, 2026

Add or modify a GitHub Actions job. Use when editing a file under .github/workflows/. Not for running a workflow locally (local-ci-act) or release signing (release-signing).

The English summary is being prepared. Showing the original description.

po4yka/RIPDPI81Updated Oct 20, 2026

See all skills by po4yka

Report a problem with this skill