|
|
@ -4,9 +4,12 @@
|
|
|
|
# Port of SOCKS5 proxy server on the local end
|
|
|
|
# Port of SOCKS5 proxy server on the local end
|
|
|
|
# socks-port: 7891
|
|
|
|
# socks-port: 7891
|
|
|
|
|
|
|
|
|
|
|
|
# Transparent proxy server port for Linux and macOS
|
|
|
|
# Transparent proxy server port for Linux and macOS (Redirect TCP and TProxy UDP)
|
|
|
|
# redir-port: 7892
|
|
|
|
# redir-port: 7892
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Transparent proxy server port for Linux (TProxy TCP and TProxy UDP)
|
|
|
|
|
|
|
|
# tproxy-port: 7893
|
|
|
|
|
|
|
|
|
|
|
|
# HTTP(S) and SOCKS5 server on the same port
|
|
|
|
# HTTP(S) and SOCKS5 server on the same port
|
|
|
|
mixed-port: 7890
|
|
|
|
mixed-port: 7890
|
|
|
|
|
|
|
|
|
|
|
@ -15,7 +18,7 @@ mixed-port: 7890
|
|
|
|
# - "user1:pass1"
|
|
|
|
# - "user1:pass1"
|
|
|
|
# - "user2:pass2"
|
|
|
|
# - "user2:pass2"
|
|
|
|
|
|
|
|
|
|
|
|
# Set to true to allow connections to local-end server from
|
|
|
|
# Set to true to allow connections to the local-end server from
|
|
|
|
# other LAN IP addresses
|
|
|
|
# other LAN IP addresses
|
|
|
|
allow-lan: false
|
|
|
|
allow-lan: false
|
|
|
|
|
|
|
|
|
|
|
@ -36,7 +39,7 @@ mode: rule
|
|
|
|
log-level: info
|
|
|
|
log-level: info
|
|
|
|
|
|
|
|
|
|
|
|
# When set to false, resolver won't translate hostnames to IPv6 addresses
|
|
|
|
# When set to false, resolver won't translate hostnames to IPv6 addresses
|
|
|
|
ipv6: true
|
|
|
|
ipv6: false
|
|
|
|
|
|
|
|
|
|
|
|
# RESTful web API listening address
|
|
|
|
# RESTful web API listening address
|
|
|
|
external-controller: 127.0.0.1:9090
|
|
|
|
external-controller: 127.0.0.1:9090
|
|
|
@ -54,49 +57,53 @@ external-controller: 127.0.0.1:9090
|
|
|
|
# Outbound interface name
|
|
|
|
# Outbound interface name
|
|
|
|
# interface-name: en0
|
|
|
|
# interface-name: en0
|
|
|
|
|
|
|
|
|
|
|
|
# Static hosts for DNS server and connection establishment, only works
|
|
|
|
# Static hosts for DNS server and connection establishment (like /etc/hosts)
|
|
|
|
# when `dns.enhanced-mode` is `redir-host`.
|
|
|
|
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Wildcard hostnames are supported (e.g. *.clash.dev, *.foo.*.example.com)
|
|
|
|
# Wildcard hostnames are supported (e.g. *.clash.dev, *.foo.*.example.com)
|
|
|
|
# Non-wildcard domain names has a higher priority than wildcard domain names
|
|
|
|
# Non-wildcard domain names have a higher priority than wildcard domain names
|
|
|
|
# e.g. foo.example.com > *.example.com > .example.com
|
|
|
|
# e.g. foo.example.com > *.example.com > .example.com
|
|
|
|
# P.S. +.foo.com equals to .foo.com and foo.com
|
|
|
|
# P.S. +.foo.com equals to .foo.com and foo.com
|
|
|
|
hosts:
|
|
|
|
hosts:
|
|
|
|
'mtalk.google.com': 108.177.125.188
|
|
|
|
|
|
|
|
# '*.clash.dev': 127.0.0.1
|
|
|
|
# '*.clash.dev': 127.0.0.1
|
|
|
|
# '.dev': 127.0.0.1
|
|
|
|
# '.dev': 127.0.0.1
|
|
|
|
# 'alpha.clash.dev': '::1'
|
|
|
|
# 'alpha.clash.dev': '::1'
|
|
|
|
|
|
|
|
|
|
|
|
# DNS server settings
|
|
|
|
# DNS server settings
|
|
|
|
# This section is optional. When not present, DNS server will be disabled.
|
|
|
|
# This section is optional. When not present, the DNS server will be disabled.
|
|
|
|
dns:
|
|
|
|
dns:
|
|
|
|
enable: false
|
|
|
|
enable: false
|
|
|
|
listen: 0.0.0.0:53
|
|
|
|
listen: 0.0.0.0:53
|
|
|
|
# ipv6: false # when false, response to AAAA questions will be empty
|
|
|
|
# ipv6: false # when the false, response to AAAA questions will be empty
|
|
|
|
|
|
|
|
|
|
|
|
# These nameservers are used to resolve the DNS nameserver hostnames below.
|
|
|
|
# These nameservers are used to resolve the DNS nameserver hostnames below.
|
|
|
|
# Specify IP addresses only
|
|
|
|
# Specify IP addresses only
|
|
|
|
default-nameserver:
|
|
|
|
default-nameserver:
|
|
|
|
- 114.114.114.114
|
|
|
|
|
|
|
|
- 8.8.8.8
|
|
|
|
- 8.8.8.8
|
|
|
|
|
|
|
|
- 1.0.0.1
|
|
|
|
enhanced-mode: redir-host # or fake-ip
|
|
|
|
enhanced-mode: redir-host # or fake-ip
|
|
|
|
fake-ip-range: 198.18.0.1/16 # Fake IP addresses pool CIDR
|
|
|
|
fake-ip-range: 198.18.0.1/16 # Fake IP addresses pool CIDR
|
|
|
|
|
|
|
|
# use-hosts: true # lookup hosts and return IP record
|
|
|
|
|
|
|
|
|
|
|
|
# Hostnames in this list will not be resolved with fake IPs
|
|
|
|
# Hostnames in this list will not be resolved with fake IPs
|
|
|
|
# i.e. questions to these domain names will always be answered with their
|
|
|
|
# i.e. questions to these domain names will always be answered with their
|
|
|
|
# real IP addresses
|
|
|
|
# real IP addresses
|
|
|
|
# fake-ip-filter:
|
|
|
|
fake-ip-filter:
|
|
|
|
# - '*.lan'
|
|
|
|
- '*.lan'
|
|
|
|
# - localhost.ptlogin2.qq.com
|
|
|
|
- localhost.ptlogin2.qq.com
|
|
|
|
|
|
|
|
- '+.srv.nintendo.net'
|
|
|
|
|
|
|
|
- '+.stun.playstation.net'
|
|
|
|
|
|
|
|
- '+.msftconnecttest.com'
|
|
|
|
|
|
|
|
- '+.msftncsi.com'
|
|
|
|
|
|
|
|
- '+.xboxlive.com'
|
|
|
|
|
|
|
|
- 'msftconnecttest.com'
|
|
|
|
|
|
|
|
- 'xbox.*.microsoft.com'
|
|
|
|
|
|
|
|
|
|
|
|
# Supports UDP, TCP, DoT, DoH. You can specify the port to connect to.
|
|
|
|
# Supports UDP, TCP, DoT, DoH. You can specify the port to connect to.
|
|
|
|
# All DNS questions are sent directly to the nameserver, without proxies
|
|
|
|
# All DNS questions are sent directly to the nameserver, without proxies
|
|
|
|
# involved. Clash answers the DNS question with the first result gathered.
|
|
|
|
# involved. Clash answers the DNS question with the first result gathered.
|
|
|
|
nameserver:
|
|
|
|
nameserver:
|
|
|
|
- 114.114.114.114 # default value
|
|
|
|
- 8.8.8.8
|
|
|
|
- 8.8.8.8 # default value
|
|
|
|
- 1.0.0.1
|
|
|
|
- tls://dns.rubyfish.cn:853 # DNS over TLS
|
|
|
|
|
|
|
|
- https://1.1.1.1/dns-query # DNS over HTTPS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# When `fallback` is present, the DNS server will send concurrent requests
|
|
|
|
# When `fallback` is present, the DNS server will send concurrent requests
|
|
|
|
# to the servers in this section along with servers in `nameservers`.
|
|
|
|
# to the servers in this section along with servers in `nameservers`.
|
|
|
@ -112,17 +119,33 @@ dns:
|
|
|
|
# IP address resolved with servers in `nameserver` is used when
|
|
|
|
# IP address resolved with servers in `nameserver` is used when
|
|
|
|
# `fallback-filter.geoip` is true and when GEOIP of the IP address is `CN`.
|
|
|
|
# `fallback-filter.geoip` is true and when GEOIP of the IP address is `CN`.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# If `fallback-filter.geoip` is false, results from `fallback` nameservers
|
|
|
|
# If `fallback-filter.geoip` is false, results from `nameserver` nameservers
|
|
|
|
# are always used, and answers from `nameservers` are discarded.
|
|
|
|
# are always used if not match `fallback-filter.ipcidr`.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# This is a countermeasure against DNS pollution attacks.
|
|
|
|
# This is a countermeasure against DNS pollution attacks.
|
|
|
|
fallback-filter:
|
|
|
|
fallback-filter:
|
|
|
|
geoip: true
|
|
|
|
geoip: true
|
|
|
|
ipcidr:
|
|
|
|
ipcidr:
|
|
|
|
# - 240.0.0.0/4
|
|
|
|
# - 240.0.0.0/4
|
|
|
|
|
|
|
|
# domain:
|
|
|
|
|
|
|
|
# - '+.google.com'
|
|
|
|
|
|
|
|
# - '+.facebook.com'
|
|
|
|
|
|
|
|
# - '+.youtube.com'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# https://github.com/Dreamacro/clash/wiki/premium-core-features
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# tun:
|
|
|
|
|
|
|
|
# enable: true
|
|
|
|
|
|
|
|
# stack: system # or gvisor
|
|
|
|
|
|
|
|
# # dns-hijack:
|
|
|
|
|
|
|
|
# # - 8.8.8.8:53
|
|
|
|
|
|
|
|
# # - tcp://8.8.8.8:53
|
|
|
|
|
|
|
|
# macOS-auto-route: true # auto set global route
|
|
|
|
|
|
|
|
# macOS-auto-detect-interface: true # conflict with interface-name
|
|
|
|
|
|
|
|
|
|
|
|
proxies:
|
|
|
|
proxies:
|
|
|
|
# 支持的协议及加密算法示例请查阅 Clash 项目 README 以使用最新格式:https://github.com/Dreamacro/clash/blob/master/README.md
|
|
|
|
# 支持的协议及加密算法示例请查阅 Clash 项目 README 以使用最新格式:https://github.com/Dreamacro/clash/wiki/configuration
|
|
|
|
|
|
|
|
|
|
|
|
# Shadowsocks(Websocket + TLS)
|
|
|
|
# Shadowsocks(Websocket + TLS)
|
|
|
|
- name: "CN1"
|
|
|
|
- name: "CN1"
|
|
|
@ -194,7 +217,7 @@ proxy-providers:
|
|
|
|
# url: http://www.gstatic.com/generate_204
|
|
|
|
# url: http://www.gstatic.com/generate_204
|
|
|
|
|
|
|
|
|
|
|
|
proxy-groups:
|
|
|
|
proxy-groups:
|
|
|
|
# 策略组示例请查阅 Clash 项目 README 以使用最新格式:https://github.com/Dreamacro/clash/blob/master/README.md
|
|
|
|
# 策略组示例请查阅 Clash 项目 README 以使用最新格式:https://github.com/Dreamacro/clash/wiki/configuration
|
|
|
|
|
|
|
|
|
|
|
|
# Fallback
|
|
|
|
# Fallback
|
|
|
|
- name: "Fallback"
|
|
|
|
- name: "Fallback"
|
|
|
|