fix: zapret2 improvements
This commit is contained in:
30 files changed
+872
-49
No files matched your search
@@ -1,15 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
services.proxy-suite = {
|
||||
enable = true;
|
||||
zapret = {
|
||||
enable = true;
|
||||
global.enable = false; # no system-wide zapret
|
||||
};
|
||||
perAppRouting = {
|
||||
enable = true;
|
||||
createDefaultProfiles = true; # adds a profile named "zapret"
|
||||
zapret.enable = true;
|
||||
};
|
||||
};
|
||||
services.proxy-suite.zapret.zapret2.ports.extraUdp = [ "27015-27030" ];
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
services.proxy-suite = {
|
||||
enable = true;
|
||||
zapret = {
|
||||
enable = true;
|
||||
global.enable = false; # no system-wide zapret
|
||||
};
|
||||
perAppRouting = {
|
||||
enable = true;
|
||||
createDefaultProfiles = true; # adds a profile named "zapret"
|
||||
zapret.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -81,8 +81,11 @@ proxySuite = inputs.proxy-suite.lib.proxyHelpers {
|
||||
|
||||
## Reference
|
||||
|
||||
- `urls.http`, `urls.socks`: the proxy's URLs. A listener on `0.0.0.0` or `::` is reached on
|
||||
loopback.
|
||||
- `urls.http`, `urls.socks5h`, `urls.socks5`: the proxy's URLs. A listener on `0.0.0.0` or
|
||||
`::` is reached on loopback. With `socks5h://` the proxy resolves names; `socks5://`
|
||||
resolves them locally, for programs that do not accept `socks5h://`, such as Chromium and
|
||||
Electron apps.
|
||||
- `urls.socks`: the same as `urls.socks5h`.
|
||||
- `env`: every proxy variable (`http_proxy`, `https_proxy`, `all_proxy`, their upper-case
|
||||
forms, and `no_proxy`). `envFor "http"` or `envFor "socks"` gives one kind only.
|
||||
- `wrapEnv { protocol ? "http"; programs ? null; } package`: the package, with its programs
|
||||
|
||||
+16
-2
@@ -45,6 +45,17 @@ services.proxy-suite = {
|
||||
the full RKN list and uses more memory. It also turns on a workaround for ISPs that cut
|
||||
TLS to some hosting networks after about 16 KB.
|
||||
|
||||
Each failure zapret2 counts and each strategy switch is logged, per site:
|
||||
`proxy-ctl logs proxy-suite-zapret`. A site stays on its first strategy as long as that one
|
||||
works.
|
||||
|
||||
Other ports, such as a game's, take the same strategies with `zapret2.ports.extraUdp` or
|
||||
`extraTcp`:
|
||||
|
||||
```nix
|
||||
services.proxy-suite.zapret.zapret2.ports.extraUdp = [ "27015-27030" ];
|
||||
```
|
||||
|
||||
## Commands
|
||||
|
||||
```sh
|
||||
@@ -60,8 +71,10 @@ proxy-ctl zapret cutoff # networks cut off at 16 KB (z2k)
|
||||
## With a proxy
|
||||
|
||||
zapret and the proxy work side by side. By default (`zapret.directSync`), the sites zapret
|
||||
handles are sent direct, so they skip the proxy and reach zapret. Everything else follows
|
||||
your [routing rules](./routing.md).
|
||||
handles are sent direct, so they skip the proxy and reach zapret. With zapret2 that includes
|
||||
the sites it learns and the ones you pin with `proxy-ctl zapret auto add`, as soon as they
|
||||
are added; your own rules and autoProxy still come first. Everything else follows your
|
||||
[routing rules](./routing.md).
|
||||
|
||||
## Only for some apps
|
||||
|
||||
@@ -100,4 +113,5 @@ belong to the system-wide zapret, so they do nothing here. See
|
||||
- [`zapret.global.enable`](../options/zapret.md#services-proxy-suite-zapret-global-enable)
|
||||
- [`zapret-discord-youtube.configName`](../options/zapret.md#services-proxy-suite-zapret-zapret-discord-youtube-configname)
|
||||
- [`zapret2.strategySource`](../options/zapret.md#services-proxy-suite-zapret-zapret2-strategysource)
|
||||
- [`zapret2.ports.extraUdp`](../options/zapret.md#services-proxy-suite-zapret-zapret2-ports-extraudp)
|
||||
- [`zapret.directSync`](../options/zapret.md#services-proxy-suite-zapret-directsync-enable)
|
||||
Reference in new issue
Block a user