feat: hysteria2 x-forward
This commit is contained in:
9 files changed
+54
-6
No files matched your search
@@ -604,6 +604,19 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
hysteria.xForwarded = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Tell `masquerade` the client's address in `X-Forwarded-For` (with
|
||||
`X-Forwarded-Host` and `X-Forwarded-Proto`), for a `masquerade` that is this
|
||||
host's own web server: what it shows or limits is then the client's, not this
|
||||
host's. The header is XRay's alone (any the client sent is dropped), so trust it
|
||||
only from the address XRay connects from. Another operator's site would learn
|
||||
every probe's address.
|
||||
'';
|
||||
};
|
||||
|
||||
hysteria.salamander = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
|
||||
@@ -859,6 +859,9 @@ let
|
||||
(mkAssertion (
|
||||
!proxyInboundsEnabled || l.hysteria.rewriteHost || l.hysteria.masquerade != null
|
||||
) "${prefix}: hysteria.rewriteHost = false needs hysteria.masquerade")
|
||||
(mkAssertion (
|
||||
!proxyInboundsEnabled || !l.hysteria.xForwarded || l.hysteria.masquerade != null
|
||||
) "${prefix}: hysteria.xForwarded needs hysteria.masquerade")
|
||||
(mkAssertion (
|
||||
!proxyInboundsEnabled
|
||||
|| (!l.hysteria.salamander.enable && l.hysteria.portHopping == null)
|
||||
|
||||
Reference in new issue
Block a user