Shared DPI strategy rules and scenario catalog for dpictl and future cross-platform clients.
  • TypeScript 47.1%
  • JavaScript 27%
  • Go 18.5%
  • CSS 6.9%
  • HTML 0.5%
Find a file
2026-06-14 12:43:56 +03:00
integration Make YouTube-only the strategy demo baseline 2026-06-14 00:10:20 +03:00
tools Update strategy contract count 2026-06-14 00:14:10 +03:00
ui Generate markdown strategy comparison matrix 2026-06-14 12:43:56 +03:00
.gitattributes Normalize catalog line endings 2026-06-13 18:53:44 +03:00
.gitignore Add strategy diff teaching UI 2026-06-13 23:56:57 +03:00
.gitlab-ci.yml Add strategy diff teaching UI 2026-06-13 23:56:57 +03:00
AGENTS.md Add strategy diff teaching UI 2026-06-13 23:56:57 +03:00
README.md Make YouTube-only the strategy demo baseline 2026-06-14 00:10:20 +03:00

DPI Strategies

This repository stores the shared DPI strategy data used by dpictl today and intended for future Windows, macOS, Linux, Android, and iOS clients.

The repository is data-first. Platform apps should not parse upstream .bat launchers or ship their own divergent rule catalog. They should consume the ready YAML strategies and lists described here.

Structure

integration/           Only data consumed by apps, engines, tests, and SDKs
  manifest.yaml        Machine-readable index for clients
  strategies/*.yaml    Ready strategy scenarios
  lists/*.txt          Seed host/IP lists referenced by strategies
  schema/*.json        JSON Schema documentation for the public format
  FORMAT.md            Versioned data contract

tools/                 Only developer tooling and validation code
  go.mod               Go module for validators and generators
  manifest             Manifest generator
  validate             Local validator
  internal/contract    Go validation library used by CI

ui/                    TypeScript teaching UI for visual scenario diffs

Consumption Model

Clients download integration/manifest.yaml, verify each listed file by sha256, then pass strategy YAML into their engine adapter. The engine should receive a normalized configuration model, not raw upstream scripts.

youtube-only is the baseline scenario for clients that run DPI desync only for YouTube/Google domains. Broader scenarios can be presented as optional additions over that base in demo and testing tools.

Current Windows dpictl consumes the strategies entries from the manifest via its update-strategies command. Future clients should also consume lists entries so list updates can ship without an app rebuild.

Raw manifest URL:

https://git.politsin.com/dpi/dpi-strategies/-/raw/master/integration/manifest.yaml

Validate

Push-Location .\tools
go test ./...
go run .\validate
Pop-Location
Push-Location .\ui
npm ci
npm run check
Pop-Location

Validation checks the public contract:

  • manifest version and declared format;
  • no unsafe paths in manifest entries;
  • every declared strategy/list file exists;
  • sha256 values match file contents;
  • strategy YAML has version: 1, matching id, at least one rule, and no unknown fields.

Update Flow

  1. Change files in integration/strategies/ or integration/lists/.
  2. Regenerate integration/manifest.yaml:
Push-Location .\tools
go run .\manifest
Pop-Location
  1. Run go test ./... from tools/ and npm run check from ui/.
  2. Push to master after CI passes.

The current source sync path is generated from the dpictl repository:

cd W:\proj\go\dpi\dpictl
go run .\configbundle\zapret2yaml

Then copy changed ready files from configbundle/strategies and configbundle/lists into this repository, refresh the manifest, and validate:

cd W:\proj\go\dpi\dpi-strategies
Copy-Item ..\dpictl\configbundle\strategies\*.yaml .\integration\strategies\ -Force
Copy-Item ..\dpictl\configbundle\lists\*.txt .\integration\lists\ -Force
Push-Location .\tools
go run .\manifest
go test ./...
go run .\validate
Pop-Location