# services.proxy-suite.inbounds Part of the [proxy-suite options reference](./index.md). ## Options - inbounds - [enable](#services-proxy-suite-inbounds-enable) - [package](#services-proxy-suite-inbounds-package) - [listeners](#services-proxy-suite-inbounds-listeners) - `` - [address](#services-proxy-suite-inbounds-listeners-name-address) - [flow](#services-proxy-suite-inbounds-listeners-name-flow) - [jsonFile](#services-proxy-suite-inbounds-listeners-name-jsonfile) - [method](#services-proxy-suite-inbounds-listeners-name-method) - [port](#services-proxy-suite-inbounds-listeners-name-port) - [reality](#services-proxy-suite-inbounds-listeners-name-reality) - [enable](#services-proxy-suite-inbounds-listeners-name-reality-enable) - [dest](#services-proxy-suite-inbounds-listeners-name-reality-dest) - [privateKey](#services-proxy-suite-inbounds-listeners-name-reality-privatekey) - [privateKeyFile](#services-proxy-suite-inbounds-listeners-name-reality-privatekeyfile) - [publicKey](#services-proxy-suite-inbounds-listeners-name-reality-publickey) - [serverNames](#services-proxy-suite-inbounds-listeners-name-reality-servernames) - [shortIds](#services-proxy-suite-inbounds-listeners-name-reality-shortids) - [sharePort](#services-proxy-suite-inbounds-listeners-name-shareport) - [tls](#services-proxy-suite-inbounds-listeners-name-tls) - [enable](#services-proxy-suite-inbounds-listeners-name-tls-enable) - [alpn](#services-proxy-suite-inbounds-listeners-name-tls-alpn) - [certificateFile](#services-proxy-suite-inbounds-listeners-name-tls-certificatefile) - [keyFile](#services-proxy-suite-inbounds-listeners-name-tls-keyfile) - [serverName](#services-proxy-suite-inbounds-listeners-name-tls-servername) - [transport](#services-proxy-suite-inbounds-listeners-name-transport) - [host](#services-proxy-suite-inbounds-listeners-name-transport-host) - [mode](#services-proxy-suite-inbounds-listeners-name-transport-mode) - [path](#services-proxy-suite-inbounds-listeners-name-transport-path) - [serviceName](#services-proxy-suite-inbounds-listeners-name-transport-servicename) - [type](#services-proxy-suite-inbounds-listeners-name-transport-type) - [type](#services-proxy-suite-inbounds-listeners-name-type) - [users](#services-proxy-suite-inbounds-listeners-name-users) - item - [name](#services-proxy-suite-inbounds-listeners-name-users-name) - [password](#services-proxy-suite-inbounds-listeners-name-users-password) - [passwordFile](#services-proxy-suite-inbounds-listeners-name-users-passwordfile) - [uuid](#services-proxy-suite-inbounds-listeners-name-users-uuid) - [uuidFile](#services-proxy-suite-inbounds-listeners-name-users-uuidfile) - [via](#services-proxy-suite-inbounds-listeners-name-via) - [xrayJson](#services-proxy-suite-inbounds-listeners-name-xrayjson) - [openFirewall](#services-proxy-suite-inbounds-openfirewall) - routing - [blockPrivate](#services-proxy-suite-inbounds-routing-blockprivate) - [blockRu](#services-proxy-suite-inbounds-routing-blockru) - proxy - [domains](#services-proxy-suite-inbounds-routing-proxy-domains) - [geoips](#services-proxy-suite-inbounds-routing-proxy-geoips) - [geosites](#services-proxy-suite-inbounds-routing-proxy-geosites) - [ips](#services-proxy-suite-inbounds-routing-proxy-ips) - [via](#services-proxy-suite-inbounds-routing-via) - [zapretDirect](#services-proxy-suite-inbounds-routing-zapretdirect) - [serverAddress](#services-proxy-suite-inbounds-serveraddress) - [shareLinks](#services-proxy-suite-inbounds-sharelinks) - subscriptions - [enable](#services-proxy-suite-inbounds-subscriptions-enable) - [baseUrl](#services-proxy-suite-inbounds-subscriptions-baseurl) - [group](#services-proxy-suite-inbounds-subscriptions-group) ## services\.proxy-suite\.inbounds\.enable Whether to enable server inbounds that accept proxy connections from outside\. *Type:* boolean *Default:* ```nix false ``` *Example:* ```nix true ``` ## services\.proxy-suite\.inbounds\.package XRay package serving the inbounds, whatever the client-side backend\. *Type:* package *Default:* proxy-suite’s ` xray ` (` pkgs/xray.nix `) *Example:* ```nix pkgs.xray ``` ## services\.proxy-suite\.inbounds\.listeners Listeners by tag\. *Type:* attribute set of (submodule) *Default:* ```nix { } ``` *Example:* ```nix { vless-reality = { type = "vless"; port = 443; users = [ { uuidFile = "/run/secrets/proxy-inbound-uuid"; } ]; flow = "xtls-rprx-vision"; reality = { enable = true; serverNames = [ "www.microsoft.com" ]; privateKeyFile = "/run/secrets/proxy-inbound-reality-key"; publicKey = "jNXH..."; shortIds = [ "0123abcd" ]; }; }; } ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.address Bound address\. A loopback address keeps the port closed in the firewall\. *Type:* string matching the pattern \[^\[:space:]]+ *Default:* ```nix "::" ``` *Example:* ```nix "127.0.0.1" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.flow VLESS flow; raw transport only\. *Type:* null or value “xtls-rprx-vision” (singular enum) *Default:* ```nix null ``` *Example:* ```nix "xtls-rprx-vision" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.jsonFile Runtime path to a raw XRay inbound (no share link); tag is overridden\. *Type:* null or string *Default:* ```nix null ``` *Example:* ```nix "/run/secrets/proxy-inbound-vless.json" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.method Shadowsocks cipher\. 2022 ciphers take a base64 key of matching length as password\. *Type:* string *Default:* ```nix "2022-blake3-aes-128-gcm" ``` *Example:* ```nix "aes-128-gcm" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.port Bound port\. *Type:* 16 bit unsigned integer; between 0 and 65535 (both inclusive) *Default:* ```nix 443 ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.reality REALITY\. *Type:* submodule *Default:* ```nix { } ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.reality\.enable Enable REALITY\. Exclusive with tls\. *Type:* boolean *Default:* ```nix false ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.reality\.dest TLS 1\.3 + HTTP/2 server that unauthenticated probes are forwarded to\. *Type:* string *Default:* ```nix "www.microsoft.com:443" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.reality\.privateKey x25519 private key\. Ends up in the Nix store; prefer privateKeyFile\. *Type:* null or string *Default:* ```nix null ``` *Example:* ```nix "gG1Yz..." ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.reality\.privateKeyFile Runtime path to the x25519 private key (` xray x25519 `)\. *Type:* null or string *Default:* ```nix null ``` *Example:* ```nix "/run/secrets/proxy-inbound-reality-key" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.reality\.publicKey x25519 public key, required for share links\. *Type:* null or string *Default:* ```nix null ``` *Example:* ```nix "jNXH..." ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.reality\.serverNames Accepted SNIs, served by dest\. The first goes into share links\. *Type:* list of string *Default:* ```nix [ ] ``` *Example:* ```nix [ "www.microsoft.com" ] ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.reality\.shortIds Accepted short IDs (hex)\. The first goes into share links\. *Type:* list of string *Default:* ```nix [ "" ] ``` *Example:* ```nix [ "0123abcd" ] ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.sharePort Port share links advertise, when something in front owns the public port\. Null uses port\. *Type:* null or 16 bit unsigned integer; between 0 and 65535 (both inclusive) *Default:* ```nix null ``` *Example:* ```nix 443 ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.tls TLS termination\. *Type:* submodule *Default:* ```nix { } ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.tls\.enable Terminate TLS (always on for trojan)\. Exclusive with reality\. *Type:* boolean *Default:* ```nix false ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.tls\.alpn ALPN offered and put in share links\. \[ “h3” ] alone makes an xhttp listener UDP-only, so a web server can keep the TCP port\. *Type:* null or (list of (one of “h3”, “h2”, “http/1\.1”)) *Default:* ```nix null ``` *Example:* ```nix [ "h3" ] ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.tls\.certificateFile Runtime path to the PEM certificate chain\. *Type:* null or string *Default:* ```nix null ``` *Example:* ```nix "/var/lib/acme/example.com/fullchain.pem" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.tls\.keyFile Runtime path to the PEM private key\. *Type:* null or string *Default:* ```nix null ``` *Example:* ```nix "/var/lib/acme/example.com/key.pem" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.tls\.serverName SNI in share links\. Defaults to inbounds\.serverAddress\. *Type:* null or string *Default:* ```nix null ``` *Example:* ```nix "example.com" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.transport Stream transport\. *Type:* submodule *Default:* ```nix { } ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.transport\.host Expected Host header (ws, httpupgrade, xhttp)\. Null accepts any\. *Type:* null or string *Default:* ```nix null ``` *Example:* ```nix "cdn.example.com" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.transport\.mode xhttp mode\. Null lets the client choose; behind an HTTP/1\.1 proxy use “packet-up”\. *Type:* null or one of “auto”, “packet-up”, “stream-up”, “stream-one” *Default:* ```nix null ``` *Example:* ```nix "packet-up" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.transport\.path Request path (ws, httpupgrade, xhttp)\. *Type:* string *Default:* ```nix "/" ``` *Example:* ```nix "/download" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.transport\.serviceName gRPC service name\. *Type:* string *Default:* ```nix "" ``` *Example:* ```nix "GunService" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.transport\.type Stream transport\. “raw” is plain TCP, the usual choice for REALITY\. *Type:* one of “raw”, “ws”, “grpc”, “httpupgrade”, “xhttp” *Default:* ```nix "raw" ``` *Example:* ```nix "ws" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.type Protocol\. Set exactly one of type, xrayJson, or jsonFile\. *Type:* null or one of “vless”, “vmess”, “trojan”, “shadowsocks”, “socks”, “http” *Default:* ```nix null ``` *Example:* ```nix "vless" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.users Accepted accounts\. *Type:* list of (submodule) *Default:* ```nix [ ] ``` *Example:* ```nix [ { uuidFile = "/run/secrets/proxy-inbound-uuid"; } ] ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.users\.\*\.name Account label: the share link’s name, and what subscriptions and stats group by\. *Type:* string *Default:* ```nix "" ``` *Example:* ```nix "phone" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.users\.\*\.password Password (trojan, shadowsocks, socks, http)\. Ends up in the Nix store; prefer passwordFile\. *Type:* null or string *Default:* ```nix null ``` *Example:* ```nix "hunter2" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.users\.\*\.passwordFile Runtime path to the password\. *Type:* null or string *Default:* ```nix null ``` *Example:* ```nix "/run/secrets/proxy-inbound-password" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.users\.\*\.uuid UUID (vless, vmess)\. Ends up in the Nix store; prefer uuidFile\. *Type:* null or string *Default:* ```nix null ``` *Example:* ```nix "b831381d-6324-4d53-ad4f-8cda48b30811" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.users\.\*\.uuidFile Runtime path to the UUID\. *Type:* null or string *Default:* ```nix null ``` *Example:* ```nix "/run/secrets/proxy-inbound-uuid" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.via Egress, as in inbounds\.routing\.via\. Null inherits it\. *Type:* null or string *Default:* ```nix null ``` *Example:* ```nix "nl-vps" ``` ## services\.proxy-suite\.inbounds\.listeners\.\\.xrayJson Raw XRay inbound, built into the store; tag is overridden\. *Type:* null or (attribute set) *Default:* ```nix null ``` *Example:* ```nix { protocol = "dokodemo-door"; settings = { port = 8080; }; } ``` ## services\.proxy-suite\.inbounds\.openFirewall Open every non-loopback listener port\. *Type:* boolean *Default:* ```nix true ``` ## services\.proxy-suite\.inbounds\.routing\.blockPrivate Block private and loopback destinations, so clients cannot reach this host’s LAN or local services\. *Type:* boolean *Default:* ```nix true ``` ## services\.proxy-suite\.inbounds\.routing\.blockRu Block Russian destinations (geosite “category-ru”, geoip “ru”)\. *Type:* boolean *Default:* ```nix true ``` ## services\.proxy-suite\.inbounds\.routing\.proxy\.domains Domain suffixes to match\. *Type:* list of string *Default:* ```nix [ ] ``` *Example:* ```nix [ "youtube.com" ] ``` ## services\.proxy-suite\.inbounds\.routing\.proxy\.geoips Geoip names to match (see geodata; the defaults are country codes only)\. *Type:* list of string *Default:* ```nix [ ] ``` *Example:* ```nix [ "us" ] ``` ## services\.proxy-suite\.inbounds\.routing\.proxy\.geosites Geosite names to match (see geodata)\. *Type:* list of string *Default:* ```nix [ ] ``` *Example:* ```nix [ "netflix" ] ``` ## services\.proxy-suite\.inbounds\.routing\.proxy\.ips IP CIDRs to match\. *Type:* list of string *Default:* ```nix [ ] ``` *Example:* ```nix [ "1.1.1.0/24" ] ``` ## services\.proxy-suite\.inbounds\.routing\.via Default egress of inbound traffic; listeners can override it: - “proxy”: through the local proxy and its current selection (needs proxy\.enable)\. - a proxy\.outbounds tag: pinned to that server (url, urlFile or xrayJson outbounds only)\. - “direct”: out from this machine\. - “block”: dropped\. *Type:* string *Default:* ```nix "proxy" ``` *Example:* ```nix "direct" ``` ## services\.proxy-suite\.inbounds\.routing\.zapretDirect Send zapret’s hostlist destinations direct, so this host’s zapret unblocks them (default via only)\. *Type:* boolean *Default:* ```nix true ``` ## services\.proxy-suite\.inbounds\.serverAddress Public address clients connect to, used in share links\. Null detects the uplink IPv4\. *Type:* null or string matching the pattern \[^\[:space:]]+ *Default:* ```nix null ``` *Example:* ```nix "vpn.example.com" ``` ## services\.proxy-suite\.inbounds\.shareLinks Write client share links for ` proxy-ctl inbounds link ` (root and userControl\.group only)\. *Type:* boolean *Default:* ```nix true ``` ## services\.proxy-suite\.inbounds\.subscriptions\.enable Write one subscription file per user (their links from every listener, base64) to /run/proxy-suite-inbounds/subscriptions/\\. Serve that directory with a web server; see the README\. *Type:* boolean *Default:* ```nix false ``` *Example:* ```nix true ``` ## services\.proxy-suite\.inbounds\.subscriptions\.baseUrl URL the subscription directory is served at, for ` proxy-ctl inbounds sub `\. *Type:* null or string *Default:* ```nix null ``` *Example:* ```nix "https://vpn.example.com/sub" ``` ## services\.proxy-suite\.inbounds\.subscriptions\.group Group allowed to read the subscription files: the web server serving them\. *Type:* string *Default:* ```nix "nginx" ``` *Example:* ```nix "caddy" ```