fix: hardening and fixes

This commit is contained in:
fufsob committed 2026-09-15 08:56:33 +00:00
1 parent aa19042ee5
commit a82417a2bd
32 files changed
+619 -256

No files matched your search

+5
View File
@@ -103,6 +103,11 @@ null or package
Named AmneziaWG client profiles\. Only one global profile can be active\.
A profile moves to a new source port, keeping its routes, when a handshake goes
unanswered: every 5 seconds while it starts (it gives up after 20), and when
proxy-suite-awg-NAME-watchdog sees a rekey not getting through\. settings\.listenPort
pins the port and turns that off\.
*Type:*
attribute set of (submodule)
+2 -1
View File
@@ -213,7 +213,7 @@ services.proxy-suite = {
port = 22;
user = null;
};
serviceUser = null;
serviceUser = "proxy-suite-daemon";
strictHostKeyChecking = "accept-new";
};
tgWsProxy = {
@@ -258,6 +258,7 @@ services.proxy-suite = {
asOutbound = false;
configFile = null;
enable = false;
generatorUrl = null;
};
zapret = {
cidrExemption = {
+3 -3
View File
@@ -147,7 +147,7 @@ null
<a id="services-proxy-suite-sshproxy-identityfile"></a>
## services\.proxy-suite\.sshProxy\.identityFile
Runtime path to the private key\. Null uses the agent or OpenSSH defaults\.
Runtime path to the private key; it may stay root-only, as the daemons get a copy they can read\. Null uses the agent or OpenSSH defaults\.
*Type:*
null or string
@@ -269,7 +269,7 @@ null
<a id="services-proxy-suite-sshproxy-serviceuser"></a>
## services\.proxy-suite\.sshProxy\.serviceUser
Unix user running the OpenSSH unit\.
Unix user running the OpenSSH unit\. The default, proxy-suite-daemon, runs sandboxed and keeps accepted host keys in /var/lib/proxy-suite/ssh; null runs it as root\.
*Type:*
null or string matching the pattern \[^\[:space:]]+
@@ -277,7 +277,7 @@ null or string matching the pattern \[^\[:space:]]+
*Default:*
```nix
null
"proxy-suite-daemon"
```
*Example:*
+2 -2
View File
@@ -221,7 +221,7 @@ Listen port\.
<a id="services-proxy-suite-tgwsproxy-log-file"></a>
## services\.proxy-suite\.tgWsProxy\.log\.file
Rotating log file\. Null logs to stderr\.
Rotating log file, written as the proxy-suite-daemon user; /var/log/proxy-suite-tg-ws-proxy is created for it\. Null logs to stderr\.
*Type:*
null or string
@@ -235,7 +235,7 @@ null
*Example:*
```nix
"/var/log/tg-ws-proxy.log"
"/var/log/proxy-suite-tg-ws-proxy/tg-ws-proxy.log"
```
<a id="services-proxy-suite-tgwsproxy-log-keep"></a>
+31 -4
View File
@@ -9,6 +9,7 @@ Part of the [proxy-suite options reference](./index.md).
- [asAmneziaWg](#services-proxy-suite-warp-asamneziawg)
- [asOutbound](#services-proxy-suite-warp-asoutbound)
- [configFile](#services-proxy-suite-warp-configfile)
- [generatorUrl](#services-proxy-suite-warp-generatorurl)
<a id="services-proxy-suite-warp-enable"></a>
## services\.proxy-suite\.warp\.enable
@@ -33,7 +34,8 @@ true
<a id="services-proxy-suite-warp-asamneziawg"></a>
## services\.proxy-suite\.warp\.asAmneziaWg
Add an AmneziaWG profile named “warp” (` proxy-ctl awg on warp `)\. Requires amneziaWg\.enable\.
Add an AmneziaWG profile named “warp” (` proxy-ctl awg on warp `)\. Requires amneziaWg\.enable,
and excludes asOutbound: both would use the same WARP key\.
*Type:*
boolean
@@ -48,8 +50,9 @@ false
## services\.proxy-suite\.warp\.asOutbound
Add WARP as an outbound tagged “warp”: a SOCKS hop to proxy-suite-warp-tunnel, which
runs WARP as a sing-box WireGuard endpoint on 127\.0\.0\.1:18538 and restarts it on a new
source port when the handshake stops being answered\.
runs WARP as a sing-box WireGuard endpoint on 127\.0\.0\.1:18538, as the proxy-suite-daemon user\.
The tunnel starts again on a new source port when WARP does not answer within 15 seconds
of a start, or misses three probes later on, unless the uplink itself is down\.
*Type:*
boolean
@@ -64,7 +67,7 @@ false
## services\.proxy-suite\.warp\.configFile
Runtime path to a WireGuard profile for WARP, as written by ` wgcf register && wgcf generate `\.
Junk-packet lines (Jc, Jmin, Jmax) are honoured by the AmneziaWG profile only\.
AmneziaWG lines (Jc, S1-S4, H1-H4, I1-I5, AWG 3 timing) are honoured by the AmneziaWG profile only\.
When null, proxy-suite-warp registers a device with wgcf (accepting Cloudflare’s terms)
into /var/lib/proxy-suite/warp, through the local proxy when proxy\.enable is set, and
@@ -84,3 +87,27 @@ null
```nix
"/run/secrets/wgcf-profile.conf"
```
<a id="services-proxy-suite-warp-generatorurl"></a>
## services\.proxy-suite\.warp\.generatorUrl
HTTPS URL of a WARP profile generator, fetched directly when wgcf registration fails
(e\.g\. the Cloudflare API is blocked and there is no local proxy)\. It must return a
WireGuard profile, or JSON with the base64 profile in ` .content `\.
The generator registers the device, so its operator sees the private key\.
*Type:*
null or string
*Default:*
```nix
null
```
*Example:*
```nix
"https://valokda-amnezia.vercel.app/api/warp?mode=awg2"
```