Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vernesong committed Dec 30, 2024
1 parent 8af662b commit f4e58fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1582,8 +1582,8 @@ end
function network_test()
local test_url1 = "https://www.gstatic.com/generate_204"
local test_url2 = "https://cp.cloudflare.com/generate_204"
local httpcode1 = SYS.exec(string.format("curl -sL --connect-timeout 5 -m 5 --speed-time 5 --speed-limit 1 --retry 2 -o /dev/null -w %%{http_code} -H 'Accept-Language: en' -H 'Content-Type: application/json' -H 'User-Agent: %s' '%s'", UA, test_url1))
local httpcode2 = SYS.exec(string.format("curl -sL --connect-timeout 5 -m 5 --speed-time 5 --speed-limit 1 --retry 2 -o /dev/null -w %%{http_code} -H 'Accept-Language: en' -H 'Content-Type: application/json' -H 'User-Agent: %s' '%s'", UA, test_url2))
local httpcode1 = SYS.exec(string.format("curl -sL --connect-timeout 10 -m 15 --speed-time 5 --speed-limit 1 --retry 2 -o /dev/null -w %%{http_code} -H 'Accept-Language: en' -H 'Content-Type: application/json' -H 'User-Agent: %s' '%s'", UA, test_url1))
local httpcode2 = SYS.exec(string.format("curl -sL --connect-timeout 10 -m 15 --speed-time 5 --speed-limit 1 --retry 2 -o /dev/null -w %%{http_code} -H 'Accept-Language: en' -H 'Content-Type: application/json' -H 'User-Agent: %s' '%s'", UA, test_url2))
if httpcode1 or httpcode2 then
if tonumber(httpcode1) == 204 or tonumber(httpcode2) == 204 then
unlock_auto_select()
Expand Down
5 changes: 1 addition & 4 deletions luci-app-openclash/root/usr/share/openclash/yml_change.sh
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,7 @@ threads << Thread.new {
Value['tun']['device']='utun';
Value_2={'dns-hijack'=>['tcp://any:53']};
Value['tun'].merge!(Value_2);
if '$stack_type' != 'mixed' then
Value['tun']['gso']=true;
Value['tun']['gso-max-size']=65536;
end;
Value['tun']['endpoint-independent-nat']=true;
Value['tun']['auto-route']=false;
Value['tun']['auto-detect-interface']=false;
Value['tun']['auto-redirect']=false;
Expand Down

0 comments on commit f4e58fe

Please sign in to comment.