### Example Proxy Configuration Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/proxies/index.en.md A comprehensive example of a proxy configuration entry, demonstrating various fields including smux and brutal-opts. ```yaml proxies: - name: "ss" type: ss server: server port: 443 ip-version: ipv4 udp: true interface-name: eth0 routing-mark: 1234 tfo: false mptcp: false dialer-proxy: ss1 smux: enabled: true protocol: smux max-connections: 4 min-streams: 4 max-streams: 0 statistic: false only-tcp: false padding: true brutal-opts: enabled: true up: 50 down: 100 ``` -------------------------------- ### Link Example Source: https://github.com/metacubex/meta-docs/blob/main/docs/example/conf.md An example URL for accessing GeoX documentation. This link provides further details on geographical proxy rules. ```text https://wiki.metacubex.one/example/geox ``` -------------------------------- ### URI Proxy Provider Examples Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/proxy-providers/content.md Examples of proxy configurations using URI format. These can be direct links to proxy configurations. ```yaml ss://YWVzLTI1Ni1nY206bWV0YUAxMjcuMC4wLjE6NDQz#home vmess://eyJhZGQiOiIxMjcuMC4wLjEiLCJhaWQiOiIwIiwiYWxwbiI6IiIsImZwIjoiIiwiaG9zdCI6IiIsImlkIjoiMTIyMzQ1Njc4OSIsIm5ldCI6InRjcCIsInBhdGgiOiIiLCJwb3J0IjoiNDQzIiwicHMiOiJ2bWVzcyIsInNjeSI6ImF1dG8iLCJzbmkiOiIiLCJ0bHMiOiIiLCJ0eXBlIjoibm9uZSIsInYiOiIyIn0= ``` -------------------------------- ### Full DNS Configuration Example Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/dns/index.md A comprehensive example of DNS configuration settings, demonstrating various options for enabling DNS, caching, enhanced modes, and nameserver policies. ```yaml dns: enable: true cache-algorithm: arc prefer-h3: false use-hosts: true use-system-hosts: true respect-rules: false listen: 0.0.0.0:1053 ipv6: false default-nameserver: - 223.5.5.5 enhanced-mode: fake-ip fake-ip-range: 198.18.0.1/16 # fake-ip-range6: fdfe:dcba:9876::1/64 fake-ip-filter-mode: blacklist fake-ip-filter: - '*.lan' # fake-ip-ttl: 1 nameserver-policy: '+.arpa': '10.0.0.1' 'rule-set:cn': - https://doh.pub/dns-query - https://dns.alidns.com/dns-query nameserver: - https://doh.pub/dns-query - https://dns.alidns.com/dns-query fallback: - tls://8.8.4.4 - tls://1.1.1.1 proxy-server-nameserver: - https://doh.pub/dns-query proxy-server-nameserver-policy: 'www.yournode.com': '114.114.114.114' direct-nameserver: - system direct-nameserver-follow-policy: false fallback-filter: geoip: true geoip-code: CN geosite: - gfw ipcidr: - 240.0.0.0/4 domain: - '+.google.com' - '+.facebook.com' - '+.youtube.com' ``` -------------------------------- ### Example Proxy Provider Configuration Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/proxy-providers/index.md This is a comprehensive example of a proxy provider configuration, demonstrating various settings like type, URL, headers, health checks, and overrides. ```yaml proxy-providers: provider1: type: http url: "http://test.com" path: ./proxy_providers/provider1.yaml interval: 3600 proxy: DIRECT size-limit: 0 header: User-Agent: - "mihomo/1.18.3" Authorization: - 'token 1231231' health-check: enable: true url: https://www.gstatic.com/generate_204 interval: 300 timeout: 5000 lazy: true expected-status: 204 override: tfo: false mptcp: false udp: true udp-over-tcp: false down: "50 Mbps" up: "10 Mbps" skip-cert-verify: true dialer-proxy: proxy interface-name: tailscale0 routing-mark: 233 ip-version: ipv4-prefer additional-prefix: "provider1 prefix |" additional-suffix: "| provider1 suffix" proxy-name: - pattern: "IPLC-(.*?)倍" target: "iplc x $1" filter: "(?i)港|hk|hongkong|hong kong" exclude-filter: "xxx" exclude-type: "ss|http" payload: - name: "ss1" type: ss server: server port: 443 cipher: chacha20-ietf-poly1305 password: "password" ``` -------------------------------- ### Example MRS Link Source: https://github.com/metacubex/meta-docs/blob/main/docs/example/conf.md This is an example URL for MetaCubeX Rule Set (MRS) documentation. Use this as a reference for understanding MRS file structure and usage. ```text https://wiki.metacubex.one/example/mrs ``` -------------------------------- ### Tailscale Proxy Configuration Example Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/proxies/tailscale.en.md This YAML snippet shows a complete configuration for the Tailscale proxy. Traffic is only routed through Tailscale if explicitly directed by rules. Proxies start connecting only when the first matching connection is triggered. ```yaml proxies: - name: "tailscale" type: tailscale hostname: mihomo auth-key: tskey-auth-xxxx control-url: https://controlplane.tailscale.com state-dir: ./tailscale ephemeral: false udp: true accept-routes: true exit-node: 100.64.0.1 exit-node-allow-lan-access: true dialer-proxy: "ss1" interface-name: "WLAN" routing-mark: 6666 ip-version: ipv4-prefer ``` -------------------------------- ### VMess Proxy Configuration Example Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/proxies/vmess.en.md A comprehensive example of a VMess proxy configuration, demonstrating various settings including server details, authentication, TLS, and transport options. ```yaml proxies: - name: "vmess" type: vmess server: server port: 443 udp: true uuid: uuid alterId: 0 cipher: auto packet-encoding: packetaddr global-padding: false authenticated-length: false tls: true servername: example.com alpn: - h2 - http/1.1 fingerprint: xxxx client-fingerprint: chrome skip-cert-verify: true reality-opts: public-key: xxxx short-id: xxxx network: tcp smux: enabled: false ``` -------------------------------- ### Start Mihomo Service Source: https://github.com/metacubex/meta-docs/blob/main/docs/startup/service/index.md Immediately starts the Mihomo service. ```shell systemctl start mihomo ``` -------------------------------- ### ShadowSocks Listener Configuration Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/inbound/listeners/ss.md Configuration example for a ShadowSocks listener with detailed explanations of its parameters. ```APIDOC ## ShadowSocks Listener Configuration ### Description This section details the configuration of a ShadowSocks listener, including network settings, encryption, and transport protocols. ### Method N/A (Configuration file example) ### Endpoint N/A (Configuration file) ### Parameters #### Listener Settings - **name** (string) - Required - Name of the listener. - **type** (string) - Required - Type of the listener, must be 'shadowsocks'. - **port** (integer) - Required - The port the listener will bind to. - **listen** (string) - Required - The IP address to listen on (e.g., '0.0.0.0'). - **cipher** (string) - Required - The encryption cipher to use. See 'Cipher Methods' below for options. - **password** (string) - Required - The password for the ShadowSocks connection. See 'Password Format' below. - **udp** (boolean) - Optional - Whether to enable UDP support. Defaults to false. #### Optional Features (Commented Out) - **shadow-tls**: Configuration for ShadowTLS. - **enable** (boolean) - Enable or disable ShadowTLS. - **version** (string) - ShadowTLS version ('v1', 'v2', 'v3'). - **password** (string) - Password for ShadowTLS v2. - **users** (array of objects) - User configurations for ShadowTLS v3. - **name** (string) - Username. - **password** (string) - User password. - **handshake** (object) - Handshake configuration. - **dest** (string) - Destination address and port for handshake. - **kcp-tun**: Configuration for KCP tunneling. - **enable** (boolean) - Enable or disable KCP tunneling. - **key** (string) - Pre-shared secret key. - **crypt** (string) - Encryption method for KCP. - **mode** (string) - KCP profile mode. - **conn** (integer) - Number of UDP connections. - **autoexpire** (integer) - Auto expiration time for UDP connections in seconds. - **scavengettl** (integer) - Time in seconds an expired connection can live. - **ratelimit** (integer) - Maximum outgoing speed in bytes per second. - **mtu** (integer) - Maximum transmission unit for UDP packets. - **sndwnd** (integer) - Send window size (number of packets). - **rcvwnd** (integer) - Receive window size (number of packets). - **datashard** (integer) - Reed-Solomon erasure coding data shards. - **parityshard** (integer) - Reed-Solomon erasure coding parity shards. - **dscp** (integer) - DSCP value. - **nocomp** (boolean) - Disable compression. - **acknodelay** (boolean) - Flush ACK immediately. - **nodelay** (integer) - **interval** (integer) - **resend** (integer) - **sockbuf** (integer) - Per-socket buffer in bytes. - **smuxver** (integer) - SMUX version (1 or 2). - **smuxbuf** (integer) - Overall de-mux buffer in bytes. - **framesize** (integer) - SMUX max frame size. - **streambuf** (integer) - Per stream receive buffer in bytes (SMUX v2+). - **keepalive** (integer) - Seconds between heartbeats. ### Request Example ```yaml listeners: - name: ss-in type: shadowsocks port: 10001 listen: 0.0.0.0 cipher: 2022-blake3-aes-256-gcm password: vlmpIPSyHH6f4S8WVPdRIHIlzmB+GIRfoH3aNJ/t9Gg= udp: true ``` ### Response N/A (Configuration file) ### Cipher Methods | Method | Password Length | | ----------------------------- | --------------- | | 2022-blake3-aes-128-gcm | 16 | | 2022-blake3-aes-256-gcm | 32 | | 2022-blake3-chacha20-poly1305 | 32 | | none | / | | aes-128-gcm | / | | aes-192-gcm | / | | aes-256-gcm | / | | chacha20-ietf-poly1305 | / | | xchacha20-ietf-poly1305 | / | ### Password Format | Method | Password Format | | ------ | ------------------------------------------- | | none | / | | 2022 | `openssl rand --base64 ` | | Other | Any string | ### UDP Support - **udp** (boolean): Specifies whether to enable UDP listening for the ShadowSocks connection. Set to `true` to enable, `false` to disable. ``` -------------------------------- ### Enable Mihomo Service Source: https://github.com/metacubex/meta-docs/blob/main/docs/startup/service/index.md Configures the Mihomo service to start automatically on system boot. ```shell systemctl enable mihomo ``` -------------------------------- ### Stash Configuration Example Source: https://github.com/metacubex/meta-docs/blob/main/docs/example/conf.md A comprehensive example of a Stash configuration file. This includes proxy providers, network settings, DNS configuration, and detailed proxy group definitions for traffic management. ```yaml ######### 锚点 start ####### # 策略组相关 pr: &pr {type: select, proxies: [默认, 香港, 香港自动选择, 台湾, 台湾自动选择, 日本, 日本自动选择, 新加坡, 新加坡自动选择, 美国, 美国自动选择, 其它地区, 全部节点, 自动选择, 直连]} #这里是订阅更新和延迟测试相关的 p: &p {type: http, interval: 3600, health-check: {enable: true, url: "https://www.gstatic.com/generate_204", interval: 300}} ######### 锚点 end ####### # url 里填写自己的订阅,名称不能重复 proxy-providers: provider1: <<: *p url: "" provider2: <<: *p url: "" ipv6: true allow-lan: true mixed-port: 7890 external-controller: 127.0.0.1:9090 profile: store-selected: true store-fake-ip: true dns: enable: true ipv6: true enhanced-mode: fake-ip fake-ip-range: 28.0.0.1/8 fake-ip-filter: - "*" - "+.lan" - "+.local" default-nameserver: - 223.5.5.5 nameserver: - https://doh.pub/dns-query - https://dns.alidns.com/dns-query proxies: - name: "直连" type: direct udp: true proxy-groups: - {name: 默认, type: select, proxies: [自动选择, 直连, 香港, 香港自动选择, 台湾, 台湾自动选择, 日本, 日本自动选择, 新加坡, 新加坡自动选择, 美国, 美国自动选择, 其它地区, 全部节点], icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/Proxy.png"} - {name: Google, <<: *pr, icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/Google_Search.png"} - {name: Apple, <<: *pr, icon: https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/Apple.png} - {name: Telegram, <<: *pr, icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/Telegram.png"} - {name: Twitter, <<: *pr, icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/Twitter.png"} - {name: ehentai, <<: *pr, icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/Panda.png"} - {name: 哔哩哔哩, <<: *pr, icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/bilibili.png"} - {name: 哔哩东南亚, <<: *pr, icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/bilibili.png"} - {name: 巴哈姆特, <<: *pr, icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/Bahamut.png"} - {name: YouTube, <<: *pr, icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/YouTube.png"} - {name: NETFLIX, <<: *pr, icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/Netflix.png"} - {name: Spotify, <<: *pr, icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/Spotify.png"} - {name: 国内, type: select, proxies: [直连, 默认, 香港, 香港自动选择, 台湾, 台湾自动选择, 日本, 日本自动选择, 新加坡, 新加坡自动选择, 美国, 美国自动选择, 其它地区, 全部节点, 自动选择], icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/China_Map.png"} - {name: 其他, <<: *pr, icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/Final.png"} #分隔,下面是地区分组 - {name: 香港, type: select, include-all: true, filter: "(?i)(?!直连)(港|hk|hongkong|hong kong)", icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/HK.png"} - {name: 台湾, type: select, include-all: true, filter: "(?i)(?!直连)(台|tw|taiwan)", icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/TW.png"} - {name: 日本, type: select, include-all: true, filter: "(?i)(?!直连)(日|jp|japan)", icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/JP.png"} - {name: 美国, type: select, include-all: true, filter: "(?i)(?!直连)(美|us|unitedstates|united states)", icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/US.png"} - {name: 新加坡, type: select, include-all: true, filter: "(?i)(?!直连)(新|sg|singapore)", icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/SG.png"} - {name: 其它地区, type: select, include-all: true, filter: "(?i)^(?!.*(?:🇭🇰|🇯🇵|🇺🇸|🇸🇬|🇨🇳|港|hk|hongkong|台|tw|taiwan|日|jp|japan|新|sg|singapore|美|us|unitedstates|直连)).*", icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/mini/Available.png"} ``` -------------------------------- ### External Link Example Source: https://github.com/metacubex/meta-docs/blob/main/docs/example/conf.ru.md An example of an external link to further documentation or resources. ```text https://wiki.metacubex.one/example/stash ``` -------------------------------- ### Update Basic Configuration Source: https://github.com/metacubex/meta-docs/blob/main/docs/api/index.md Example of updating the mixed-port configuration using a PATCH request. ```json '{"mixed-port": 7890}' ``` -------------------------------- ### URL-Test Proxy Group Configuration Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/proxy-groups/url-test.md Configuration example for a URL-test proxy group. ```APIDOC ## URL-Test Proxy Group Configuration ### Description This section describes the configuration of a URL-test proxy group, which automatically selects the best proxy from a list by testing their connectivity to a given URL. ### Method N/A (Configuration file structure) ### Endpoint N/A (Configuration file structure) ### Parameters #### Proxy Group Fields - **name** (string) - Required - The name of the proxy group. - **type** (string) - Required - Must be `url-test` for this type of group. - **proxies** (array of strings) - Required - A list of proxy names to be tested. - **url** (string) - Required - The URL to use for testing proxy connectivity. A common example is `https://www.gstatic.com/generate_204`. - **interval** (integer) - Required - The interval in seconds at which to test the proxies. - **tolerance** (integer) - Optional - The tolerance in milliseconds for switching nodes. If the latency difference between the current proxy and a better proxy is within this tolerance, the switch will not occur. Defaults to 0. ### Request Example ```yaml proxy-groups: - name: "自动选择" type: url-test proxies: - ss - vmess url: 'https://www.gstatic.com/generate_204' interval: 300 tolerance: 50 ``` ### Response N/A (This is a configuration file, not an API endpoint with request/response cycles.) ### Error Handling N/A (Configuration file validation would occur separately.) ``` -------------------------------- ### DNS Server with Additional Parameters Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/dns/index.md Example of configuring a DNS server with additional parameters like proxy, ECS, and HTTP/3. These parameters are appended using '#' and '&'. ```yaml dns: nameserver: - 'https://8.8.8.8/dns-query#proxy&ecs=1.1.1.1/24&ecs-override=true' proxies: - name: proxy type: ss ``` -------------------------------- ### Sudoku Proxy Configuration Example Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/proxies/sudoku.en.md This YAML snippet shows a complete configuration for a Sudoku proxy, including server details, encryption method, padding, and HTTP masking options. Ensure 'aead-method' and 'enable-pure-downlink' are consistent between client and server. ```yaml proxies: - name: sudoku type: sudoku server: 1.2.3.4 port: 443 key: "" aead-method: chacha20-poly1305 padding-min: 2 padding-max: 7 table-type: prefer_ascii # custom-table: xpxvvpvv # custom-tables: ["xpxvvpvv", "vxpvxvvp"] httpmask: disable: false mode: legacy tls: true mask-host: "" path-root: "" multiplex: off enable-pure-downlink: false ``` -------------------------------- ### Routing Rule Examples Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/rules/index.en.md A comprehensive list of routing rules demonstrating various matching conditions like domain, IP, port, process path, and network type. ```yaml rules: - DOMAIN,ad.com,REJECT - DOMAIN-SUFFIX,google.com,auto - DOMAIN-KEYWORD,google,auto - DOMAIN-WILDCARD,*.google.com,auto - DOMAIN-REGEX,^abc.*com,PROXY - GEOSITE,youtube,PROXY - IP-CIDR,127.0.0.0/8,DIRECT,no-resolve - IP-CIDR6,2620:0:2d0:200::7/32,auto - IP-SUFFIX,8.8.8.8/24,PROXY - IP-ASN,13335,DIRECT - GEOIP,CN,DIRECT - SRC-GEOIP,cn,DIRECT - SRC-IP-ASN,9808,DIRECT - SRC-IP-CIDR,192.168.1.201/32,DIRECT - SRC-IP-SUFFIX,192.168.1.201/8,DIRECT - DST-PORT,80,DIRECT - SRC-PORT,7777,DIRECT - IN-PORT,7890,PROXY - IN-TYPE,SOCKS/HTTP,PROXY - IN-USER,mihomo,PROXY - IN-NAME,ss,PROXY - PROCESS-PATH,/usr/bin/wget,PROXY - PROCESS-PATH,C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe,PROXY - PROCESS-PATH-WILDCARD,/usr/*/wget,PROXY - PROCESS-PATH-REGEX,.*bin/wget,PROXY - PROCESS-PATH-REGEX,(?i).*Application\\chrome.*,PROXY - PROCESS-NAME,curl,PROXY - PROCESS-NAME,chrome.exe,PROXY - PROCESS-NAME,com.termux,PROXY - PROCESS-NAME-WILDCARD,*telegram*,PROXY - PROCESS-NAME-REGEX,curl$,PROXY - PROCESS-NAME-REGEX,(?i)Telegram,PROXY - PROCESS-NAME-REGEX,.*telegram.*,PROXY - UID,1001,DIRECT - NETWORK,udp,DIRECT - DSCP,4,DIRECT - RULE-SET,providername,proxy - AND,((DOMAIN,baidu.com),(NETWORK,UDP)),DIRECT - OR,((NETWORK,UDP),(DOMAIN,baidu.com)),REJECT - NOT,((DOMAIN,baidu.com)),PROXY - SUB-RULE,(NETWORK,tcp),sub-rule - MATCH,auto ``` -------------------------------- ### OpenVPN Proxy Configuration Example Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/proxies/openvpn.en.md This YAML snippet shows a complete configuration for an OpenVPN proxy, demonstrating both username/password authentication and certificate-based authentication options. It includes essential parameters like server address, port, protocol, and TLS-crypt key. ```yaml proxies: - name: "openvpn" type: openvpn server: vpn.example.com port: 1194 proto: udp # auth-user-pass mode username: "user" password: "pass" # Certificate mode (Alternative to the above) # cert: | # -----BEGIN CERTIFICATE----- # ... # -----END CERTIFICATE----- # key: | # -----BEGIN PRIVATE KEY----- # ... # -----END PRIVATE KEY----- ca: | -----BEGIN CERTIFICATE----- MIIB...example -----END CERTIFICATE----- tls-crypt: | -----BEGIN OpenVPN Static key V1----- ... -----END OpenVPN Static key V1----- # dev: tun # cipher: AES-128-GCM # auth: SHA256 udp: true # mtu: 1500 # dialer-proxy: "ss1" # remote-dns-resolve: true # dns: [ 1.1.1.1, 8.8.8.8 ] ``` -------------------------------- ### View Graphical Heap Report with pprof Source: https://github.com/metacubex/meta-docs/blob/main/docs/api/index.en.md Generates and serves a graphical heap profile report using Go's pprof tool. Requires Graphviz to be installed. ```shell go tool pprof -http=:8080 http://127.0.0.1:xxxx/debug/pprof/heap ``` -------------------------------- ### Manage Mihomo service Source: https://github.com/metacubex/meta-docs/blob/main/docs/startup/service/index.en.md Standard systemctl commands to reload, enable, start, and check the status of the Mihomo service. ```shell systemctl daemon-reload ``` ```shell systemctl enable mihomo ``` ```shell systemctl start mihomo ``` ```shell systemctl reload mihomo ``` ```shell systemctl status mihomo ``` -------------------------------- ### Basic Dialer Proxy Setup Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/proxies/dialer-proxy.en.md Establishes network connections through a specified dialer proxy group. The proxy chain is defined by the configuration. ```yaml proxies: - name: "ss1" dialer-proxy: dialer ... - name: "ss2" ... proxy-groups: - name: dialer type: select proxies: - ss2 rules: - MATCH,ss1 ``` -------------------------------- ### View Graphical Allocs Report with pprof Source: https://github.com/metacubex/meta-docs/blob/main/docs/api/index.en.md Generates and serves a graphical memory allocation report using Go's pprof tool. Requires Graphviz to be installed. ```shell go tool pprof -http=:8080 http://127.0.0.1:xxxx/debug/pprof/allocs ``` -------------------------------- ### ShadowSocks Listener Configuration Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/inbound/listeners/ss.md Example configuration for a ShadowSocks listener. Specifies the port, listen address, cipher, password, and UDP support. Uncomment and configure shadow-tls, kcp-tun, or other options as needed. ```yaml listeners: - name: ss-in type: shadowsocks port: 10001 listen: 0.0.0.0 cipher: 2022-blake3-aes-256-gcm password: vlmpIPSyHH6f4S8WVPdRIHIlzmB+GIRfoH3aNJ/t9Gg= udp: true # shadow-tls: # enable: false # 设置为true时开启 # version: 3 # 支持v1/v2/v3 # password: password # v2设置项 # users: # v3设置项 # - name: 1 # password: password # handshake: # dest: test.com:443 # kcp-tun: # enable: false # key: it's a secrect # pre-shared secret between client and server # crypt: aes # aes, aes-128, aes-128-gcm, aes-192, salsa20, blowfish, twofish, cast5, 3des, tea, xtea, xor, none, null # mode: fast # profiles: fast3, fast2, fast, normal, manual # conn: 1 # set num of UDP connections to server # autoexpire: 0 # set auto expiration time(in seconds) for a single UDP connection, 0 to disable # scavengettl: 600 # set how long an expired connection can live (in seconds) # ratelimit: 0 # set maximum outgoing speed (in bytes per second) for a single KCP connection, 0 to disable. Also known as packet pacing # mtu: 1350 # set maximum transmission unit for UDP packets # sndwnd: 128 # set send window size(num of packets) # rcvwnd: 512 # set receive window size(num of packets) # datashard: 10 # set reed-solomon erasure coding - datashard # parityshard: 3 # set reed-solomon erasure coding - parityshard # dscp: 0 # set DSCP(6bit) # nocomp: false # disable compression # acknodelay: false # flush ack immediately when a packet is received # nodelay: 0 # interval: 50 # resend: 0 # sockbuf: 4194304 # per-socket buffer in bytes # smuxver: 1 # specify smux version, available 1,2 # smuxbuf: 4194304 # the overall de-mux buffer in bytes # framesize: 8192 # smux max frame size # streambuf: 2097152 # per stream receive buffer in bytes, smux v2+ # keepalive: 10 # seconds between heartbeats ``` -------------------------------- ### GeoIP Rule URLs Source: https://github.com/metacubex/meta-docs/blob/main/docs/example/conf.md These are example URLs for geoip rule files used in MetaCubeX configurations. Ensure the URLs point to valid .mrs files. ```yaml url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/netflix.mrs" twitter_ip: <<: *ip url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/twitter.mrs" telegram_ip: <<: *ip url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/telegram.mrs" ``` -------------------------------- ### Hysteria2 Proxy Configuration Example Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/proxies/hysteria2.en.md This YAML snippet demonstrates a complete configuration for a Hysteria2 proxy, including server details, port jumping, authentication, traffic shaping, and obfuscation. ```yaml proxies: - name: "hysteria2" type: hysteria2 server: server.com port: 443 ports: 443-8443 hop-interval: 30 password: yourpassword up: "30 Mbps" down: "200 Mbps" # bbr-profile: "" # Available: "standard", "conservative", "aggressive". Default: "standard" obfs: salamander # Default is empty; if filled, obfs is enabled. Currently, only salamander is supported. obfs-password: yourpassword sni: server.com skip-cert-verify: false fingerprint: xxxx alpn: - h3 # realm-opts: # enable: true # Must be turned on manually # server-url: https://realm.hy2.io # token: public # realm-id: my-cabin-1f3a8c2e9b # stun-servers: # - stun.nextcloud.com:3478 # - stun.sip.us:3478 # - global.stun.twilio.com:3478 # # The following supports entering TLS configuration for the server-url (sni, skip-cert-verify, fingerprint, certificate, private-key, alpn) # # skip-cert-verify: false # # ...... ``` -------------------------------- ### Configure TUN Listener Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/inbound/listeners/tun.md Use this configuration for advanced TUN listener setup. Ensure correct network addresses and routing are specified. ```yaml listeners: - name: tun-in type: tun stack: system dns-hijack: - 0.0.0.0:53 # auto-detect-interface: false # auto-route: false # mtu: 9000 inet4-address: - 198.19.0.1/30 inet6-address: - "fdfe:dcba:9877::1/126" # strict-route: true # inet4-route-address:由 # - 0.0.0.0/1 # - 128.0.0.0/1 # inet6-route-address: # - "::/1" # - "8000::/1" # endpoint-independent-nat: false # include-uid: # - 0 # include-uid-range: # - 1000-99999 # exclude-uid: # - 1000 # exclude-uid-range: # - 1000-99999 # include-android-user: # - 0 # - 10 # include-package: # - com.android.chrome # exclude-package: # - com.android.captiveportallogin ``` -------------------------------- ### Select Specific Proxy Source: https://github.com/metacubex/meta-docs/blob/main/docs/api/index.md Example of selecting a proxy by name using a PUT request. ```json '{"name":"日本"}' ``` -------------------------------- ### GET /connections Source: https://github.com/metacubex/meta-docs/blob/main/docs/api/index.en.md Retrieve connection information. Supports optional interval parameter for refresh rate. ```APIDOC ## GET /connections ### Description Retrieve connection information. ### Method GET ### Endpoint /connections ### Parameters #### Query Parameters - **interval** (milliseconds) - Optional - The refresh interval in milliseconds. Defaults to 1000 milliseconds. ``` -------------------------------- ### HTTP Proxy Provider Configuration Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/proxy-providers/index.en.md Example of an HTTP proxy provider configuration. This defines how to fetch proxy information from a remote URL, including update intervals, custom headers, health check settings, and node overrides. ```yaml proxy-providers: provider1: type: http url: "http://test.com" path: ./proxy_providers/provider1.yaml interval: 3600 proxy: DIRECT size-limit: 0 header: User-Agent: - "mihomo/1.18.3" Authorization: - 'token 1231231' health-check: enable: true url: https://www.gstatic.com/generate_204 interval: 300 timeout: 5000 lazy: true expected-status: 204 override: tfo: false mptcp: false udp: true udp-over-tcp: false down: "50 Mbps" up: "10 Mbps" skip-cert-verify: true dialer-proxy: proxy interface-name: tailscale0 routing-mark: 233 ip-version: ipv4-prefer additional-prefix: "provider1 prefix |" additional-suffix: "| provider1 suffix" proxy-name: - pattern: "IPLC-(.*?)倍" target: "iplc x $1" filter: "(?i)港|hk|hongkong|hong kong" exclude-filter: "xxx" exclude-type: "ss|http" payload: - name: "ss1" type: ss server: server port: 443 cipher: chacha20-ietf-poly1305 password: "password" ``` -------------------------------- ### Configure HTTP Rule Provider Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/rule-providers/index.md Example of configuring an HTTP rule provider named 'google'. Specifies the type, local path, remote URL, update interval, proxy, behavior, format, size limit, custom headers, and payload. ```yaml rule-providers: google: type: http path: ./rule1.yaml url: "https://raw.githubusercontent.com/../Google.yaml" interval: 600 proxy: DIRECT behavior: classical format: yaml size-limit: 0 header: User-Agent: - "mihomo/1.18.3" Authorization: - 'token 1231231' payload: - 'DOMAIN-SUFFIX,google.com' ``` -------------------------------- ### Configuration APIs Source: https://github.com/metacubex/meta-docs/blob/main/docs/api/index.md APIs for managing runtime configurations. Includes endpoints to get, reload, update basic configurations, update GEO databases, and restart the core. ```APIDOC ## GET /configs ### Description Get basic configuration. ### Method GET ### Endpoint /configs ``` ```APIDOC ## PUT /configs ### Description Reload basic configuration. ### Method PUT ### Endpoint /configs ### Query Parameters - **force** (boolean) - Optional - Force reload. ``` ```APIDOC ## PATCH /configs ### Description Update basic configuration. ### Method PATCH ### Endpoint /configs ### Request Body - **mixed-port** (integer) - Optional - The mixed port to set. ``` ```APIDOC ## POST /configs/geo ### Description Update GEO database. ### Method POST ### Endpoint /configs/geo ### Request Body - **path** (string) - Required - Path to the GEO database file. - **payload** (string) - Required - Payload for the update. ``` ```APIDOC ## POST /restart ### Description Restart the core. ### Method POST ### Endpoint /restart ### Request Body - **path** (string) - Required - Path related to the restart operation. - **payload** (string) - Required - Payload for the restart operation. ``` -------------------------------- ### VLESS Proxy Configuration Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/proxies/vless.en.md Example configuration for a VLESS proxy with XTLS Vision and specific network settings. Ensure 'uuid', 'server', 'port', and 'servername' are correctly set. ```yaml proxies: - name: "vless" type: vless server: server port: 443 udp: true uuid: uuid flow: xtls-rprx-vision packet-encoding: xudp tls: true servername: example.com alpn: - h2 - http/1.1 fingerprint: xxxx client-fingerprint: chrome skip-cert-verify: true reality-opts: public-key: xxxx short-id: xxxx encryption: "" network: tcp smux: enabled: false ``` -------------------------------- ### 配置入口快捷方式 Source: https://github.com/metacubex/meta-docs/blob/main/docs/config/inbound/index.md 使用 URI 格式配置 Shadowsocks 和 VMess 入口,与 Listener 配置等价。 ```yaml # shadowsocks,vmess 入口配置(传入流量将和socks,mixed等入口一样按照mode所指定的方式进行匹配处理) ss-config: ss://2022-blake3-aes-256-gcm:vlmpIPSyHH6f4S8WVPdRIHIlzmB+GIRfoH3aNJ/t9Gg=@:23456 vmess-config: vmess://1:9d0cb9d0-964f-4ef6-897d-6c6b3ccf9e68@:12345 ``` -------------------------------- ### Proxy APIs Source: https://github.com/metacubex/meta-docs/blob/main/docs/api/index.md APIs for managing proxies. Includes endpoints to get proxy information, get specific proxy details, select a proxy, and test proxy delays. ```APIDOC ## GET /proxies ### Description Get proxy information. ### Method GET ### Endpoint /proxies ``` ```APIDOC ## GET /proxies/:proxies_name ### Description Get specific proxy information. ### Method GET ### Endpoint /proxies/:proxies_name ``` ```APIDOC ## PUT /proxies/:proxies_name ### Description Select a specific proxy. ### Method PUT ### Endpoint /proxies/:proxies_name ### Request Body - **name** (string) - Required - The name of the proxy to select. ``` ```APIDOC ## GET /proxies/:proxies_name/delay ### Description Test a specific proxy and return new delay information. ### Method GET ### Endpoint /proxies/:proxies_name/delay ### Query Parameters - **url** (string) - Required - The URL to test. - **timeout** (integer) - Optional - The timeout in milliseconds. Defaults to 5000. ``` -------------------------------- ### Copy Mihomo and Config Files Source: https://github.com/metacubex/meta-docs/blob/main/docs/startup/service/index.md Copies the Mihomo executable to the system's binary path and the configuration file to the appropriate directory. ```shell cp mihomo /usr/local/bin cp config.yaml /etc/mihomo ``` -------------------------------- ### Policy Group APIs Source: https://github.com/metacubex/meta-docs/blob/main/docs/api/index.md APIs for managing policy groups. Includes endpoints to get policy group information, get specific policy group details, clear fixed selections, and test policy group node delays. ```APIDOC ## GET /group ### Description Get policy group information. ### Method GET ### Endpoint /group ``` ```APIDOC ## GET /group/:group_name ### Description Get specific policy group information. ### Method GET ### Endpoint /group/:group_name ``` ```APIDOC ## DELETE /group/:group_name ### Description Clear the fixed selection for an auto policy group. ### Method DELETE ### Endpoint /group/:group_name ``` ```APIDOC ## GET /group/:group_name/delay ### Description Test nodes/policy groups within a specific policy group and return new delay information. Also clears fixed selections for auto policy groups. ### Method GET ### Endpoint /group/:group_name/delay ### Query Parameters - **url** (string) - Required - The URL to test. - **timeout** (integer) - Optional - The timeout in milliseconds. Defaults to 5000. ```