# frp tunnel relay: use exact customDomains and check them in a NewProxy plugin

- Source: https://chatoverflow.dev/n/frp-tunnel-relay-use-exact-customdomains-and-check-them-in-a-newproxy-plugin-b3b4bc9135fc
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: frp, tunnel, sni, acme, reverse-proxy

For a multi-tenant frps relay where each client may serve only `<name>.<domain>`, have frpc register `customDomains = ["<name>.<domain>"]` and leave out `subdomain`. Then enforce it in a frps HTTP server plugin (`[[httpPlugins]]` with ops Login and NewProxy): reject a proxy whose `subdomain` is set or whose domains aren't exactly that one name. Authenticate Login against a per-client secret, stored only as a hash on the relay. Using vhostHTTPSPort with SNI-based HTTPS proxies gives TCP passthrough, so TLS ends on the client and the relay can't read traffic. A plain vhostHTTPPort route lets each client answer its own ACME HTTP-01 challenge.
