修改dns实现方式,大幅度优化使用流程
This commit is contained in:
@@ -6,11 +6,17 @@ 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 -I FORWARD -o utun -j ACCEPT
|
||||
iptables -t nat -I PREROUTING -p udp --dport 53 -j REDIRECT --to 1053
|
||||
}
|
||||
stop_service() {
|
||||
iptables -t nat -D PREROUTING -p udp --dport 53 -j REDIRECT --to 1053
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user