mirror of
https://github.com/kenzok8/small-package
synced 2025-01-08 13:27:36 +08:00
update 2023-02-17 08:39:01
This commit is contained in:
parent
9e58c29278
commit
fe89b7f8a2
@ -6,13 +6,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=adguardhome
|
||||
PKG_VERSION:=0.107.24
|
||||
PKG_VERSION:=0.108.0-b.27
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=https://github.com/AdguardTeam/AdGuardHome
|
||||
PKG_HASH:=d5b1940ebc9e434c087823b9ad9d2210d0a24ed8598b6a238ec16a37a1480316
|
||||
PKG_HASH:=7b6b01fda9cc34ce9e22ae729445490203186b4733789d5e5c55d82d7bc2e235
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE.txt
|
||||
|
@ -189,6 +189,17 @@ end
|
||||
o:value("DIRECT")
|
||||
o:value("REJECT")
|
||||
|
||||
o = s:option(ListValue, "Apple_TV", translate("Apple TV"))
|
||||
o:depends("rule_name", "lhie1")
|
||||
o.rmempty = true
|
||||
for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
|
||||
if groupname ~= nil and groupname ~= "" then
|
||||
o:value(groupname)
|
||||
end
|
||||
end
|
||||
o:value("DIRECT")
|
||||
o:value("REJECT")
|
||||
|
||||
o = s:option(ListValue, "GoogleFCM", translate("Google FCM"))
|
||||
o:depends("rule_name", "lhie1")
|
||||
o.rmempty = true
|
||||
@ -222,6 +233,17 @@ end
|
||||
o:value("DIRECT")
|
||||
o:value("REJECT")
|
||||
|
||||
o = s:option(ListValue, "ChatGPT", translate("ChatGPT"))
|
||||
o:depends("rule_name", "lhie1")
|
||||
o.rmempty = true
|
||||
for groupname in string.gmatch(groupnames, "([^'##\n']+)##") do
|
||||
if groupname ~= nil and groupname ~= "" then
|
||||
o:value(groupname)
|
||||
end
|
||||
end
|
||||
o:value("DIRECT")
|
||||
o:value("REJECT")
|
||||
|
||||
o = s:option(ListValue, "Netflix", translate("Netflix"))
|
||||
o:depends("rule_name", "lhie1")
|
||||
o.rmempty = true
|
||||
|
@ -709,6 +709,7 @@ o:depends({type = "vmess", obfs_vmess = "grpc"})
|
||||
-- [[ client-fingerprint ]]--
|
||||
o = s:option(ListValue, "client_fingerprint", translate("Client Fingerprint")..translate("(Only Meta Core)"))
|
||||
o.rmempty = true
|
||||
o:value("none")
|
||||
o:value("random")
|
||||
o:value("chrome")
|
||||
o:value("firefox")
|
||||
@ -721,7 +722,7 @@ o:depends({type = "vmess", obfs_vmess = "http"})
|
||||
o:depends({type = "vmess", obfs_vmess = "h2"})
|
||||
o:depends({type = "vmess", obfs_vmess = "grpc"})
|
||||
|
||||
-- [[ client-fingerprint ]]--
|
||||
-- [[ ip version ]]--
|
||||
o = s:option(ListValue, "ip_version", translate("IP Version")..translate("(Only Meta Core)"))
|
||||
o.rmempty = true
|
||||
o:value("dual")
|
||||
|
@ -262,8 +262,8 @@ o.description = translate("Automatically Append Compliant DNS to default-nameser
|
||||
o.default = 1
|
||||
|
||||
if op_mode == "fake-ip" then
|
||||
o = s:taboption("dns", Value, "fakeip_range", translate("Fake-ip Range (IPv4 Cidr)"))
|
||||
o.description = translate("Set Fake-ip Range (IPv4 Cidr)")
|
||||
o = s:taboption("dns", Value, "fakeip_range", translate("Fake-IP Range (IPv4 Cidr)"))
|
||||
o.description = translate("Set Fake-IP Range (IPv4 Cidr)")
|
||||
o.datatype = "cidr4"
|
||||
o.default = "198.18.0.1/16"
|
||||
o.placeholder = "198.18.0.1/16"
|
||||
@ -395,15 +395,15 @@ o:value("off", translate("off "))
|
||||
o.default = "off"
|
||||
o:depends("enable_meta_core", "1")
|
||||
|
||||
o = s:taboption("meta", ListValue, "client_fingerprint", translate("Client Fingerprint"))
|
||||
o = s:taboption("meta", ListValue, "global_client_fingerprint", translate("Client Fingerprint"))
|
||||
o.description = translate("Change The Client Fingerprint, Only Support TLS Transport in TCP/GRPC/WS/HTTP For Vless/Vmess and Trojan")
|
||||
o:value("0", translate("Disable"))
|
||||
o:value("none", translate("None"))
|
||||
o:value("random", translate("Random"))
|
||||
o:value("chrome", translate("Chrome"))
|
||||
o:value("firefox", translate("Firefox"))
|
||||
o:value("safari", translate("Safari"))
|
||||
o:value("ios", translate("IOS"))
|
||||
o.default = "0"
|
||||
o.default = "none"
|
||||
o:depends("enable_meta_core", "1")
|
||||
|
||||
o = s:taboption("meta", Flag, "enable_meta_sniffer", font_red..bold_on..translate("Enable Sniffer")..bold_off..font_off)
|
||||
@ -588,16 +588,16 @@ o:value("0", translate("Black List Mode"))
|
||||
o:value("1", translate("White List Mode"))
|
||||
o.default = "0"
|
||||
o:depends("enable_redirect_dns", "2")
|
||||
o:depends({en_mode = "redir-host", enable_redirect_dns = "1"})
|
||||
o:depends({en_mode = "redir-host-tun", enable_redirect_dns = "1"})
|
||||
o:depends({en_mode = "redir-host-mix", enable_redirect_dns = "1"})
|
||||
o:depends("en_mode", "redir-host")
|
||||
o:depends("en_mode", "redir-host-tun")
|
||||
o:depends("en_mode", "redir-host-mix")
|
||||
|
||||
ip_b = s:taboption("lan_ac", DynamicList, "lan_ac_black_ips", translate("LAN Bypassed Host List"))
|
||||
ip_b.datatype = "ipaddr"
|
||||
ip_b:depends({lan_ac_mode = "0", enable_redirect_dns = "2"})
|
||||
ip_b:depends({lan_ac_mode = "0", en_mode = "redir-host", enable_redirect_dns = "1"})
|
||||
ip_b:depends({lan_ac_mode = "0", en_mode = "redir-host-tun", enable_redirect_dns = "1"})
|
||||
ip_b:depends({lan_ac_mode = "0", en_mode = "redir-host-mix", enable_redirect_dns = "1"})
|
||||
ip_b:depends({lan_ac_mode = "0", en_mode = "redir-host"})
|
||||
ip_b:depends({lan_ac_mode = "0", en_mode = "redir-host-tun"})
|
||||
ip_b:depends({lan_ac_mode = "0", en_mode = "redir-host-mix"})
|
||||
|
||||
mac_b = s:taboption("lan_ac", DynamicList, "lan_ac_black_macs", translate("LAN Bypassed Mac List"))
|
||||
mac_b.datatype = "list(macaddr)"
|
||||
@ -607,9 +607,9 @@ mac_b:depends("lan_ac_mode", "0")
|
||||
ip_w = s:taboption("lan_ac", DynamicList, "lan_ac_white_ips", translate("LAN Proxied Host List"))
|
||||
ip_w.datatype = "ipaddr"
|
||||
ip_w:depends({lan_ac_mode = "1", enable_redirect_dns = "2"})
|
||||
ip_w:depends({lan_ac_mode = "1", en_mode = "redir-host", enable_redirect_dns = "1"})
|
||||
ip_w:depends({lan_ac_mode = "1", en_mode = "redir-host-tun", enable_redirect_dns = "1"})
|
||||
ip_w:depends({lan_ac_mode = "1", en_mode = "redir-host-mix", enable_redirect_dns = "1"})
|
||||
ip_w:depends({lan_ac_mode = "1", en_mode = "redir-host"})
|
||||
ip_w:depends({lan_ac_mode = "1", en_mode = "redir-host-tun"})
|
||||
ip_w:depends({lan_ac_mode = "1", en_mode = "redir-host-mix"})
|
||||
|
||||
mac_w = s:taboption("lan_ac", DynamicList, "lan_ac_white_macs", translate("LAN Proxied Mac List"))
|
||||
mac_w.datatype = "list(macaddr)"
|
||||
@ -1445,7 +1445,7 @@ o.description = font_red..bold_on..translate("The Gateway and DNS of The Connect
|
||||
o.default = 0
|
||||
|
||||
o = s:taboption("ipv6", Flag, "ipv6_dns", translate("IPv6 DNS Resolve"))
|
||||
o.description = font_red..bold_on..translate("Enable to Resolve IPv6 DNS Requests, When Using The Meta Core, Enabling This Alone is Not Valid")..bold_off..font_off
|
||||
o.description = translate("Enable to Resolve IPv6 DNS Requests")
|
||||
o.default = 0
|
||||
|
||||
o = s:taboption("ipv6", Flag, "china_ip6_route", translate("China IPv6 Route"))
|
||||
|
@ -291,7 +291,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
XHR.poll(3, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "dler_info")%>', null, function(x, status) {
|
||||
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "dler_info")%>', null, function(x, status) {
|
||||
if (x && x.status == 200 && status.dler_info != "error") {
|
||||
dler_plan.innerHTML = status.dler_info.plan;
|
||||
dler_plantime.innerHTML = status.dler_info.plan_time;
|
||||
|
@ -245,7 +245,7 @@
|
||||
hid_3.style.display = "none";
|
||||
state.style.display="none";
|
||||
|
||||
XHR.poll(2, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "status")%>', null, function(x, status) {
|
||||
XHR.poll(3, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "status")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
if ( status.restricted_mode != "1" )
|
||||
{
|
||||
@ -340,7 +340,7 @@
|
||||
};
|
||||
});
|
||||
|
||||
XHR.poll(1, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "startlog")%>', null, function(x, status) {
|
||||
XHR.poll(3, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "startlog")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
if ( status.startlog.match("level=fatal") || status.startlog.indexOf("FTL [Config]") != "-1" ) {
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "del_start_log")%>', null, function(x) {});
|
||||
|
@ -303,11 +303,16 @@
|
||||
}
|
||||
});
|
||||
|
||||
XHR.poll(1, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "startlog")%>', null, function(x, status) {
|
||||
XHR.poll(3, '<%=luci.dispatcher.build_url("admin", "services", "openclash", "startlog")%>', null, function(x, status) {
|
||||
if ( x && x.status == 200 ) {
|
||||
if ( status.startlog.match("level=fatal") ) {
|
||||
if ( status.startlog.match("level=fatal") || status.startlog.indexOf("FTL [Config]") != "-1" ) {
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "del_start_log")%>', null, function(x) {});
|
||||
alert('<%:OpenClash Start Failed%> :\n\n' + status.startlog.split('msg=')[1]);
|
||||
if ( status.startlog.match("level=fatal") ) {
|
||||
alert('<%:OpenClash Start Failed%> :\n\n' + status.startlog.split('msg=')[1]);
|
||||
}
|
||||
else {
|
||||
alert('<%:OpenClash Start Failed%> :\n\n' + status.startlog.split('FTL [Config] ')[1]);
|
||||
};
|
||||
}
|
||||
else if ( status.startlog != "\n" && status.startlog != "" ) {
|
||||
update_tip.innerHTML = '<b style=color:green>'+status.startlog+'</b>';
|
||||
|
@ -294,8 +294,8 @@ msgstr "连接设备的网关和 DNS 须为路由器 IP,如果您不使用,
|
||||
msgid "IPv6 DNS Resolve"
|
||||
msgstr "允许 IPv6 类型 DNS 解析"
|
||||
|
||||
msgid "Enable to Resolve IPv6 DNS Requests, When Using The Meta Core, Enabling This Alone is Not Valid"
|
||||
msgstr "允许解析 IPv6 类型的 DNS 请求,当使用 meta 内核时,单独启用此项无效"
|
||||
msgid "Enable to Resolve IPv6 DNS Requests"
|
||||
msgstr "允许解析 IPv6 类型的 DNS 请求"
|
||||
|
||||
msgid "Rules Setting"
|
||||
msgstr "规则设置"
|
||||
@ -3271,11 +3271,11 @@ msgstr "提示:DNS 劫持模式为防火墙转发..."
|
||||
msgid "Tip: DNS Hijacking is Disabled..."
|
||||
msgstr "提示:DNS 劫持未开启..."
|
||||
|
||||
msgid "Fake-ip Range (IPv4 Cidr)"
|
||||
msgstr "Fake-ip 地址范围 (IPv4 Cidr)"
|
||||
msgid "Fake-IP Range (IPv4 Cidr)"
|
||||
msgstr "Fake-IP 地址范围 (IPv4 Cidr)"
|
||||
|
||||
msgid "Set Fake-ip Range (IPv4 Cidr)"
|
||||
msgstr "设置 Fake-ip 地址范围 (IPv4 Cidr)"
|
||||
msgid "Set Fake-IP Range (IPv4 Cidr)"
|
||||
msgstr "设置 Fake-IP 地址范围 (IPv4 Cidr)"
|
||||
|
||||
msgid "IPv6 Settings"
|
||||
msgstr "IPv6 设置"
|
||||
|
@ -2770,7 +2770,7 @@ get_config()
|
||||
custom_china_domain_dns_server=$(uci -q get openclash.config.custom_china_domain_dns_server || echo "114.114.114.114")
|
||||
find_process_mode=$(uci -q get openclash.config.find_process_mode || echo off)
|
||||
upnp_lease_file=$(uci -q get upnpd.config.upnp_lease_file)
|
||||
client_fingerprint=$(uci -q get openclash.config.client_fingerprint || echo 0)
|
||||
global_client_fingerprint=$(uci -q get openclash.config.global_client_fingerprint || echo "none")
|
||||
[ -z "$dns_port" ] && dns_port=7874 && uci -q set openclash.config.dns_port=7874
|
||||
uci -q set openclash.config.restricted_mode=0 && uci -q commit openclash
|
||||
}
|
||||
@ -2798,7 +2798,7 @@ start()
|
||||
if ! $quick_start; then
|
||||
LOG_OUT "Step 3: Modify The Config File..."
|
||||
config_check
|
||||
/usr/share/openclash/yml_change.sh 2>/dev/null "$en_mode" "$da_password" "$cn_port" "$proxy_port" "$TMP_CONFIG_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$log_level" "$proxy_mode" "$en_mode_tun" "$stack_type" "$dns_port" "$mixed_port" "$tproxy_port" "$ipv6_dns" "$store_fakeip" "$stream_domains_prefetch" "$enable_meta_core" "$enable_meta_sniffer" "$enable_geoip_dat" "$geodata_loader" "$enable_meta_sniffer_custom" "$interface_name" "$enable_tcp_concurrent" "$core_type" "$append_default_dns" "$enable_meta_sniffer_pure_ip" "$find_process_mode" "$fakeip_range" "$client_fingerprint"
|
||||
/usr/share/openclash/yml_change.sh 2>/dev/null "$en_mode" "$da_password" "$cn_port" "$proxy_port" "$TMP_CONFIG_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$log_level" "$proxy_mode" "$en_mode_tun" "$stack_type" "$dns_port" "$mixed_port" "$tproxy_port" "$ipv6_dns" "$store_fakeip" "$stream_domains_prefetch" "$enable_meta_core" "$enable_meta_sniffer" "$enable_geoip_dat" "$geodata_loader" "$enable_meta_sniffer_custom" "$interface_name" "$enable_tcp_concurrent" "$core_type" "$append_default_dns" "$enable_meta_sniffer_pure_ip" "$find_process_mode" "$fakeip_range" "$global_client_fingerprint"
|
||||
/usr/share/openclash/yml_rules_change.sh 2>/dev/null "$rule_source" "$enable_custom_clash_rules" "$TMP_CONFIG_FILE" "$enable_rule_proxy" "$CONFIG_NAME" "$router_self_proxy" "$lan_ip" "$proxy_port" "$tproxy_port" "$enable_meta_core" "$enable_redirect_dns" "$fakeip_range"
|
||||
/usr/share/openclash/openclash_custom_domain_dns.sh >/dev/null 2>&1
|
||||
fi
|
||||
|
@ -0,0 +1,3 @@
|
||||
payload:
|
||||
# > ChatGPT
|
||||
- DOMAIN-SUFFIX,openai.com
|
@ -24,7 +24,6 @@ DISNEY_DOMAINS_LIST="/usr/share/openclash/res/Disney_Plus_Domains.list"
|
||||
china_ip_route=$(uci -q get openclash.config.china_ip_route)
|
||||
en_mode=$(uci -q get openclash.config.en_mode)
|
||||
fakeip_range=$(uci -q get openclash.config.fakeip_range || echo "198.18.0.1/16")
|
||||
client_fingerprint=$(uci -q get openclash.config.client_fingerprint || echo 0)
|
||||
CRASH_NUM=0
|
||||
CFG_UPDATE_INT=1
|
||||
STREAM_DOMAINS_PREFETCH=1
|
||||
@ -151,38 +150,6 @@ if [ "$enable" -eq 1 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
##client-fingerprint
|
||||
if [ "$client_fingerprint" != "0" ] && [ "$core_type" == "Meta" ]; then
|
||||
ruby -ryaml -rYAML -I "/usr/share/openclash" -E UTF-8 -e "
|
||||
begin
|
||||
Value = YAML.load_file('$CONFIG_FILE');
|
||||
if Value.key?('proxy-providers') and not Value['proxy-providers'].nil? then
|
||||
Value['proxy-providers'].values.each{
|
||||
|x,p,v|
|
||||
if x.key?('path') and not x['path'].empty? then
|
||||
p = '/etc/openclash/proxy_provider/'+File.basename(x['path']);
|
||||
if File::exist?(p) then
|
||||
v = YAML.load_file(p);
|
||||
if v.key?('proxies') and not v['proxies'].nil? then
|
||||
v['proxies'].each{
|
||||
|z|
|
||||
if z['type'] == 'vmess' or z['type'] == 'vless' or z['type'] == 'trojan' then
|
||||
if z['client-fingerprint'] != '${client_fingerprint}' then
|
||||
z['client-fingerprint'] = '${client_fingerprint}';
|
||||
end;
|
||||
end;
|
||||
};
|
||||
end;
|
||||
File.open(p,'w') {|f| YAML.dump(v, f)};
|
||||
end;
|
||||
end;
|
||||
};
|
||||
end;
|
||||
rescue Exception => e
|
||||
puts '${LOGTIME} Watchdog: Edit Client-fingerprint Failed,【' + e.message + '】';
|
||||
end" 2>/dev/null >> $LOG_FILE
|
||||
fi
|
||||
|
||||
## Porxy history
|
||||
/usr/share/openclash/openclash_history_get.sh
|
||||
|
||||
|
@ -16,9 +16,6 @@ rules:
|
||||
- RULE-SET,ABC,Global TV
|
||||
- RULE-SET,Abema TV,Global TV
|
||||
- RULE-SET,Amazon,Global TV
|
||||
- RULE-SET,Apple Music,Global TV
|
||||
- RULE-SET,Apple News,Global TV
|
||||
- RULE-SET,Apple TV,Global TV
|
||||
- RULE-SET,Bahamut,Global TV
|
||||
- RULE-SET,BBC iPlayer,Global TV
|
||||
- RULE-SET,DAZN,Global TV
|
||||
@ -50,6 +47,10 @@ rules:
|
||||
- RULE-SET,Speedtest,Speedtest
|
||||
- RULE-SET,PayPal,PayPal
|
||||
- RULE-SET,Microsoft,Microsoft
|
||||
- RULE-SET,ChatGPT,ChatGPT
|
||||
- RULE-SET,Apple Music,Apple TV
|
||||
- RULE-SET,Apple News,Apple TV
|
||||
- RULE-SET,Apple TV,Apple TV
|
||||
- RULE-SET,Apple,Apple
|
||||
- RULE-SET,Google FCM,Google FCM
|
||||
- RULE-SET,Scholar,Scholar
|
||||
@ -79,9 +80,6 @@ script:
|
||||
"ABC": "Global TV",
|
||||
"Abema TV": "Global TV",
|
||||
"Amazon": "Global TV",
|
||||
"Apple Music": "Global TV",
|
||||
"Apple News": "Global TV",
|
||||
"Apple TV": "Global TV",
|
||||
"Bahamut": "Global TV",
|
||||
"BBC iPlayer": "Global TV",
|
||||
"DAZN": "Global TV",
|
||||
@ -113,6 +111,10 @@ script:
|
||||
"Speedtest": "Speedtest",
|
||||
"PayPal": "PayPal",
|
||||
"Microsoft": "Microsoft",
|
||||
"ChatGPT": "ChatGPT",
|
||||
"Apple Music": "Apple TV",
|
||||
"Apple News": "Apple TV",
|
||||
"Apple TV": "Apple TV",
|
||||
"Apple": "Apple",
|
||||
"Google FCM": "Google FCM",
|
||||
"Scholar": "Scholar",
|
||||
@ -455,6 +457,12 @@ rule-providers:
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/Microsoft.yaml
|
||||
path: "./Rules/Microsoft"
|
||||
interval: 86400
|
||||
ChatGPT:
|
||||
type: http
|
||||
behavior: classical
|
||||
url: https://fastly.jsdelivr.net/gh/dler-io/Rules@main/Clash/Provider/ChatGPT.yaml
|
||||
path: "./Rules/ChatGPT"
|
||||
interval: 86400
|
||||
PROXY:
|
||||
type: http
|
||||
behavior: classical
|
||||
|
@ -9,7 +9,6 @@ dns_advanced_setting=$(uci -q get openclash.config.dns_advanced_setting)
|
||||
core_type=$(uci -q get openclash.config.core_type)
|
||||
enable_custom_dns=$(uci -q get openclash.config.enable_custom_dns)
|
||||
append_wan_dns=$(uci -q get openclash.config.append_wan_dns || echo 1)
|
||||
ipv6_dns=$(uci -q get openclash.config.ipv6_dns || echo 0)
|
||||
tolerance=$(uci -q get openclash.config.tolerance || echo 0)
|
||||
custom_fallback_filter=$(uci -q get openclash.config.custom_fallback_filter || echo 0)
|
||||
enable_meta_core=$(uci -q get openclash.config.enable_meta_core || echo 0)
|
||||
@ -380,6 +379,7 @@ Thread.new{
|
||||
Value['geodata-loader']='${22}';
|
||||
Value['tcp-concurrent']=$enable_tcp_concurrent;
|
||||
Value['find-process-mode']='${29}';
|
||||
Value['global-client-fingerprint']='${31}';
|
||||
else
|
||||
if Value.key?('geodata-mode') then
|
||||
Value.delete('geodata-mode');
|
||||
@ -393,6 +393,9 @@ Thread.new{
|
||||
if Value.key?('find-process-mode') then
|
||||
Value.delete('find-process-mode');
|
||||
end
|
||||
if Value.key?('global-client-fingerprint') then
|
||||
Value.delete('global-client-fingerprint');
|
||||
end
|
||||
end;
|
||||
if not Value.key?('dns') then
|
||||
Value_1={'dns'=>{'enable'=>true}};
|
||||
@ -402,6 +405,10 @@ Thread.new{
|
||||
end;
|
||||
if ${16} == 1 then
|
||||
Value['dns']['ipv6']=true;
|
||||
#meta core v6 DNS
|
||||
if ${19} != 1 then
|
||||
Value['ipv6']=true;
|
||||
end;
|
||||
else
|
||||
Value['dns']['ipv6']=false;
|
||||
end;
|
||||
@ -422,14 +429,14 @@ Thread.new{
|
||||
Value_sniffer={'sniffer'=>{'enable'=>true}};
|
||||
Value['sniffer']=Value_sniffer['sniffer'];
|
||||
if '$1' == 'redir-host' then
|
||||
Value['sniffer']['ForceDnsMapping']=true;
|
||||
Value['sniffer']['force-dns-mapping']=true;
|
||||
else
|
||||
Value['sniffer']['ForceDnsMapping']=false;
|
||||
Value['sniffer']['force-dns-mapping']=false;
|
||||
end;
|
||||
if ${28} == 1 then
|
||||
Value['sniffer']['ParsePureIp']=true;
|
||||
Value['sniffer']['parse-pure-ip']=true;
|
||||
else
|
||||
Value['sniffer']['ParsePureIp']=false;
|
||||
Value['sniffer']['parse-pure-ip']=false;
|
||||
end;
|
||||
if File::exist?('/etc/openclash/custom/openclash_force_sniffing_domain.yaml') then
|
||||
if ${23} == 1 then
|
||||
@ -839,48 +846,6 @@ Thread.new{
|
||||
}.join;
|
||||
rescue Exception => e
|
||||
puts '${LOGTIME} Error: Edit Vmess Compatible Failed,【' + e.message + '】';
|
||||
end;
|
||||
|
||||
#client-fingerprint
|
||||
begin
|
||||
Thread.new{
|
||||
if '${31}' != '0' and ${19} == 1 then
|
||||
if Value.key?('proxies') and not Value['proxies'].nil? then
|
||||
Value['proxies'].each{
|
||||
|x|
|
||||
if x['type'] == 'vmess' or x['type'] == 'vless' or x['type'] == 'trojan' then
|
||||
if x['client-fingerprint'] != '${31}' then
|
||||
x['client-fingerprint'] = '${31}';
|
||||
end;
|
||||
end;
|
||||
};
|
||||
end;
|
||||
if Value.key?('proxy-providers') and not Value['proxy-providers'].nil? then
|
||||
Value['proxy-providers'].values.each{
|
||||
|x,p,v|
|
||||
if x.key?('path') and not x['path'].empty? then
|
||||
p = '/etc/openclash/proxy_provider/'+File.basename(x['path']);
|
||||
if File::exist?(p) then
|
||||
v = YAML.load_file(p);
|
||||
if v.key?('proxies') and not v['proxies'].nil? then
|
||||
v['proxies'].each{
|
||||
|z|
|
||||
if z['type'] == 'vmess' or z['type'] == 'vless' or z['type'] == 'trojan' then
|
||||
if z['client-fingerprint'] != '${31}' then
|
||||
z['client-fingerprint'] = '${31}';
|
||||
end;
|
||||
end;
|
||||
};
|
||||
end;
|
||||
File.open(p,'w') {|f| YAML.dump(v, f)};
|
||||
end;
|
||||
end;
|
||||
};
|
||||
end;
|
||||
end;
|
||||
}.join;
|
||||
rescue Exception => e
|
||||
puts '${LOGTIME} Error: Edit Client-fingerprint Failed,【' + e.message + '】';
|
||||
ensure
|
||||
File.open('$5','w') {|f| YAML.dump(Value, f)};
|
||||
end" 2>/dev/null >> $LOG_FILE
|
||||
|
@ -1374,6 +1374,20 @@ cat >> "$SERVER_FILE" <<-EOF
|
||||
- DIRECT
|
||||
- Proxy
|
||||
EOF
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
- name: ChatGPT
|
||||
type: select
|
||||
proxies:
|
||||
- Proxy
|
||||
- DIRECT
|
||||
EOF
|
||||
cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null
|
||||
if [ -f "/tmp/Proxy_Provider" ]; then
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
use:
|
||||
EOF
|
||||
fi
|
||||
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
- name: Apple
|
||||
type: select
|
||||
@ -1388,6 +1402,20 @@ cat >> "$SERVER_FILE" <<-EOF
|
||||
EOF
|
||||
fi
|
||||
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
- name: Apple TV
|
||||
type: select
|
||||
proxies:
|
||||
- Proxy
|
||||
- DIRECT
|
||||
EOF
|
||||
cat /tmp/Proxy_Server >> $SERVER_FILE 2>/dev/null
|
||||
if [ -f "/tmp/Proxy_Provider" ]; then
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
use:
|
||||
EOF
|
||||
fi
|
||||
cat /tmp/Proxy_Provider >> $SERVER_FILE 2>/dev/null
|
||||
cat >> "$SERVER_FILE" <<-EOF
|
||||
- name: Google FCM
|
||||
type: select
|
||||
@ -1707,9 +1735,11 @@ ${uci_set}HBOMax="HBO Max"
|
||||
${uci_set}HBOGo="HBO Go"
|
||||
${uci_set}Pornhub="Pornhub"
|
||||
${uci_set}Apple="Apple"
|
||||
${uci_set}Apple_TV="Apple_TV"
|
||||
${uci_set}GoogleFCM="Google FCM"
|
||||
${uci_set}Scholar="Scholar"
|
||||
${uci_set}Microsoft="Microsoft"
|
||||
${uci_set}ChatGPT="ChatGPT"
|
||||
${uci_set}Netflix="Netflix"
|
||||
${uci_set}Discovery="Discovery Plus"
|
||||
${uci_set}DAZN="DAZN"
|
||||
@ -1741,17 +1771,19 @@ ${uci_set}Others="Others"
|
||||
${UCI_DEL_LIST}="Netflix" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Netflix" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Discovery Plus" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Discovery Plus" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="DAZN" >/dev/null 2>&1 && ${UCI_ADD_LIST}="DAZN" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Apple" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Apple" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="ChatGPT" >/dev/null 2>&1 && ${UCI_ADD_LIST}="ChatGPT" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Apple_TV" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Apple_TV" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Google FCM" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Google FCM" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Scholar" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Scholar" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Disney" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Disney" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Spotify" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Spotify" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Steam" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Steam" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Telegram" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Telegram" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Crypto" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Crypto" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Discord" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Discord" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Crypto" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Crypto" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Discord" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Discord" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="PayPal" >/dev/null 2>&1 && ${UCI_ADD_LIST}="PayPal" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Speedtest" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Speedtest" >/dev/null 2>&1
|
||||
${UCI_DEL_LIST}="Others" >/dev/null 2>&1 && ${UCI_ADD_LIST}="Others" >/dev/null 2>&1
|
||||
}
|
||||
elif [ "$rule_sources" = "ConnersHua_return" ] && [ "$servers_if_update" != "1" ] && [ -z "$if_game_proxy" ]; then
|
||||
LOG_OUT "Creating By Using ConnersHua Return Rules..."
|
||||
|
@ -887,6 +887,8 @@ yml_other_rules_get()
|
||||
config_get "GoogleFCM" "$section" "GoogleFCM" "DIRECT"
|
||||
config_get "Discovery" "$section" "Discovery" "$GlobalTV"
|
||||
config_get "DAZN" "$section" "DAZN" "$GlobalTV"
|
||||
config_get "ChatGPT" "$section" "ChatGPT" "$Proxy"
|
||||
config_get "Apple_TV" "$section" "Apple_TV" "$GlobalTV"
|
||||
}
|
||||
|
||||
if [ "$1" != "0" ]; then
|
||||
@ -929,11 +931,13 @@ if [ "$1" != "0" ]; then
|
||||
|| [ -z "$(grep -F "$HBOGo" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep -F "$Pornhub" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep -F "$Apple" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep -F "$Apple_TV" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep -F "$Scholar" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep -F "$Netflix" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep -F "$Disney" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep -F "$Discovery" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep -F "$DAZN" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep -F "$ChatGPT" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep -F "$Spotify" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep -F "$Steam" /tmp/Proxy_Group)" ]\
|
||||
|| [ -z "$(grep -F "$AdBlock" /tmp/Proxy_Group)" ]\
|
||||
@ -989,10 +993,12 @@ if [ "$1" != "0" ]; then
|
||||
.gsub(/,Proxy$/, ',$Proxy#delete_')
|
||||
.gsub(/,YouTube$/, ',$Youtube#delete_')
|
||||
.gsub(/,Apple$/, ',$Apple#delete_')
|
||||
.gsub(/,Apple TV$/, ',$Apple_TV#delete_')
|
||||
.gsub(/,Scholar$/, ',$Scholar#delete_')
|
||||
.gsub(/,Netflix$/, ',$Netflix#delete_')
|
||||
.gsub(/,Disney$/, ',$Disney#delete_')
|
||||
.gsub(/,Spotify$/, ',$Spotify#delete_')
|
||||
.gsub(/,ChatGPT$/, ',$ChatGPT#delete_')
|
||||
.gsub(/,Steam$/, ',$Steam#delete_')
|
||||
.gsub(/,AdBlock$/, ',$AdBlock#delete_')
|
||||
.gsub(/,Speedtest$/, ',$Speedtest#delete_')
|
||||
@ -1018,10 +1024,12 @@ if [ "$1" != "0" ]; then
|
||||
.gsub!(/: \"Proxy\"/,': \"$Proxy#delete_\"')
|
||||
.gsub!(/: \"YouTube\"/,': \"$Youtube#delete_\"')
|
||||
.gsub!(/: \"Apple\"/,': \"$Apple#delete_\"')
|
||||
.gsub!(/: \"Apple TV\"/,': \"$Apple_TV#delete_\"')
|
||||
.gsub!(/: \"Scholar\"/,': \"$Scholar#delete_\"')
|
||||
.gsub!(/: \"Netflix\"/,': \"$Netflix#delete_\"')
|
||||
.gsub!(/: \"Disney\"/,': \"$Disney#delete_\"')
|
||||
.gsub!(/: \"Spotify\"/,': \"$Spotify#delete_\"')
|
||||
.gsub!(/: \"ChatGPT\"/,': \"$ChatGPT#delete_\"')
|
||||
.gsub!(/: \"Steam\"/,': \"$Steam#delete_\"')
|
||||
.gsub!(/: \"AdBlock\"/,': \"$AdBlock#delete_\"')
|
||||
.gsub!(/: \"Speedtest\"/,': \"$Speedtest#delete_\"')
|
||||
|
@ -6,12 +6,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sing-box
|
||||
PKG_VERSION:=1.1.5
|
||||
PKG_VERSION:=1.2-beta1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/SagerNet/sing-box/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=a1e642362f41bd0e362cd9c8d2f0d29d2eca6a55a948677f6f03cfb81c4f0657
|
||||
PKG_HASH:=dcf36bc8cacea19a2e47bcfc691059680d6691898327b2317085711e88ff45cb
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_LICENSE_FILE:=LICENSE
|
||||
|
Loading…
Reference in New Issue
Block a user