mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-14 17:09:24 +02:00
Optimized UX and code structure
+ Added automatic self-sign certificate sniffing + Moved all constant into def.go + Added auto restart on port change when proxy server is running + Optimized slow search geoIP resolver by introducing new cache mechanism + Updated default incoming port to HTTPS instead of HTTP
This commit is contained in:
@@ -295,15 +295,25 @@
|
||||
//Automatic check if the site require TLS and check the checkbox if needed
|
||||
function autoCheckTls(targetDomain){
|
||||
$.cjax({
|
||||
url: "/api/proxy/tlscheck",
|
||||
url: "/api/proxy/tlscheck?selfsignchk=true",
|
||||
data: {url: targetDomain},
|
||||
success: function(data){
|
||||
if (data.error != undefined){
|
||||
msgbox(data.error, false);
|
||||
}else if (data == "https"){
|
||||
$("#reqTls").parent().checkbox("set checked");
|
||||
}else if (data == "http"){
|
||||
$("#reqTls").parent().checkbox("set unchecked");
|
||||
}else{
|
||||
//Check if the site require TLS
|
||||
if (data.protocol == "https"){
|
||||
$("#reqTls").parent().checkbox("set checked");
|
||||
}else if (data.protocol == "http"){
|
||||
$("#reqTls").parent().checkbox("set unchecked");
|
||||
}
|
||||
//Check if the site is using self-signed cert
|
||||
if (data.selfsign){
|
||||
$("#skipTLSValidation").parent().checkbox("set checked");
|
||||
}else{
|
||||
$("#skipTLSValidation").parent().checkbox("set unchecked");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user