Function: tunnelInterceptor()
tunnelInterceptor(
options?,runtime?):Interceptor
Build the tunnel Interceptor. Pass it to createApp({ interceptor }).
A no-op (logs and returns) when none of the selected tunnel clients resolve usable configuration, so an app can register it unconditionally.
Parameters
Section titled “Parameters”options?
Section titled “options?”frpPath?
Section titled “frpPath?”string = ...
frpProtocol?
Section titled “frpProtocol?”string = ...
frpProxyName?
Section titled “frpProxyName?”string = ...
frpPublicDomain?
Section titled “frpPublicDomain?”string = ...
frpServer?
Section titled “frpServer?”string = ...
frpServerPort?
Section titled “frpServerPort?”number = ...
frpStripPrefix?
Section titled “frpStripPrefix?”boolean = ...
frpToken?
Section titled “frpToken?”string = ...
number = ...
portrSshUrl?
Section titled “portrSshUrl?”string = ...
publicDomain?
Section titled “publicDomain?”string = ...
subdomain?
Section titled “subdomain?”string = ...
transport?
Section titled “transport?”"portr" | "frp" | "both" = ...
runtime?
Section titled “runtime?”TunnelRuntime = defaultRuntime
Returns
Section titled “Returns”Interceptor
Example
Section titled “Example”import { appkit } from "@dbx-tools/appkit";import { tunnelInterceptor } from "@dbx-tools/tunnel";
await appkit.createApp({ plugins: [server({ host, staticPath })], interceptor: tunnelInterceptor(),});