Skip to content

tunnel

Forward tunnel proxy requests to the new server.

Only supports tunnel proxy tunnel://domain:port, not WebSocket requests or regular HTTP/HTTPS conversion.

Rule Syntax

txt
pattern tunnel://value [filters...]
ParametersDescriptionDetailed Documentation
patternExpression to match WebSocket request URLsMatch Pattern Documentation
valueTarget URL format: domain[:port]
port defaults to 443
⚠️ Loading data from files/remote URLs is not supported
Operation Instruction Documentation
filtersOptional filters, supports matching:
• Request URL/Method/Headers/Content
• Response Status Code/Headers
Filter Documentation

TUNNEL Conversion

txt
tunnel://www.example.com tunnel://www.test.com:5678
tunnel://www.example2.com:8080 tunnel://www.test.com
Original RequestTransformation Result
tunnel://www.example.com:443tunnel://www.test.com:5678
tunnel://www.example2.com:8080tunnel://www.test.com:443

TUNNEL requests do not have automatic path splicing and path splicing is disabled. Other requests matching the tunnel protocol result:

  • WebSocket requests: Ignore the match
  • Normal HTTP/HTTPS requests: Return a 502 error