Files
proxy-suite-flake/windows/crates/ps-core/examples/zapret_args.rs
T
faumarayandClaude Opus 5.5 9b0d7021f9 windows: zapret-discord-youtube and tg-ws-proxy
zapret: Flowseal's release run as its service.bat runs it: the preset's
winws.exe line (continuations, cmd's caret escapes, %BIN%, %LISTS%, the
game filter) as winws's arguments, the user's domains and addresses in
the lists upstream's module puts them in (kept in the service's own run
directory, the verified release untouched), TCP timestamps on, and
zapret's sites in the proxy's direct list. tools/winws-dry-run.sh has
the release's own winws.exe verify every preset's arguments under Wine:
all 22, both game filters.

tg-ws-proxy: Flowseal's headless proxy on the embeddable CPython 3.12
with hash-pinned win_amd64 wheels (tools/build-tg-ws-proxy.sh), run with
upstream's flags; its relay goes direct under the TUN. Runs under Wine.

proxy-ctl: zapret status|on|off|preset|game-filter, components
list|install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 23:55:45 +03:00

19 lines
983 B
Rust

//! For tools/winws-dry-run.sh: a preset's winws arguments as the service builds them, one
//! per line. `zapret_args <release dir> <lists dir> <preset> <game filter>`, paths as
//! Windows sees them (with a trailing separator).
use ps_core::config::GameFilter;
use ps_core::zapret::{expand, find_preset, preset_args};
fn main() {
let a: Vec<String> = std::env::args().collect();
let (release, win_root, win_lists, preset, game) = (&a[1], &a[2], &a[3], &a[4], &a[5]);
let files: Vec<String> = std::fs::read_dir(release).unwrap().filter_map(|e| e.ok()?.file_name().into_string().ok()).collect();
let file = find_preset(&files, preset).unwrap();
let text = std::fs::read_to_string(std::path::Path::new(release).join(file)).unwrap();
let game: GameFilter = serde_json::from_value(serde_json::json!(game)).unwrap();
for arg in expand(&preset_args(&text).unwrap(), &format!("{win_root}bin\\"), win_lists, win_root, game) {
println!("{arg}");
}
}