Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vernesong committed Nov 9, 2024
1 parent 5982568 commit 9bd23f6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,6 @@ o = s:taboption("meta", Flag, "enable_unified_delay", font_red..bold_on..transla
o.description = font_red..bold_on..translate("Change The Delay Calculation Method To Remove Extra Delays Such as Handshaking")..bold_off..font_off
o.default = "0"

o = s:taboption("meta", ListValue, "keep_alive_interval", font_red..bold_on..translate("TCP Keep-alive Interval(s)")..bold_off..font_off)
o.description = font_red..bold_on..translate("Change The TCP Keep-alive Interval, Selecting a Larger Value Avoids Abnormal Resource Consumption")..bold_off..font_off
o:value("0", translate("Disable"))
o:value("15")
o:value("1800")
o:value("3600")
o.default = "0"

o = s:taboption("meta", ListValue, "find_process_mode", translate("Enable Process Rule"))
o.description = translate("Whether to Enable Process Rules, If You Are Not Sure, Please Choose off Which Useful in Router Environment")
o:value("0", translate("Disable"))
Expand Down
6 changes: 0 additions & 6 deletions luci-app-openclash/po/zh-cn/openclash.zh-cn.po
Original file line number Diff line number Diff line change
Expand Up @@ -3282,12 +3282,6 @@ msgstr "更换延迟计算方式,通过去除握手等额外开销来降低延
msgid "Tip: If the download fails, try setting the CDN in Overwrite Settings - General Settings - Github Address Modify Options"
msgstr "提示:如果下载失败,您可以尝试在覆写设置 - 常规设置 - Github地址修改选项中设置CDN"

msgid "Change The TCP Keep-alive Interval, Selecting a Larger Value Avoids Abnormal Resource Consumption"
msgstr "更改 TCP Keep-alive 间隔,选择较大数值可以避免异常的资源消耗"

msgid "TCP Keep-alive Interval(s)"
msgstr "TCP Keep-alive 间隔(s)"

msgid "Used for Downloading Subscriptions, Defaults to Clash"
msgstr "用于下载订阅时指定 UA,默认为 Clash"

Expand Down
3 changes: 1 addition & 2 deletions luci-app-openclash/root/etc/init.d/openclash
Original file line number Diff line number Diff line change
Expand Up @@ -2914,7 +2914,6 @@ get_config()
upnp_lease_file=$(uci -q get upnpd.config.upnp_lease_file)
global_client_fingerprint=$(uci -q get openclash.config.global_client_fingerprint || echo 0)
enable_unified_delay=$(uci -q get openclash.config.enable_unified_delay || echo 0)
keep_alive_interval=$(uci -q get openclash.config.keep_alive_interval || echo 0)
enable_respect_rules=$(uci -q get openclash.config.enable_respect_rules || echo 0)
intranet_allowed_wan_name=$(uci -q get openclash.config.intranet_allowed_wan_name || echo 0)
custom_fakeip_filter_mode=$(uci -q get openclash.config.custom_fakeip_filter_mode || echo "blacklist")
Expand Down Expand Up @@ -2944,7 +2943,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" "$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" "$ipv6_mode" "$stack_type_v6" "$enable_unified_delay" "$keep_alive_interval" "$enable_respect_rules" "$custom_fakeip_filter_mode" "$bypass_gateway_compatible" "$iptables_compat"
/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" "$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" "$ipv6_mode" "$stack_type_v6" "$enable_unified_delay" "$enable_respect_rules" "$custom_fakeip_filter_mode" "$bypass_gateway_compatible" "$iptables_compat"
/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_redirect_dns" "$fakeip_range" "$en_mode"
#Custom overwrite
if [ -f "/etc/openclash/custom/openclash_custom_overwrite.sh" ]; then
Expand Down
12 changes: 5 additions & 7 deletions luci-app-openclash/root/usr/share/openclash/yml_change.sh
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ threads << Thread.new {
Value['log-level']='$9';
end;
Value['allow-lan']=true;
Value['disable-keep-alive']=true;
Value['external-controller']='0.0.0.0:$3';
Value['secret']='$2';
Value['bind-address']='*';
Expand All @@ -366,9 +367,6 @@ threads << Thread.new {
if ${32} == 1 then
Value['unified-delay']=true;
end;
if '${33}' != '0' then
Value['keep-alive-interval']=${33};
end;
if '${27}' != '0' then
Value['find-process-mode']='${27}';
end;
Expand All @@ -394,7 +392,7 @@ threads << Thread.new {
Value['dns']['listen']='0.0.0.0:${13}';
#meta only
if ${34} == 1 then
if ${33} == 1 then
Value['dns']['respect-rules']=true;
end;
Expand Down Expand Up @@ -432,7 +430,7 @@ threads << Thread.new {
Value['tun']['auto-redirect']=false;
Value['tun']['strict-route']=false;
Value['tun'].delete_if{|x,y| x=='iproute2-table-index'};
if ${36} == 1 then
if ${35} == 1 then
Value['tun']['endpoint-independent-nat']=true;
end;
else
Expand Down Expand Up @@ -610,7 +608,7 @@ threads << Thread.new {
threads << Thread.new {
begin
if $custom_fakeip_filter == 1 then
if '${35}' == 'whitelist' then
if '${34}' == 'whitelist' then
Value['dns']['fake-ip-filter-mode']='whitelist';
else
Value['dns']['fake-ip-filter-mode']='blacklist';
Expand Down Expand Up @@ -788,7 +786,7 @@ begin
Value['dns'].merge!(Value_1);
Value['dns'].merge!(Value_2);
end;
if ${34} == 1 or Value['dns']['respect-rules'].to_s == 'true' then
if ${33} == 1 or Value['dns']['respect-rules'].to_s == 'true' then
if not Value['dns'].has_key?('proxy-server-nameserver') or Value['dns']['proxy-server-nameserver'].to_a.empty? then
Value['dns'].merge!({'proxy-server-nameserver'=>['114.114.114.114','119.29.29.29','8.8.8.8','1.1.1.1']});
YAML.LOG('Tip: Respect-rules Option Need Proxy-server-nameserver Option Must Be Setted, Auto Set to【114.114.114.114, 119.29.29.29, 8.8.8.8, 1.1.1.1】');
Expand Down

0 comments on commit 9bd23f6

Please sign in to comment.