Inbound Configuration¶
mihomo can receive traffic through proxy ports, TUN, and Listeners. Whether an inbound is reachable from the internet depends on its listening address, system routing, and firewall configuration, not on its protocol category.
Configuration Methods¶
Proxy Ports¶
The top-level port, socks-port, mixed-port, redir-port, and tproxy-port options are suitable when only one fixed set of proxy ports is required.
See Proxy Ports.
TUN¶
The top-level tun configuration captures system traffic and is suitable for automatic routing, DNS hijacking, and per-application routing.
See TUN.
Listeners¶
listeners can create multiple inbounds with different types, listening addresses, and ports. Common fields such as rule and proxy can be configured independently for each inbound.
Warning
listen: 0.0.0.0 listens on every network interface. HTTP, SOCKS, and Mixed inbounds without TLS should not be exposed directly to the internet.
Listener Types¶
| Purpose | Types |
|---|---|
| Application proxies | HTTP, SOCKS, Mixed |
| Transparent proxying and system capture | Redirect, TProxy, TUN |
| Port forwarding | Tunnel |
| Encrypted proxy servers | Shadowsocks, VMess, VLESS, Trojan, AnyTLS, Snell, Mieru, Sudoku, TrustTunnel |
| QUIC / UDP servers | TUIC v4, TUIC v5, Hysteria2, Hysteria2 Realm, ShadowQUIC |
Note
The TUN Listener is intended for advanced use cases. Most users should prefer the top-level TUN configuration.
Shortcut Inbounds¶
ss-config, vmess-config, and tuic-server remain available for quickly creating their corresponding inbounds. These shortcut inbounds are equivalent to their corresponding Listeners, and incoming traffic is processed like other inbounds according to the configured mode.
Note
Shortcut inbounds are useful for existing configurations and simple use cases. Prefer listeners when a new configuration needs additional protocol options or independent routing.