diff --git a/luci-app-openclash/root/usr/share/openclash/openclash_streaming_unlock.lua b/luci-app-openclash/root/usr/share/openclash/openclash_streaming_unlock.lua index 95a3c4d049..022d4458ec 100644 --- a/luci-app-openclash/root/usr/share/openclash/openclash_streaming_unlock.lua +++ b/luci-app-openclash/root/usr/share/openclash/openclash_streaming_unlock.lua @@ -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() diff --git a/luci-app-openclash/root/usr/share/openclash/yml_change.sh b/luci-app-openclash/root/usr/share/openclash/yml_change.sh index e46220bce9..233c4364e9 100644 --- a/luci-app-openclash/root/usr/share/openclash/yml_change.sh +++ b/luci-app-openclash/root/usr/share/openclash/yml_change.sh @@ -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;