Are you an LLM? You can read better optimized documentation at /en\tutorial\configuration-reference.md for this page in Markdown format
Configuration Reference
Useful tools
- Sub-Store can convert supported subscription formats.
- See the Mihomo configuration examples and syntax handbook for the authoritative, current field definitions.
Example YAML
yaml
# Local inbound listeners
port: 7890
socks-port: 7891
mixed-port: 7892
allow-lan: false
mode: rule
log-level: info
ipv6: false
# Web API and dashboard
external-controller: 127.0.0.1:9090
secret: "replace-with-a-private-secret"
# DNS
dns:
enable: true
enhanced-mode: fake-ip
fake-ip-range: 198.18.0.1/16
# Example local upstream; replace with a real node
proxies:
- name: local-socks
type: socks5
server: 127.0.0.1
port: 1080
proxy-groups:
- name: Proxy
type: select
proxies: [local-socks, DIRECT]
rules:
- DOMAIN-SUFFIX,example.com,Proxy
- MATCH,DIRECTmode: rule uses the rules list; global sends all traffic through one selected policy, while direct bypasses proxies. allow-lan: true permits other devices to use listeners only when binding and firewall settings allow it. Use authentication for shared proxy listeners and a strong secret for the controller.
See inbound, outbound, DNS and rules for explanations of each section.
