feat(health): add managed SOCKS probe configuration
Co-authored-by: GPT-6 <gpt-6@openai.com>
This commit is contained in:
1 parent
69077fb708
commit
5c540ce03b
7 files changed
+392
-24
No files matched your search
@@ -2,6 +2,45 @@
|
||||
|
||||
Go CLI for scanning and checking YouTube TLS bypass strategies with `blockcheckw`.
|
||||
|
||||
## One-shot Player API health
|
||||
|
||||
```sh
|
||||
zapret-autotune health youtube
|
||||
```
|
||||
|
||||
This makes one bounded Android Player API request through the explicitly
|
||||
configured **loopback SOCKS5** endpoint. Healthy means only
|
||||
`playabilityStatus.status == "OK"`; no streaming URL is required and no media is
|
||||
fetched. **API health is not playback health.** Non-OK/missing status, malformed
|
||||
responses and request failures return exit 1; invalid config returns exit 2.
|
||||
Curl configuration and proxy bypasses are disabled; ambient proxy settings are
|
||||
not used and there is no direct fallback. The request times out after 30 seconds
|
||||
(35-second process deadline), with a 1 MiB response limit and sanitized errors.
|
||||
|
||||
| Environment variable | Default |
|
||||
| --- | --- |
|
||||
| `ZAPRET_AUTOTUNE_SOCKS_PROXY` | `socks5://127.0.0.1:11080` |
|
||||
| `ZAPRET_AUTOTUNE_VIDEO_ID` | `dQw4w9WgXcQ` |
|
||||
| `ZAPRET_AUTOTUNE_HEALTH_INTERVAL` | `5m` |
|
||||
| `ZAPRET_AUTOTUNE_FAILURE_THRESHOLD` | `3` |
|
||||
| `ZAPRET_AUTOTUNE_RECOVERY_COOLDOWN` | `30m` |
|
||||
|
||||
Configuration is parsed once per health invocation. The proxy must use `socks5`
|
||||
with a loopback IP or `localhost`, port 1–65535, and no credentials/path/query.
|
||||
Video IDs must be 11 characters; durations and the failure threshold must be
|
||||
positive. Explicit empty values are invalid. Interval, consecutive-failure
|
||||
threshold and cooldown are validated future recovery policy settings only:
|
||||
**there is no scheduler, autonomous monitoring or recovery yet**.
|
||||
|
||||
The future managed target is a **brand-new prod-like zapret2-ss container in the
|
||||
test environment only**, not the existing container. Its stable configurable
|
||||
SOCKS endpoint must be loopback-accessible to this probe and same-host Xray.
|
||||
This increment does not create or change any container, persist health, apply
|
||||
configuration, restart services or roll back anything. Xray configuration is
|
||||
out of scope and will be configured separately by the user. Run this command in
|
||||
the host network context where that loopback endpoint is reachable; Docker
|
||||
`localhost` otherwise refers to the CLI container itself.
|
||||
|
||||
## Exact cache-host proposal
|
||||
|
||||
```sh
|
||||
|
||||
Reference in new issue
Block a user