2023-01-28 00:50:21 +07:00
|
|
|
global {
|
|
|
|
# tproxy port to listen.
|
|
|
|
tproxy_port: 12345
|
|
|
|
|
2023-02-05 13:03:34 +07:00
|
|
|
# Log level: error, warn, info, debug, trace
|
|
|
|
log_level: info
|
|
|
|
|
2023-01-28 00:50:21 +07:00
|
|
|
# Node connectivity check.
|
2023-02-08 19:15:24 +07:00
|
|
|
# Url and dns should have both IPv4 and IPv6.
|
|
|
|
tcp_check_url: 'http://cp.cloudflare.com'
|
2023-02-09 12:42:52 +07:00
|
|
|
udp_check_dns: 'dns.google:53'
|
2023-01-28 14:47:43 +07:00
|
|
|
check_interval: 30s
|
2023-02-09 20:16:51 +07:00
|
|
|
# Group will switch node only when new_latency <= old_latency - tolerance
|
|
|
|
check_tolerance: 50ms
|
2023-01-28 00:50:21 +07:00
|
|
|
|
2023-02-09 10:40:34 +07:00
|
|
|
# Value can be scheme://host:port or empty string ''.
|
|
|
|
# The scheme can be tcp/udp/tcp+udp. Empty string '' indicates as-is.
|
|
|
|
# If host is a domain and has both IPv4 and IPv6 record, dae will automatically choose
|
|
|
|
# IPv4 or IPv6 to use according to group policy (such as min latency policy).
|
2023-01-28 00:50:21 +07:00
|
|
|
# Please make sure DNS traffic will go through and be forwarded by dae.
|
2023-02-04 17:18:06 +07:00
|
|
|
# The upstream DNS answer MUST NOT be polluted.
|
2023-01-30 17:13:43 +07:00
|
|
|
# The request to dns upstream follows routing defined below.
|
2023-02-09 10:40:34 +07:00
|
|
|
dns_upstream: 'tcp+udp://dns.google:53'
|
2023-01-28 00:50:21 +07:00
|
|
|
|
2023-02-01 11:18:19 +07:00
|
|
|
# The LAN interface to bind. Use it if you only want to proxy LAN instead of localhost.
|
|
|
|
# Multiple interfaces split by ",".
|
2023-01-30 17:13:43 +07:00
|
|
|
# lan_interface: docker0
|
|
|
|
|
2023-02-01 11:18:19 +07:00
|
|
|
# The WAN interface to bind. Use it if you want to proxy localhost
|
2023-02-04 19:53:29 +07:00
|
|
|
# Multiple interfaces split by ",".
|
2023-01-30 14:50:55 +07:00
|
|
|
wan_interface: wlp5s0
|
2023-01-28 00:50:21 +07:00
|
|
|
}
|
|
|
|
|
2023-01-31 23:02:46 +07:00
|
|
|
# Subscriptions defined here will be resolved as nodes and merged as a part of global node pool.
|
2023-01-28 00:50:21 +07:00
|
|
|
subscription {
|
|
|
|
# Add your subscription links here.
|
|
|
|
}
|
|
|
|
|
2023-01-31 23:02:46 +07:00
|
|
|
# Nodes defined here will be merged as a part of global node pool.
|
2023-01-28 00:50:21 +07:00
|
|
|
node {
|
|
|
|
# Add your node links here.
|
|
|
|
# Support socks5, http, https, ss, ssr, vmess, vless, trojan, trojan-go
|
2023-01-30 17:13:43 +07:00
|
|
|
'socks5://localhost:1080'
|
2023-01-28 00:50:21 +07:00
|
|
|
'ss://LINK'
|
|
|
|
}
|
|
|
|
|
2023-02-05 12:31:21 +07:00
|
|
|
# Node group (outbound).
|
2023-01-28 00:50:21 +07:00
|
|
|
group {
|
|
|
|
my_group {
|
2023-01-31 23:02:46 +07:00
|
|
|
# Filter nodes from global node pool defined by subscription and node section above.
|
|
|
|
# Pass node names as input of keyword/regex filter.
|
|
|
|
filter: name(regex:'HK|SG|TW', keyword:'JP', keyword: SH) && !name(keyword:"GCP")
|
2023-01-28 00:50:21 +07:00
|
|
|
|
|
|
|
# Randomly select a node from the group for every connection.
|
2023-01-29 06:31:52 +07:00
|
|
|
# policy: random
|
|
|
|
|
|
|
|
# Select the first node from the group for every connection.
|
2023-02-07 20:54:57 +07:00
|
|
|
# policy: fixed(0)
|
|
|
|
|
|
|
|
# Select the node with min last latency from the group for every connection.
|
|
|
|
policy: min
|
2023-01-28 00:50:21 +07:00
|
|
|
}
|
2023-01-31 23:02:46 +07:00
|
|
|
|
|
|
|
group2 {
|
|
|
|
# Filter nodes from global node pool defined by subscription and node section above.
|
|
|
|
# Pass node names as input of keyword/regex filter.
|
|
|
|
filter: name(keyword: netflix)
|
|
|
|
|
|
|
|
# Select the node with min average of the last 10 latencies from the group for every connection.
|
|
|
|
policy: min_avg10
|
|
|
|
}
|
2023-01-28 00:50:21 +07:00
|
|
|
}
|
|
|
|
|
2023-02-05 12:31:21 +07:00
|
|
|
# See routing.md for full examples.
|
2023-01-28 00:50:21 +07:00
|
|
|
routing {
|
2023-02-05 13:03:34 +07:00
|
|
|
ip(geoip:private, 224.0.0.0/3, 'ff00::/8') -> direct # Put it first unless you know what you're doing.
|
2023-02-05 12:31:21 +07:00
|
|
|
# Write your rules below.
|
2023-01-31 23:02:46 +07:00
|
|
|
|
2023-02-04 19:53:29 +07:00
|
|
|
# dae arms DNS rush-answer filter so we can use 8.8.8.8 regardless of DNS pollution.
|
2023-02-09 10:40:34 +07:00
|
|
|
domain(full:dns.google) && port(53) -> direct
|
2023-02-04 10:24:03 +07:00
|
|
|
|
|
|
|
pname(firefox) && domain(ip.sb) -> direct
|
2023-01-31 18:33:53 +07:00
|
|
|
pname(curl) && domain(ip.sb) -> my_group
|
2023-01-30 17:13:43 +07:00
|
|
|
|
2023-01-28 00:50:21 +07:00
|
|
|
ip(geoip:cn) -> direct
|
|
|
|
domain(geosite:cn) -> direct
|
|
|
|
final: my_group
|
|
|
|
}
|