78 KiB
services.proxy-suite.inbounds
Server side: listeners for remote clients, share links, subscriptions and stats.
Part of the proxy-suite options reference.
Options
- inbounds
- enable
- package
- accessLog
- listeners
<name>- acceptProxyProtocol
- address
- amneziaWg
- fallbacks
- flow
- hysteria
- masquerade
- portHopping
- rewriteHost
- salamander
- xForwarded
- jsonFile
- method
- order
- port
- reality
- serverPassword
- serverPasswordFile
- shareAddress
- shareFingerprint
- sharePort
- shareVariants
- tls
- transport
- type
- users
- via
- xrayJson
- manager
- enable
- api
- deleteExpiredAfter
- interval
- ipLimit
- notify
- speedLimits
- subscriptions
- webhooks
- item
- openFirewall
- routing
- blockPorts
- blockPrivate
- blockRu
- blockTorrent
- proxy
- serverSource
- via
- zapretDirect
- runtime
- serverAddress
- serverAliases
- serverPorts
- shareLinks
- subscriptions
- users
services.proxy-suite.inbounds.enable
Whether to enable server inbounds, which accept proxy clients from outside.
Type: boolean
Default: false
services.proxy-suite.inbounds.package
XRay package that runs the inbounds, whichever client backend is used.
Type: package
Default: proxy-suite’s xray (pkgs/xray.nix)
Example: pkgs.xray
services.proxy-suite.inbounds.accessLog
Log every connection, with the user, their address and the site, to the journal of
proxy-suite-inbounds: who went where, for anyone who can read the journal. On with
proxy.autoProxy whatever this says, which learns from those lines.
Type: boolean
Default: false
services.proxy-suite.inbounds.listeners
Server listeners, by tag.
Type: attribute set of (submodule)
Default: { }
Example:
{
vless-reality = {
type = "vless";
port = 443;
users = [ "phone" ];
flow = "xtls-rprx-vision";
reality = {
enable = true;
serverNames = [ "www.microsoft.com" ];
privateKeyFile = "/run/secrets/proxy-inbound-reality-key";
publicKey = "jNXH...";
shortIds = [ "0123abcd" ];
};
};
# `proxy-ctl inbounds link home phone` prints a vpn:// link; add --config for the .conf.
home = {
type = "amneziawg";
port = 51820;
users = [ "phone" "laptop" ];
amneziaWg.mode = "lan";
};
}
services.proxy-suite.inbounds.listeners.<name>.acceptProxyProtocol
Read the client address from a PROXY protocol header (v1 or v2) that opens every
connection, as sent by a TCP front such as nginx’s stream with proxy_protocol on.
Without it such a listener records every client as the front’s address, which
proxy-ctl inbounds online never counts. TCP listeners only.
Every connection must carry the header, so only set it on a listener nothing but the front can reach, such as one on loopback.
Type: boolean
Default: false
services.proxy-suite.inbounds.listeners.<name>.address
Listening address. A loopback address keeps the port closed in the firewall.
Type: string matching the pattern [^[:space:]]+
Default: "::"
Example: "127.0.0.1"
services.proxy-suite.inbounds.listeners.<name>.amneziaWg
AmneziaWG server settings, for type = "amneziawg".
Type: submodule
Default: { }
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.clientAllowedIPs
AllowedIPs in client configs: what clients send through the tunnel.
Type: list of string
Default: [ "0.0.0.0/0" "::/0" ]
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.dns
DNS servers in client configs. Queries exit like any other traffic.
Type: list of string
Default: [ "1.1.1.1" "1.0.0.1" ]
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.interfaceName
Interface name, at most 15 characters.
Type: string matching the pattern ^[A-Za-z0-9_.-]+$
Default: "awgi-<tag>"
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.mode
What clients can reach besides the internet, which always goes through the listener’s via:
- “proxy”: nothing else. This host, its LAN and other peers are cut off.
- “lan”: also this host, its LAN and other peers, directly. Turns on IP forwarding. Only TCP and UDP reach the internet; ping and other protocols are dropped.
Type: one of “proxy”, “lan”
Default: "proxy"
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.mtu
Interface MTU on both ends. null: awg-quick’s default (1280 with AWG 3 fields).
Type: null or (unsigned integer, meaning >=0)
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation
Obfuscation parameters, shared with every client. Jc, Jmin, Jmax, S1, S2 and H1-H4 are
generated once if left null; the rest stay unset.
Type: submodule
Default: { }
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.contentPaddingAddition
AWG 3 content-padding addition or range.
Type: null or unsigned integer, meaning >=0, or string matching the pattern ^([0-9]+|[0-9]±[0-9]+|\(off\))$
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.disableCookies
AWG 3 cookie suppression (DisableCookies).
Type: null or boolean
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.h1
Handshake-init header or range (H1).
Type: null or unsigned integer, meaning >=0, or string matching the pattern ^([0-9]+|[0-9]±[0-9]+|\(off\))$
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.h2
Handshake-response header or range (H2).
Type: null or unsigned integer, meaning >=0, or string matching the pattern ^([0-9]+|[0-9]±[0-9]+|\(off\))$
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.h3
Cookie-reply header or range (H3).
Type: null or unsigned integer, meaning >=0, or string matching the pattern ^([0-9]+|[0-9]±[0-9]+|\(off\))$
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.h4
Transport-message header or range (H4).
Type: null or unsigned integer, meaning >=0, or string matching the pattern ^([0-9]+|[0-9]±[0-9]+|\(off\))$
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.headerProtectionKey
AWG 3 header-protection key. Ends up in the Nix store; prefer headerProtectionKeyFile.
Type: null or string
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.headerProtectionKeyFile
File with the AWG 3 header-protection key.
Type: null or string
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.i1
First custom signature packet (I1).
Type: null or string
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.i2
Second custom signature packet (I2).
Type: null or string
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.i3
Third custom signature packet (I3).
Type: null or string
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.i4
Fourth custom signature packet (I4).
Type: null or string
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.i5
Fifth custom signature packet (I5).
Type: null or string
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.jc
Junk packet count (Jc).
Type: null or (unsigned integer, meaning >=0)
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.jmax
Maximum junk packet size (Jmax).
Type: null or (unsigned integer, meaning >=0)
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.jmin
Minimum junk packet size (Jmin).
Type: null or (unsigned integer, meaning >=0)
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.keepaliveTimeout
AWG 3 keepalive timeout or range.
Type: null or unsigned integer, meaning >=0, or string matching the pattern ^([0-9]+|[0-9]±[0-9]+|\(off\))$
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.maxHandshakeAttempts
AWG 3 maximum handshake attempts or range.
Type: null or unsigned integer, meaning >=0, or string matching the pattern ^([0-9]+|[0-9]±[0-9]+|\(off\))$
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.randomTrailers
AWG 3 random transport trailers (RandomTrailers).
Type: null or boolean
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.rejectAfterTime
AWG 3 reject-after interval or range.
Type: null or unsigned integer, meaning >=0, or string matching the pattern ^([0-9]+|[0-9]±[0-9]+|\(off\))$
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.rekeyAfterTime
AWG 3 rekey interval or range.
Type: null or unsigned integer, meaning >=0, or string matching the pattern ^([0-9]+|[0-9]±[0-9]+|\(off\))$
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.rekeyTimeout
AWG 3 rekey timeout or range.
Type: null or unsigned integer, meaning >=0, or string matching the pattern ^([0-9]+|[0-9]±[0-9]+|\(off\))$
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.s1
Handshake-init padding (S1).
Type: null or (unsigned integer, meaning >=0)
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.s2
Handshake-response padding (S2).
Type: null or (unsigned integer, meaning >=0)
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.s3
Cookie-reply padding (S3).
Type: null or (unsigned integer, meaning >=0)
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.obfuscation.s4
Transport-message padding (S4).
Type: null or (unsigned integer, meaning >=0)
Default: null
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.persistentKeepalive
PersistentKeepalive in client configs, which keeps NAT open.
Type: null or (unsigned integer, meaning >=0)
Default: 25
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.privateKeyFile
File with the server private key, instead of a generated one.
Type: null or string
Default: null
Example: "/run/secrets/awg-server-key"
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.subnet
Tunnel IPv4 subnet, private and unused elsewhere. This host takes the first address, clients the rest.
Type: string matching the pattern [0-9.]+/[0-9]+
Default: "10.66.0.0/24"
services.proxy-suite.inbounds.listeners.<name>.amneziaWg.subnet6
Tunnel IPv6 subnet (ULA). null: IPv4 only. With mode = "lan" it turns on IPv6
forwarding, which stops this host from configuring itself from router advertisements.
Type: null or IPv6 CIDR
Default: null
Example: "fd66:66::/64"
services.proxy-suite.inbounds.listeners.<name>.fallbacks
Where to send connections that are not this listener’s protocol, so several services
share one port (vless or trojan on raw transport). Entries match in order by SNI, ALPN
and path; one with none of these is the catch-all, such as a decoy site. Browsers use h2
by default, so an HTTP/1.1-only dest needs tls.alpn = [ "http/1.1" ].
Type: list of (submodule)
Default: [ ]
Example:
[
{ path = "/ws"; listener = "ws-in"; } # ws-in: vless, ws, address = "127.0.0.1"
{ dest = 8080; }
]
services.proxy-suite.inbounds.listeners.<name>.fallbacks.*.alpn
ALPN to match. null: any.
Type: null or one of “h2”, “http/1.1”
Default: null
Example: "h2"
services.proxy-suite.inbounds.listeners.<name>.fallbacks.*.dest
Where matching connections go: a port, host:port or unix socket path. Cannot be used with listener.
Type: null or 16 bit unsigned integer; between 0 and 65535 (both inclusive) or string
Default: null
Example: "127.0.0.1:8080"
services.proxy-suite.inbounds.listeners.<name>.fallbacks.*.listener
Another listener to hand matching connections to, instead of dest. It must be a vless
listener on loopback, without tls or reality. It gets decrypted traffic, and its share
links use this listener’s port and TLS or REALITY. Behind REALITY it must use xhttp or grpc.
Type: null or string
Default: null
Example: "ws-in"
services.proxy-suite.inbounds.listeners.<name>.fallbacks.*.name
SNI to match. null: any.
Type: null or string
Default: null
Example: "www.example.com"
services.proxy-suite.inbounds.listeners.<name>.fallbacks.*.path
Request path to match. null: any. Works for HTTP/1.1 only, so the target listener must
use ws or httpupgrade with this as its transport.path. For xhttp and grpc (h2), match
alpn = "h2" or use a catch-all.
Type: null or string
Default: null
Example: "/ws"
services.proxy-suite.inbounds.listeners.<name>.fallbacks.*.xver
PROXY protocol version sent to dest, or 0 for none. A listener always gets 2.
Type: one of 0, 1, 2
Default: 0
services.proxy-suite.inbounds.listeners.<name>.flow
VLESS flow. Raw transport only.
Type: null or value “xtls-rprx-vision” (singular enum)
Default: null
Example: "xtls-rprx-vision"
services.proxy-suite.inbounds.listeners.<name>.hysteria.masquerade
Site shown to anything that is not a hysteria2 client, such as browsers and probes.
null: answer 404.
Type: null or string
Default: null
Example: "https://www.example.com"
services.proxy-suite.inbounds.listeners.<name>.hysteria.portHopping
UDP port range redirected to port (nftables, NixOS only), which clients hop across
every half a minute or so. A single throttled or blocked flow then lasts until the
next hop instead of for the whole session. Share links name it as mport; clients
that do not know it stay on port.
Keep it clear of ports other services on this host receive on, and below the ephemeral range (32768 and up on Linux).
Type: null or string matching the pattern [0-9]±[0-9]+
Default: null
Example: "20000-30000"
services.proxy-suite.inbounds.listeners.<name>.hysteria.rewriteHost
Ask masquerade for its own name, whatever name the client asked for. false
passes the client’s on, for a masquerade that is this host’s own web server: a
probe then gets the site it named, as it would over TCP, instead of the same one
for every name. Another operator’s site would answer those names with an error.
Type: boolean
Default: true
services.proxy-suite.inbounds.listeners.<name>.hysteria.salamander.enable
Salamander obfuscation: every packet is scrambled with a shared password, so the
traffic no longer looks like QUIC (no visible handshake or SNI) but like random
UDP. Clients need the password, which the share links carry; those without it
cannot connect, and probes no longer reach masquerade.
Type: boolean
Default: false
services.proxy-suite.inbounds.listeners.<name>.hysteria.salamander.password
Salamander password. Ends up in the Nix store; prefer passwordFile.
Type: null or string
Default: null
Example: "hunter2"
services.proxy-suite.inbounds.listeners.<name>.hysteria.salamander.passwordFile
File with the Salamander password. With neither this nor password, one is
generated on first start and kept in the state directory.
Type: null or string
Default: null
Example: "/run/secrets/proxy-inbound-salamander"
services.proxy-suite.inbounds.listeners.<name>.hysteria.xForwarded
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.
Type: boolean
Default: false
services.proxy-suite.inbounds.listeners.<name>.jsonFile
File with a raw XRay inbound JSON (no share link). Its tag is replaced; a missing port is filled in.
Type: null or string
Default: null
Example: "/run/secrets/proxy-inbound-vless.json"
services.proxy-suite.inbounds.listeners.<name>.method
Shadowsocks cipher. 2022 ciphers take a base64 key of matching length as the password. Multiple users need a 2022-blake3-aes cipher and serverPassword.
Type: string
Default: "2022-blake3-aes-128-gcm"
Example: "aes-128-gcm"
services.proxy-suite.inbounds.listeners.<name>.order
Position in subscriptions and link listings, lowest first; listeners with the same order follow their tags alphabetically. Clients usually pick the first entry.
Type: signed integer
Default: 1000
Example: 0
services.proxy-suite.inbounds.listeners.<name>.port
Listening port. For raw JSON listeners it must match the JSON; the firewall uses this one.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default: 443
services.proxy-suite.inbounds.listeners.<name>.reality
REALITY settings.
Type: submodule
Default: { }
services.proxy-suite.inbounds.listeners.<name>.reality.enable
Enable REALITY. Cannot be used with tls.
Type: boolean
Default: false
services.proxy-suite.inbounds.listeners.<name>.reality.dest
Real TLS 1.3 + HTTP/2 site that non-client connections are forwarded to.
Type: string
Default: "www.microsoft.com:443"
services.proxy-suite.inbounds.listeners.<name>.reality.privateKey
x25519 private key. Ends up in the Nix store; prefer privateKeyFile.
Type: null or string
Default: null
Example: "gG1Yz..."
services.proxy-suite.inbounds.listeners.<name>.reality.privateKeyFile
File with the x25519 private key (from xray x25519).
Type: null or string
Default: null
Example: "/run/secrets/proxy-inbound-reality-key"
services.proxy-suite.inbounds.listeners.<name>.reality.publicKey
x25519 public key, needed for share links.
Type: null or string
Default: null
Example: "jNXH..."
services.proxy-suite.inbounds.listeners.<name>.reality.serverNames
Accepted SNIs, served by dest. The first goes into share links.
Type: list of string
Default: [ ]
Example: [ "www.microsoft.com" ]
services.proxy-suite.inbounds.listeners.<name>.reality.shortIds
Accepted short IDs (hex). The first goes into share links.
Type: list of string
Default: [ "" ]
Example: [ "0123abcd" ]
services.proxy-suite.inbounds.listeners.<name>.reality.xver
PROXY protocol version sent to dest with each forwarded connection, or 0 for none.
Lets a dest on this host that expects the header (nginx with proxy_protocol)
see the visitor’s address instead of XRay’s.
Type: one of 0, 1, 2
Default: 0
services.proxy-suite.inbounds.listeners.<name>.serverPassword
Shared server key of a multi-user shadowsocks 2022 listener. Ends up in the Nix store; prefer serverPasswordFile.
Type: null or string
Default: null
Example: "c2VydmVyLWtleS0xNmJ5dGU="
services.proxy-suite.inbounds.listeners.<name>.serverPasswordFile
File with the server key.
Type: null or string
Default: null
Example: "/run/secrets/proxy-inbound-ss-server-key"
services.proxy-suite.inbounds.listeners.<name>.shareAddress
Address in this listener’s share links (and the default SNI of their TLS), instead of
inbounds.serverAddress: a name of its own, so the name clients look up is the one
they then send as SNI. Links of listeners behind its fallbacks use it too.
Type: null or string
Default: null
Example: "cdn.example.com"
services.proxy-suite.inbounds.listeners.<name>.shareFingerprint
Browser whose TLS ClientHello clients imitate (fp in vless and trojan share links,
with tls or reality). A network that blocks one browser’s handshakes to a server can
let another’s through. null leaves it out, and the client picks: XRay-based clients
(v2rayNG, v2rayN) imitate Chrome then, sing-box-based ones send Go’s own handshake.
Type: null or one of “chrome”, “firefox”, “safari”, “ios”, “android”, “edge”, “360”, “qq”, “random”, “randomized”
Default: "chrome"
Example: "firefox"
services.proxy-suite.inbounds.listeners.<name>.sharePort
Port in share links, if something in front owns the public port. null: port.
Type: null or 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default: null
Example: 443
services.proxy-suite.inbounds.listeners.<name>.shareVariants
More links per user to this same listener, each changing only what the client sends: its TLS fingerprint, ALPN, xhttp mode, the name it dials and sends as SNI, or hysteria2’s port hopping. They follow the listener’s own link in subscriptions, labelled “<tag> <name>”, so a client can test them side by side and show which of them a network lets through. vless, trojan and hysteria2 listeners.
A variant only connects if the listener accepts what it changes: the ALPNs its TLS
offers, any xhttp mode unless transport.mode fixes one, names that reach it.
Type: list of (submodule)
Default: [ ]
Example:
[
{ name = "firefox"; fingerprint = "firefox"; }
{ name = "h1"; alpn = [ "http/1.1" ]; }
{ name = "stream-one"; mode = "stream-one"; }
]
services.proxy-suite.inbounds.listeners.<name>.shareVariants.*.address
Address the link dials, instead of the listener’s. The SNI stays the listener’s unless
serverName changes it too.
Type: null or string
Default: null
Example: "img.example.com"
services.proxy-suite.inbounds.listeners.<name>.shareVariants.*.alpn
ALPN in the link, instead of tls.alpn: what the client offers, and so which HTTP
version an xhttp client speaks. [ ] leaves it out, for the client’s default. null:
the listener’s.
Type: null or (list of (one of “h3”, “h2”, “http/1.1”))
Default: null
Example: [ "http/1.1" ]
services.proxy-suite.inbounds.listeners.<name>.shareVariants.*.fingerprint
Browser whose TLS ClientHello the client imitates (fp), instead of the listener’s shareFingerprint.
Type: null or one of “chrome”, “firefox”, “safari”, “ios”, “android”, “edge”, “360”, “qq”, “random”, “randomized”
Default: null
Example: "firefox"
services.proxy-suite.inbounds.listeners.<name>.shareVariants.*.mode
xhttp mode in the link, instead of transport.mode. An xhttp listener without a mode of its own takes every one.
Type: null or one of “auto”, “packet-up”, “stream-up”, “stream-one”
Default: null
Example: "stream-one"
services.proxy-suite.inbounds.listeners.<name>.shareVariants.*.name
Names the variant: in its links’ labels, after the listener’s tag, and as variant in
links.json (proxy-ctl inbounds link <tag> --variant=<name>). Not “onion”, which
the onion service’s links use.
Type: string matching the pattern [A-Za-z0-9][A-Za-z0-9._-]*
Example: "firefox"
services.proxy-suite.inbounds.listeners.<name>.shareVariants.*.portHopping
hysteria2: false leaves the hop range out, so the client stays on port. null: as the listener.
Type: null or boolean
Default: null
Example: false
services.proxy-suite.inbounds.listeners.<name>.shareVariants.*.serverName
SNI in the link, instead of the listener’s. Whatever routes by SNI in front of the listener must send this name to it as well.
Type: null or string
Default: null
Example: "img.example.com"
services.proxy-suite.inbounds.listeners.<name>.tls
TLS settings.
Type: submodule
Default: { }
services.proxy-suite.inbounds.listeners.<name>.tls.enable
Terminate TLS (always on for trojan). Cannot be used with reality.
Type: boolean
Default: false
services.proxy-suite.inbounds.listeners.<name>.tls.alpn
ALPN offered and put in share links. [ "h3" ] alone makes an xhttp listener UDP-only,
leaving the TCP port to a web server.
Type: null or (list of (one of “h3”, “h2”, “http/1.1”))
Default: null
Example: [ "h3" ]
services.proxy-suite.inbounds.listeners.<name>.tls.certificateFile
File with the PEM certificate chain.
Type: null or string
Default: null
Example: "/var/lib/acme/example.com/fullchain.pem"
services.proxy-suite.inbounds.listeners.<name>.tls.keyFile
File with the PEM private key.
Type: null or string
Default: null
Example: "/var/lib/acme/example.com/key.pem"
services.proxy-suite.inbounds.listeners.<name>.tls.serverName
SNI in share links. Defaults to inbounds.serverAddress.
Type: null or string
Default: null
Example: "example.com"
services.proxy-suite.inbounds.listeners.<name>.transport
Transport settings.
Type: submodule
Default: { }
services.proxy-suite.inbounds.listeners.<name>.transport.host
Expected Host header (ws, httpupgrade, xhttp). null: any.
Type: null or string
Default: null
Example: "cdn.example.com"
services.proxy-suite.inbounds.listeners.<name>.transport.mode
xhttp mode. null: the client chooses. Behind an HTTP/1.1 proxy, use “packet-up”.
Type: null or one of “auto”, “packet-up”, “stream-up”, “stream-one”
Default: null
Example: "packet-up"
services.proxy-suite.inbounds.listeners.<name>.transport.path
Request path (ws, httpupgrade, xhttp).
Type: string
Default: "/"
Example: "/download"
services.proxy-suite.inbounds.listeners.<name>.transport.serviceName
gRPC service name.
Type: string
Default: ""
Example: "GunService"
services.proxy-suite.inbounds.listeners.<name>.transport.trustedXForwardedFor
Headers that mark a request as coming from your web server (ws, httpupgrade, xhttp,
grpc). If one is present, XRay takes the client address from “X-Forwarded-For”. Needed
behind a web server on loopback, or proxy-ctl inbounds online and the stats show no
client addresses.
Only set it if the web server overwrites both headers on every request. Otherwise any client that reaches the listener directly can fake its address.
Type: list of string
Default: [ ]
Example: [ "X-Real-IP" ]
services.proxy-suite.inbounds.listeners.<name>.transport.type
Stream transport. “raw” is plain TCP, the usual pick for REALITY.
Type: one of “raw”, “ws”, “grpc”, “httpupgrade”, “xhttp”
Default: "raw"
Example: "ws"
services.proxy-suite.inbounds.listeners.<name>.type
Protocol. Set exactly one of type, xrayJson or jsonFile.
- “amneziawg”: an AmneziaWG server on a UDP port (see
amneziaWg). Its traffic exits like any other listener’s. - “hysteria2”: QUIC on a UDP port. Needs
tlsand passwords; no transport, reality or flow.
Type: null or one of “vless”, “vmess”, “trojan”, “hysteria2”, “shadowsocks”, “socks”, “http”, “amneziawg”
Default: null
Example: "vless"
services.proxy-suite.inbounds.listeners.<name>.users
Accepted users, by their names in inbounds.users.
Type: list of string matching the pattern [^[:space:]]+
Default: [ ]
Example: [ "phone" "laptop" ]
services.proxy-suite.inbounds.listeners.<name>.via
Where this listener’s traffic exits, as in inbounds.routing.via. null: use that default.
Type: null or string
Default: null
Example: "nl-vps"
services.proxy-suite.inbounds.listeners.<name>.xrayJson
Raw XRay inbound JSON (ends up in the Nix store). Its tag is replaced; a missing port is filled in.
Type: null or (attribute set)
Default: null
Example: { protocol = "dokodemo-door"; settings = { port = 8080; }; }
services.proxy-suite.inbounds.manager.enable
The inbound manager, a daemon that keeps the users’ policies (inbounds.users.<name>.policy,
and what it is told at runtime): who is switched off, whose time ran out, who used up
their traffic, how many addresses and how much speed each may have. It applies them to
the running inbounds without a restart, answers an HTTP+JSON API for proxy-ctl and bots,
serves subscriptions with the traffic and expiry clients show, and calls webhooks.
Users and listeners added through it need inbounds.runtime.
Type: boolean
Default: false
services.proxy-suite.inbounds.manager.api.group
Group that may use the API socket, /run/proxy-suite-inbounds-manager/api.sock: all of
it, every user’s secrets included. null: userControl.group when it has the
“inbounds” scope, root only otherwise.
Type: null or string
Default: null
Example: "vpn-admins"
services.proxy-suite.inbounds.manager.api.listen
Address and port the API also listens on over TCP, for a bot on another host. Plain
HTTP: put it on loopback behind a TLS proxy. Needs tokensFile; the firewall is not
opened for it.
Type: null or string matching the pattern (][0-9A-Fa-f:.]+[|[0-9.]+|localhost):[0-9]{1,5}
Default: null
Example: "127.0.0.1:9180"
services.proxy-suite.inbounds.manager.api.tokensFile
File with the bearer tokens the TCP API takes, one per line, “name:token” or the token alone. Read at start.
Type: null or string
Default: null
Example: "/run/secrets/inbounds-manager-tokens"
services.proxy-suite.inbounds.manager.deleteExpiredAfter
Delete runtime users this long after their expiresAt, as proxy-ctl inbounds users rm
would: their secrets, policy and subscription go. A number with m, h, d or w. Users
declared in the config stay. null: never.
Type: null or string matching the pattern [0-9]+[mhdw]
Default: null
Example: "30d"
services.proxy-suite.inbounds.manager.interval
Seconds between two rounds of counting traffic and checking the policies.
Type: integer between 5 and 3600 (both inclusive)
Default: 30
services.proxy-suite.inbounds.manager.ipLimit.banTime
Seconds an address past a user’s ipLimit is banned for.
Type: positive integer, meaning >0
Default: 600
services.proxy-suite.inbounds.manager.notify.expiryDays
Days before the expiry that send a user.expiring event.
Type: list of (positive integer, meaning >0)
Default: [ 3 1 ]
services.proxy-suite.inbounds.manager.notify.trafficPercent
Shares of the traffic allowance used that send a user.traffic event, once per period.
Type: list of integer between 1 and 100 (both inclusive)
Default: [ 80 100 ]
services.proxy-suite.inbounds.manager.speedLimits.enable
Speed limits (policy.speedLimit). XRay marks the sockets its exits dial for a limited
user with the user’s slot, which proxy-suite’s XRay build carries a patch for
(pkgs/patches/xray-user-level-mark.patch), and nftables polices each mark’s
traffic both ways. AmneziaWG peers are policed by their tunnel address. Needs root.
Type: boolean
Default: false
services.proxy-suite.inbounds.manager.speedLimits.slots
How many users may have a speed limit at once: an XRay user level each.
Type: integer between 1 and 65535 (both inclusive)
Default: 512
services.proxy-suite.inbounds.manager.subscriptions.enable
Serve each user’s subscription from /run/proxy-suite-inbounds-manager/sub.sock, with the
headers clients read their traffic, allowance and expiry from (subscription-userinfo),
a title and an update interval. The token is the last part of the path, the same
as the static files’ (inbounds.subscriptions), so their URLs keep working:
services.nginx.virtualHosts."vpn.example.com".locations."/sub/".proxyPass =
"http://unix:/run/proxy-suite-inbounds-manager/sub.sock:";
Type: boolean
Default: config.services.proxy-suite.inbounds.shareLinks
services.proxy-suite.inbounds.manager.subscriptions.group
Group of the web server that connects to the subscription socket.
Type: string
Default: config.services.proxy-suite.inbounds.subscriptions.group
services.proxy-suite.inbounds.manager.subscriptions.listen
Address and port the subscriptions are also served on over TCP, for a web server that cannot reach the socket.
Type: null or string matching the pattern (][0-9A-Fa-f:.]+[|[0-9.]+|localhost):[0-9]{1,5}
Default: null
Example: "127.0.0.1:9181"
services.proxy-suite.inbounds.manager.subscriptions.profileTitle
The profile’s name in clients; {user} is the user’s.
Type: string
Default: "{user}"
Example: "My VPN ({user})"
services.proxy-suite.inbounds.manager.subscriptions.supportUrl
Where clients send users for help (support-url), such as a Telegram link.
Type: null or string
Default: null
Example: "https://t.me/my_vpn_support"
services.proxy-suite.inbounds.manager.subscriptions.updateInterval
Hours between clients’ updates of the subscription (profile-update-interval).
Type: null or (positive integer, meaning >0)
Default: 12
services.proxy-suite.inbounds.manager.subscriptions.webPageUrl
The service’s page (profile-web-page-url).
Type: null or string
Default: null
services.proxy-suite.inbounds.manager.webhooks
Where to tell about users created, deleted, updated, switched off (with why) and back on, their traffic reset, their term started on their first connection (user.activated), thresholds of their allowance, coming expiries and addresses banned past their ipLimit. Retried a few times; a hook that stays down misses them.
Type: list of (submodule)
Default: [ ]
Example:
[ { url = "http://127.0.0.1:8088/proxy-suite"; secretFile = "/run/secrets/hook"; } ]
services.proxy-suite.inbounds.manager.webhooks.*.events
Events to send. Empty: all of them.
Type: list of (one of “user.created”, “user.deleted”, “user.updated”, “user.enabled”, “user.disabled”, “user.reset”, “user.activated”, “user.traffic”, “user.expiring”, “user.ip-limit”)
Default: [ ]
services.proxy-suite.inbounds.manager.webhooks.*.secretFile
File with a secret: each body is signed, X-Proxy-Suite-Signature: sha256=<HMAC-SHA256 hex>.
Type: null or string
Default: null
services.proxy-suite.inbounds.manager.webhooks.*.url
URL the events are POSTed to as JSON: {event, user, at, data}.
Type: string
services.proxy-suite.inbounds.openFirewall
Open the firewall for every listener not on loopback.
Type: boolean
Default: true
services.proxy-suite.inbounds.routing.blockPorts
Destination ports clients may not reach, TCP and UDP: single ports and “from-to” ranges. Port 25 by default: mail sent straight to other servers, which spam goes out by and hosters close. Mail clients’ own ports (465, 587) stay open.
Type: list of (16 bit unsigned integer; between 0 and 65535 (both inclusive) or string matching the pattern [0-9]±[0-9]+)
Default: [ 25 ]
Example: [ 25 "6881-6889" ]
services.proxy-suite.inbounds.routing.blockPrivate
Block private and loopback addresses, so clients cannot reach this host’s LAN or local
services. Off, the LAN is open but this host is not. Either way, this host’s own
addresses (loopback, and its public ones as its interfaces carry them at start) are
reachable only on the listener ports and serverPorts, whichever via a client takes.
Type: boolean
Default: true
services.proxy-suite.inbounds.routing.blockRu
Block Russian destinations (geosite “category-ru”, geoip “ru”).
Type: boolean
Default: true
services.proxy-suite.inbounds.routing.blockTorrent
Block BitTorrent: connections XRay’s sniffing recognizes by the peers’ handshake, and µTP. Not trackers or DHT, nor what a client encrypts (MSE): it makes downloading slow, not impossible. Hosters act on the copyright notices torrents bring. Listeners given as raw XRay JSON need sniffing on for it.
Type: boolean
Default: true
services.proxy-suite.inbounds.routing.proxy.domains
Domains, with their subdomains, that clients always reach through the local proxy, whatever the listener’s via.
Type: list of string
Default: [ ]
Example: [ "youtube.com" ]
services.proxy-suite.inbounds.routing.proxy.geoips
Geoip codes that clients always reach through the local proxy, whatever the listener’s via; countries by default (see geodata).
Type: list of string
Default: [ ]
Example: [ "us" ]
services.proxy-suite.inbounds.routing.proxy.geosites
Geosite categories that clients always reach through the local proxy, whatever the listener’s via (see geodata).
Type: list of string
Default: [ ]
Example: [ "netflix" ]
services.proxy-suite.inbounds.routing.proxy.ips
IP ranges (CIDR) that clients always reach through the local proxy, whatever the listener’s via.
Type: list of string
Default: [ ]
Example: [ "1.1.1.0/24" ]
services.proxy-suite.inbounds.routing.serverSource.interface
Dummy interface the serverSource addresses are put on.
Type: string matching the pattern [a-zA-Z0-9_-]{1,15}
Default: "ps-self"
services.proxy-suite.inbounds.routing.serverSource.ipv4
Range each inbound user gets an address from, for the connections they make to this
host itself (serverAddress, serverAliases, serverPorts). Otherwise those come
from this host’s own address, and its services (mail, the web server, their rate
limits and bans) see every user as one. They see neither the users’ real addresses.
The addresses sit on a dummy interface and reach nothing but this host. Pick a range
nothing here routes or trusts. Users are numbered by their order, then name, from
the range’s second address: set order to keep each user’s address as users come
and go.
Type: null or string matching the pattern ([0-9]{1,3}\.){3}[0-9]{1,3}/[0-9]{1,2}
Default: null
Example: "10.78.0.0/24"
services.proxy-suite.inbounds.routing.serverSource.ipv6
The same for IPv6: a prefix written with “::”, such as a ULA /64. Needed as well when
serverAliases lists an IPv6 address, which is otherwise dialed from this host’s own.
Type: null or string matching the pattern [0-9a-fA-F:]*::/[0-9]{1,3}
Default: null
Example: "fd78:78:78::/64"
services.proxy-suite.inbounds.routing.via
Where client traffic exits by default. Each listener can override it.
- “proxy”: through the local proxy and its current pick (needs
proxy.enable). - an outbound tag from
proxy.outbounds: always that one (url,urlFileorxrayJsononly). - “direct”: straight from this host.
- “block”: dropped.
Type: string
Default: "proxy"
Example: "direct"
services.proxy-suite.inbounds.routing.zapretDirect
Send zapret hostlist sites direct, so this host’s zapret unblocks them. Only for the default via. With a direct listener or the XRay backend, only by IP: XRay matches names by what a client puts in its handshake, whatever address it connects to.
Type: boolean
Default: true
services.proxy-suite.inbounds.runtime.enable
Users and listeners added at runtime with proxy-ctl inbounds users add and
inbounds add, kept in inbounds.d in the state directory. Runtime users can be
bound to any listener; declared users to runtime listeners only. A change restarts
the inbounds, which drops every connection once. Anything a runtime listener could
reach beyond its port is declared here: its ports, certificates, exits and
fallbacks. Members of userControl.group need the “inbounds” scope.
Type: boolean
Default: false
services.proxy-suite.inbounds.runtime.fallbackDests
dest values a runtime listener’s fallbacks may use, such as a decoy site. A
fallback to a listener must name another runtime listener. A runtime listener’s
reality.dest may be any public site on port 443; one on another port, on this host
or on a private network must be listed here. Its hysteria.masquerade must be a
public http(s) site, on port 80 or 443 unless its host:port is listed here.
Type: list of (16 bit unsigned integer; between 0 and 65535 (both inclusive) or string)
Default: [ ]
Example: [ "127.0.0.1:8080" ]
services.proxy-suite.inbounds.runtime.ports
Ports runtime listeners may use, on any address: single ports and “from-to” ranges.
Opened in the firewall (TCP and UDP) with openFirewall, and reachable through the
tunnel like the listeners’ own. Keep them clear of the declared listeners and of
other services here.
Type: list of (16 bit unsigned integer; between 0 and 65535 (both inclusive) or string matching the pattern [0-9]±[0-9]+)
Default: [ ]
Example: [ 8443 "20000-20099" ]
services.proxy-suite.inbounds.runtime.tlsCertificates
Certificates a runtime listener with TLS (trojan, hysteria2, tls.enable) may use,
by name: it names one in tls.certificate (--tls <name>), never a file.
Type: attribute set of (submodule)
Default: { }
Example:
{
main = {
certificateFile = "/var/lib/acme/vpn.example.com/fullchain.pem";
keyFile = "/var/lib/acme/vpn.example.com/key.pem";
};
}
services.proxy-suite.inbounds.runtime.tlsCertificates.<name>.certificateFile
File with the PEM certificate chain.
Type: string
services.proxy-suite.inbounds.runtime.tlsCertificates.<name>.keyFile
File with the PEM private key.
Type: string
services.proxy-suite.inbounds.runtime.tlsCertificates.<name>.serverName
SNI in share links. null: serverAddress.
Type: null or string
Default: null
services.proxy-suite.inbounds.runtime.vias
Exits a runtime listener may pick with via, besides routing.via and “block”:
“proxy”, “direct” or a proxy.outbounds tag, as in routing.via.
Type: list of string
Default: [ ]
Example: [ "direct" ]
services.proxy-suite.inbounds.serverAddress
Public address for share links. null: detect the uplink IPv4.
Type: null or string matching the pattern [^[:space:]]+
Default: null
Example: "vpn.example.com"
services.proxy-suite.inbounds.serverAliases
Other names and IPs of this host that clients reach through the tunnel, such as a
TURN relay’s name beside the site on serverAddress. Like serverAddress, they go
direct on the listener ports instead of looping back through routing.via, which
often cannot reach this host at all. List the IPs too: a client that resolves a name
itself hands XRay the address, which no name rule matches. domain:example.com
covers that name and every name under it, for a host behind a wildcard record.
Type: list of string matching the pattern [^[:space:]]+
Default: [ ]
Example:
[
"turn.example.com"
"domain:example.com"
"203.0.113.10"
"2001:db8::10"
]
services.proxy-suite.inbounds.serverPorts
Ports of this host’s other services that clients reach through the tunnel on
serverAddress and serverAliases, such as mail, beside the listeners’ own. Direct
like those: a connection to this host from itself skips its firewall, so list only
what the firewall already opens to the internet. TCP and UDP alike. Any other port on
any address of this host is refused where the inbounds dial “direct” themselves; the
addresses are read as the inbounds start, so restart them after one changes (DHCP).
Without routing.serverSource these connections come from this host’s own address,
which its services may trust: a mail server that relays for its own host (Postfix’s
default mynetworks) relays for every inbound user then. Set serverSource, or keep
such services from trusting this host’s own addresses.
Type: list of (16 bit unsigned integer; between 0 and 65535 (both inclusive) or string matching the pattern [0-9]±[0-9]+)
Default: [ ]
Example: config.networking.firewall.allowedTCPPorts
services.proxy-suite.inbounds.shareLinks
Generate client share links for proxy-ctl inbounds link. Readable by root, and by userControl.group with the secrets scope.
Type: boolean
Default: true
services.proxy-suite.inbounds.subscriptions.enable
Generate a subscription per user, with their links from every listener, in
/run/proxy-suite-inbounds/subscriptions/<token>. Serve that directory with a web server.
Needs shareLinks.
Type: boolean
Default: false
services.proxy-suite.inbounds.subscriptions.baseUrl
Public URL of the subscription directory, used by proxy-ctl inbounds sub.
Type: null or string
Default: null
Example: "https://vpn.example.com/sub"
services.proxy-suite.inbounds.subscriptions.group
Group of the web server that serves the subscription files.
Type: string
Default: "nginx"
Example: "caddy"
services.proxy-suite.inbounds.subscriptions.keyFile
The key the subscription tokens are an HMAC under. Changing it changes every user’s URL.
null: generated on first start and kept in the state directory (inbounds/subscription-key), whereproxy-ctl inbounds exporttakes it from.- a file with a secret, such as
openssl rand -hex 32: that one, read at start and at each runtime change. false: no key. A token is a hash of the user’s name and credentials alone, as before there was a key: whoever learns one of a user’s links can work out their subscription URL, and from it every other link of theirs. For a server that gave URLs out before.
Type: null or value false (singular enum) or string
Default: null
Example: "/run/secrets/inbounds-subscription-key"
services.proxy-suite.inbounds.users
Inbound users, by name, which listeners accept by naming them in their users. Each
listener takes the secret its protocol wants: uuid/uuidFile for vless and vmess,
password/passwordFile for the others, the keys for AmneziaWG.
Type: attribute set of (submodule)
Default: { }
Example:
{
phone = {
order = 1;
uuidFile = "/run/secrets/proxy-inbound-uuid";
};
laptop.order = 2;
}
services.proxy-suite.inbounds.users.<name>.address
AmneziaWG tunnel IPv4 address, inside amneziaWg.subnet. null: the lowest free one,
kept for as long as the user exists.
Type: null or string
Default: null
Example: "10.66.0.10"
services.proxy-suite.inbounds.users.<name>.order
The user’s number, for good: their inbounds.routing.serverSource addresses are
that many past the start of each range (5: 10.78.0.5 in 10.78.0.0/24). Users
without one follow the highest number given, by name, and move when users are
added before them. Unique. Runtime users (inbounds.runtime) go around these numbers.
Type: null or (positive integer, meaning >0)
Default: null
Example: 1
services.proxy-suite.inbounds.users.<name>.password
Password (trojan, shadowsocks, socks, http). Ends up in the Nix store; prefer passwordFile.
Type: null or string
Default: null
Example: "hunter2"
services.proxy-suite.inbounds.users.<name>.passwordFile
File with the password.
Type: null or string
Default: null
Example: "/run/secrets/proxy-inbound-password"
services.proxy-suite.inbounds.users.<name>.policy.enabled
Whether the user may connect. Needs inbounds.manager, as every policy field does.
Type: boolean
Default: true
services.proxy-suite.inbounds.users.<name>.policy.expiresAfter
A term that starts with the user’s first connection, for access sold ahead: seconds,
or a number with m, h, d or w. Until they connect the user is on hold, and when
they do expiresAt is set to that much later. An expiresAt given wins.
Type: null or positive integer, meaning >0, or string matching the pattern [0-9]+[mhdw]
Default: null
Example: "30d"
services.proxy-suite.inbounds.users.<name>.policy.expiresAt
When the user’s access ends: a date (the end of that day, local time), an ISO time, or a Unix time. Their connections are cut then, and their subscription still says when it ended.
Type: null or unsigned integer, meaning >=0, or string matching the pattern [0-9]{4}-[0-9]{2}-[0-9]{2}([T ][0-9:.]+([±][0-9:]+|Z)?)?
Default: null
Example: "2026-12-31"
services.proxy-suite.inbounds.users.<name>.policy.ipLimit
How many addresses may use the user at once. The ones past it that came last are
banned for inbounds.manager.ipLimit.banTime from the user’s ports. Not on
AmneziaWG, whose peer has one address anyway, nor behind a PROXY-protocol front.
Type: null or (positive integer, meaning >0)
Default: null
Example: 2
services.proxy-suite.inbounds.users.<name>.policy.speedLimit
Speed limit in bits per second, decimal (k, M, G): one rate for both ways, or
“down/up”. Needs inbounds.manager.speedLimits.enable. On socks and http listeners
it does not apply.
Type: null or string matching the pattern [0-9]+(\.[0-9]+)?[kKMG]?(/[0-9]+(\.[0-9]+)?[kKMG]?)?
Default: null
Example: "20M/5M"
services.proxy-suite.inbounds.users.<name>.policy.trafficLimit
Traffic allowance, up and down together: bytes, or with K, M, G, T (binary units, as clients show them). Past it the user is switched off until the period renews or the traffic is reset.
Type: null or unsigned integer, meaning >=0, or string matching the pattern [0-9]+(\.[0-9]+)?[KMGTP]?(i?B)?
Default: null
Example: "50G"
services.proxy-suite.inbounds.users.<name>.policy.trafficPeriod
How often the allowance renews, at local midnight: daily, weekly, or monthly on the
day the count began. null: never; only a reset starts it over.
Type: null or one of “daily”, “weekly”, “monthly”
Default: null
services.proxy-suite.inbounds.users.<name>.presharedKeyFile
File with the AmneziaWG preshared key, instead of a generated one.
Type: null or string
Default: null
Example: "/run/secrets/awg-phone-psk"
services.proxy-suite.inbounds.users.<name>.privateKeyFile
File with the AmneziaWG client private key, instead of a generated one.
Type: null or string
Default: null
Example: "/run/secrets/awg-phone-key"
services.proxy-suite.inbounds.users.<name>.publicKey
AmneziaWG public key, for a client that keeps its own private key (no config or link is
generated for it). null: generate a key pair.
Type: null or string
Default: null
Example: "jNXH..."
services.proxy-suite.inbounds.users.<name>.uuid
UUID (vless, vmess). Ends up in the Nix store; prefer uuidFile.
Type: null or string
Default: null
Example: "b831381d-6324-4d53-ad4f-8cda48b30811"
services.proxy-suite.inbounds.users.<name>.uuidFile
File with the UUID.
Type: null or string
Default: null
Example: "/run/secrets/proxy-inbound-uuid"