mirror of
https://github.com/kenzok8/small-package
synced 2025-01-09 08:59:26 +08:00
update 04-22 07:43:23
This commit is contained in:
parent
d707afdf4a
commit
0b4e4d03b3
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall2
|
||||
PKG_VERSION:=1.3
|
||||
PKG_RELEASE:=17
|
||||
PKG_RELEASE:=18
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_$(PKG_NAME)_Transparent_Proxy \
|
||||
|
@ -27,7 +27,6 @@ local direct_dns_doh_host = var["-direct_dns_doh_host"]
|
||||
local remote_dns_server = var["-remote_dns_server"]
|
||||
local remote_dns_port = var["-remote_dns_port"]
|
||||
local remote_dns_udp_server = var["-remote_dns_udp_server"]
|
||||
local remote_dns_udp_local = var["-remote_dns_udp_local"]
|
||||
local remote_dns_tcp_server = var["-remote_dns_tcp_server"]
|
||||
local remote_dns_doh_url = var["-remote_dns_doh_url"]
|
||||
local remote_dns_doh_host = var["-remote_dns_doh_host"]
|
||||
@ -619,15 +618,6 @@ if remote_dns_server or remote_dns_doh_url or remote_dns_fake then
|
||||
if remote_dns_udp_server then
|
||||
_remote_dns.address = remote_dns_udp_server
|
||||
_remote_dns.port = tonumber(remote_dns_port) or 53
|
||||
if remote_dns_udp_local == "1" then
|
||||
table.insert(routing.rules, 1, {
|
||||
type = "field",
|
||||
ip = {
|
||||
remote_dns_udp_server
|
||||
},
|
||||
outboundTag = "direct"
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
if remote_dns_tcp_server then
|
||||
@ -735,23 +725,12 @@ if remote_dns_server or remote_dns_doh_url or remote_dns_fake then
|
||||
|
||||
local default_dns_flag = "remote"
|
||||
if node_id and redir_port then
|
||||
local outboundTag = node_id
|
||||
local node = uci:get_all(appname, node_id)
|
||||
if node.protocol == "_shunt" then
|
||||
outboundTag = "default"
|
||||
if node.default_node == "_direct" then
|
||||
default_dns_flag = "direct"
|
||||
end
|
||||
end
|
||||
if not remote_dns_fake then
|
||||
table.insert(rules, {
|
||||
type = "field",
|
||||
inboundTag = {
|
||||
"dns-in1"
|
||||
},
|
||||
outboundTag = outboundTag
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
if dns.servers and #dns.servers > 0 then
|
||||
|
@ -180,7 +180,6 @@ o = s:taboption("DNS", ListValue, "remote_dns_protocol", translate("Remote DNS P
|
||||
o:value("tcp", "TCP")
|
||||
o:value("doh", "DoH")
|
||||
o:value("udp", "UDP")
|
||||
o:value("udp+local", "UDP+Local")
|
||||
o:value("fakedns", "FakeDNS")
|
||||
|
||||
---- DNS Forward
|
||||
@ -196,7 +195,6 @@ o:value("208.67.220.220", "208.67.220.220 (OpenDNS)")
|
||||
o:value("208.67.222.222", "208.67.222.222 (OpenDNS)")
|
||||
o:depends("remote_dns_protocol", "tcp")
|
||||
o:depends("remote_dns_protocol", "udp")
|
||||
o:depends("remote_dns_protocol", "udp+local")
|
||||
|
||||
---- DoH
|
||||
o = s:taboption("DNS", Value, "remote_dns_doh", translate("Remote DNS DoH"))
|
||||
|
@ -63,7 +63,6 @@ config nodes 'myshunt'
|
||||
option remarks '分流总节点'
|
||||
option type 'Xray'
|
||||
option protocol '_shunt'
|
||||
option LAN '_direct'
|
||||
option Direct '_direct'
|
||||
option AD 'nil'
|
||||
option BT '_direct'
|
||||
@ -77,28 +76,20 @@ config nodes 'myshunt'
|
||||
option domainStrategy 'IPOnDemand'
|
||||
option domainMatcher 'hybrid'
|
||||
|
||||
config shunt_rules 'LAN'
|
||||
option remarks 'LAN'
|
||||
option network 'tcp,udp'
|
||||
option ip_list '0.0.0.0/8
|
||||
10.0.0.0/8
|
||||
100.64.0.0/10
|
||||
127.0.0.0/8
|
||||
169.254.0.0/16
|
||||
172.16.0.0/12
|
||||
192.168.0.0/16
|
||||
224.0.0.0/4
|
||||
240.0.0.0/4
|
||||
'
|
||||
|
||||
config shunt_rules 'Direct'
|
||||
option network 'tcp,udp'
|
||||
option remarks 'Direct'
|
||||
option ip_list 'geoip:private
|
||||
114.114.114.114
|
||||
114.114.115.115
|
||||
223.5.5.5
|
||||
223.6.6.6
|
||||
119.29.29.29
|
||||
180.76.76.76
|
||||
'
|
||||
option domain_list 'apple.com
|
||||
microsoft.com
|
||||
dyndns.com
|
||||
douyucdn.cn
|
||||
douyucdn2.cn
|
||||
|
||||
steamcontent.com
|
||||
dl.steam.clngaa.com
|
||||
dl.steam.ksyna.com
|
||||
@ -110,14 +101,6 @@ cdn-ws.content.steamchina.com
|
||||
cdn-qc.content.steamchina.com
|
||||
cdn-ali.content.steamchina.com
|
||||
epicgames-download1-1251447533.file.myqcloud.com'
|
||||
option remarks 'Direct'
|
||||
option ip_list '114.114.114.114
|
||||
114.114.115.115
|
||||
223.5.5.5
|
||||
223.6.6.6
|
||||
119.29.29.29
|
||||
180.76.76.76
|
||||
'
|
||||
|
||||
config shunt_rules 'AD'
|
||||
option remarks 'AD'
|
||||
@ -132,50 +115,24 @@ config shunt_rules 'BT'
|
||||
config shunt_rules 'Netflix'
|
||||
option remarks 'Netflix'
|
||||
option network 'tcp,udp'
|
||||
option domain_list 'fast.com
|
||||
netflix
|
||||
netflix.com
|
||||
netflix.net
|
||||
nflxso.net
|
||||
nflxext.com
|
||||
nflximg.com
|
||||
nflximg.net
|
||||
nflxvideo.net
|
||||
netflixdnstest0.com
|
||||
netflixdnstest1.com
|
||||
netflixdnstest2.com
|
||||
netflixdnstest3.com
|
||||
netflixdnstest4.com
|
||||
netflixdnstest5.com
|
||||
netflixdnstest6.com
|
||||
netflixdnstest7.com
|
||||
netflixdnstest8.com
|
||||
netflixdnstest9.com
|
||||
geosite:netflix'
|
||||
option domain_list 'geosite:netflix'
|
||||
|
||||
config shunt_rules 'TVB'
|
||||
option remarks 'TVB'
|
||||
option network 'tcp,udp'
|
||||
option domain_list 'tvb.com
|
||||
mytvsuper.com'
|
||||
option domain_list 'geosite:tvb
|
||||
geosite:mytvsuper
|
||||
'
|
||||
|
||||
config shunt_rules 'Proxy'
|
||||
option network 'tcp,udp'
|
||||
option domain_list 'bing.com
|
||||
sspanel.net
|
||||
v2ex.com
|
||||
|
||||
googleapis.cn
|
||||
googleapis.com
|
||||
google.com.tw
|
||||
google.com.hk
|
||||
gstatic.com
|
||||
xn--ngstr-lra8j.com
|
||||
|
||||
github.com
|
||||
option remarks 'Proxy'
|
||||
option domain_list 'geosite:bing
|
||||
geosite:google
|
||||
geosite:github
|
||||
domain:sspanel.net
|
||||
domain:v2ex.com
|
||||
'
|
||||
|
||||
option remarks 'Proxy'
|
||||
option ip_list '149.154.160.0/20
|
||||
91.108.4.0/22
|
||||
91.108.56.0/24
|
||||
|
@ -265,7 +265,7 @@ lua_api() {
|
||||
|
||||
run_v2ray() {
|
||||
local flag node redir_port socks_address socks_port socks_username socks_password http_address http_port http_username http_password
|
||||
local dns_listen_port direct_dns_protocol direct_dns_udp_server direct_dns_tcp_server direct_dns_doh remote_dns_protocol remote_dns_udp_server remote_dns_udp_local remote_dns_tcp_server remote_dns_doh remote_dns_client_ip dns_query_strategy dns_cache
|
||||
local dns_listen_port direct_dns_protocol direct_dns_udp_server direct_dns_tcp_server direct_dns_doh remote_dns_protocol remote_dns_udp_server remote_dns_tcp_server remote_dns_doh remote_dns_client_ip dns_query_strategy dns_cache
|
||||
local loglevel log_file config_file
|
||||
local _extra_param=""
|
||||
eval_set_val $@
|
||||
@ -332,12 +332,11 @@ run_v2ray() {
|
||||
;;
|
||||
esac
|
||||
case "$remote_dns_protocol" in
|
||||
udp*)
|
||||
udp)
|
||||
local _dns=$(get_first_dns remote_dns_udp_server 53 | sed 's/#/:/g')
|
||||
local _dns_address=$(echo ${_dns} | awk -F ':' '{print $1}')
|
||||
local _dns_port=$(echo ${_dns} | awk -F ':' '{print $2}')
|
||||
_extra_param="${_extra_param} -remote_dns_server ${_dns_address} -remote_dns_port ${_dns_port} -remote_dns_udp_server ${_dns_address}"
|
||||
[ "$remote_dns_protocol" = "udp+local" ] && _extra_param="${_extra_param} -remote_dns_udp_local 1"
|
||||
;;
|
||||
tcp)
|
||||
local _dns=$(get_first_dns remote_dns_tcp_server 53 | sed 's/#/:/g')
|
||||
|
Loading…
Reference in New Issue
Block a user