Edge rules

Rules are given on the command or in the tunnel file. tunl http, tunl tcp, and tunl tls carry the same fields as flags. tunl start reads the definition in the file.

Example

tunnels:
  web:
    proto: http
    addr: 3000
    allow:
      - 203.0.113.4
      - 198.51.100.0/24
    deny:
      - 203.0.113.8
    rate: 60
    add:
      X-From: tunl
    remove:
      - X-Internal
    add_response:
      X-Out: tunl
    remove_response:
      - X-Powered-By
    host_header: rewrite
    routes:
      /api: 8080
      /static: file:///var/www
    verify_webhook: hmac-sha256:X-Signature:secret

allow and deny

If allow is filled in, only these IP addresses or CIDRs pass. Anything else returns 403. An address on the deny list does not pass even if it is also inside allow. Bracketed IPv6 is written too: [::1] and [::1]/128. On TCP and TLS, if the rule does not match, the connection closes. A rejected request is written to the inspector.

rate

This is how many requests each client is allowed per minute. 0 means unlimited. If it is exceeded, HTTP returns 429 and Retry-After: 60. The counter is separate for each tunnel and is kept per client address: when one client fills its quota, the others are not affected. In IPv6, addresses in the same /64 are one client. A fixed one-minute window is used. The counter increases before the password check. A password that does not match still counts as a request.

Headers

add and remove change the request headers. add_response and remove_response change the response headers. Response rules are also applied to a WebSocket 101 response. These fields are valid only on an HTTP tunnel. A TCP or TLS command stops by saying üstbilgi yalnız http. Host, Content-Length, Transfer-Encoding, and Connection cannot be changed.

Host header

host_header (CLI: --host-header) sets the Host header forwarded to the local app: rewrite sends the matched upstream's address (ideal for Vite, Next.js, Django, and virtual hosts), or write an explicit host[:port]. The original public host stays in X-Forwarded-Host. HTTP only.

Path routes

routes (CLI: repeatable --route /prefix=target) routes paths inside one HTTP tunnel to different local ports, https:// services, or file:// folders. Matching uses longest path prefix on segment boundaries (/api matches /api/users, not /apiv2). For file:// routes, the matched prefix is stripped before serving files. HTTP only.

Signature

verify_webhook is HTTP only. Accepted forms are github:secret, slack:secret, stripe:secret, and generic hmac-sha256:Header:secret (matches lowercase/uppercase hex, sha256=<hex>, or Base64 digests). If the signature does not match, the response is 403 and the body is imza tutmuyor. If the body is over 2 MiB, the response is 413. On TCP or TLS the field returns the error webhook yalnız http. When a tunnel has a webhook rule, the Inspector also offers Re-sign & replay so edited or expired deliveries can be replayed with a fresh signature.

In the panel

The rules of an open tunnel are shown at the top of the panel. A request dropped because of a rule stays in the list. That is how you tell a 403 from the server apart from the application's own 403: one is produced on the server, the other locally.