新增了本地dns服务器配置
This commit is contained in:
juewuy
2020-07-17 17:40:34 +08:00
parent ad9a551004
commit 9d0fc49af3
8 changed files with 1645 additions and 1 deletions

BIN
clash_redir_config/clash Normal file

Binary file not shown.

View File

@@ -0,0 +1,27 @@
#!/bin/sh /etc/rc.common
# Example script
# Copyright (C) 2007 OpenWrt.org
USE_PROCD=1
START=99
start_service() {
#创建clash后台进程
procd_open_instance
procd_set_param respawn
procd_set_param stderr 1
procd_set_param stdout 1
procd_set_param command /etc/clash/clash -d /etc/clash
procd_close_instance
#修改iptables规则使流量进入clash
iptables -t nat -N Clash
iptables -t nat -A Clash -d 192.168.0.0/16 -j RETURN
iptables -t nat -A Clash -p tcp -j REDIRECT --to-ports 7892
iptables -t nat -A PREROUTING -p tcp -j Clash
iptables -t nat -A PREROUTING -p tcp -j REDIRECT --to-ports 7892
}
stop_service() {
#清空iptables clash相关规则
iptables -t nat -F Clash
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@@ -23,7 +23,7 @@ dns:
enhanced-mode: fake-ip #尽量不要改动
nameserver: #国内DNS可配置多条
- tls://dns.rubyfish.cn:853
- 114.114.114.114
- 127.0.0.1:5335 #本地dnsmasq服务器
fallback: #国外DNS可配置多条
- tcp://1.1.1.1
- tls://dns.google:853