Merge pull request #226 from FantajiNeko/main

修复证书申请代理设置,使用反代时不使用代理
This commit is contained in:
消失的彩虹海
2025-05-29 17:01:05 +08:00
committed by GitHub
4 changed files with 8 additions and 1 deletions

View File

@@ -326,6 +326,8 @@ function check_proxy($url, $proxy_server, $proxy_port, $type, $proxy_user, $prox
$proxy_type = CURLPROXY_SOCKS4;
} elseif ($type == 'sock5') {
$proxy_type = CURLPROXY_SOCKS5;
} elseif ($type == 'sock5h') {
$proxy_type = CURLPROXY_SOCKS5_HOSTNAME;
} else {
$proxy_type = CURLPROXY_HTTP;
}
@@ -462,6 +464,8 @@ function curl_set_proxy(&$ch)
$proxy_type = CURLPROXY_SOCKS4;
} elseif ($proxy_type == 'sock5') {
$proxy_type = CURLPROXY_SOCKS5;
} elseif ($proxy_type == 'sock5h') {
$proxy_type = CURLPROXY_SOCKS5_HOSTNAME;
} else {
$proxy_type = CURLPROXY_HTTP;
}

View File

@@ -321,7 +321,7 @@ class ACMEv2
}
));
if ($this->proxy) {
if ($this->proxy == 1) {
curl_set_proxy($this->ch);
}

View File

@@ -30,6 +30,8 @@ class CheckUtils
$proxy_type = CURLPROXY_SOCKS4;
} elseif ($proxy_type == 'sock5') {
$proxy_type = CURLPROXY_SOCKS5;
} elseif ($proxy_type == 'sock5h') {
$proxy_type = CURLPROXY_SOCKS5_HOSTNAME;
} else {
$proxy_type = CURLPROXY_HTTP;
}

View File

@@ -30,6 +30,7 @@
<option value="https">HTTPS</option>
<option value="sock4">SOCK4</option>
<option value="sock5">SOCK5</option>
<option value="sock5h">SOCK5H</option>
</select></div>
</div><br/>
<div class="form-group">