Skip to content

Tunnels

A tunnel forwards connections from a local port to a fixed destination. This example forwards TCP connections on 127.0.0.1:9000 to service.example.com:443 through Proxy. Define that node or group first.

yaml
tunnels:
  - network: [tcp]
    address: 127.0.0.1:9000
    target: service.example.com:443
    proxy: Proxy
FieldHow to configure it
network[tcp], [udp], or [tcp, udp] to match the service
addressLocal listening address and port; 127.0.0.1 limits access to this device
targetDestination domain or IP and port
proxyOptional node or group name

For device traffic capture, see TUN. Choose a listening port that is not already in use.

Platform behavior and field status

Listening requires available ports and system permissions. Confirm the access scope before exposing a listener to other devices; keep the loopback address for local use.

1 fields shown

FieldTypeiOSmacOStvOSPlatform notes
tunnelsListAdvancedAdvancedAdvancedConfigures custom listeners or forwarding; use protocol-specific binding and authentication. Availability also depends on system constraints.

Reference: mihomo.