mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-30 10:14:03 +00:00
Add socks5h support
Add socks5h support as an extra option to not break previous socks5 implementation. Allows to toggle between socks5 and socks5h explicit. Fixes #2296
This commit is contained in:
parent
bc3229828e
commit
cd270bd8b5
2 changed files with 3 additions and 1 deletions
|
@ -7,7 +7,7 @@ const { UptimeKumaServer } = require("./uptime-kuma-server");
|
||||||
|
|
||||||
class Proxy {
|
class Proxy {
|
||||||
|
|
||||||
static SUPPORTED_PROXY_PROTOCOLS = [ "http", "https", "socks", "socks5", "socks4" ];
|
static SUPPORTED_PROXY_PROTOCOLS = [ "http", "https", "socks", "socks5", "socks5h", "socks4" ];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Saves and updates given proxy entity
|
* Saves and updates given proxy entity
|
||||||
|
@ -126,6 +126,7 @@ class Proxy {
|
||||||
break;
|
break;
|
||||||
case "socks":
|
case "socks":
|
||||||
case "socks5":
|
case "socks5":
|
||||||
|
case "socks5h":
|
||||||
case "socks4":
|
case "socks4":
|
||||||
agent = new SocksProxyAgent({
|
agent = new SocksProxyAgent({
|
||||||
...httpAgentOptions,
|
...httpAgentOptions,
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
<option value="http">HTTP</option>
|
<option value="http">HTTP</option>
|
||||||
<option value="socks">SOCKS</option>
|
<option value="socks">SOCKS</option>
|
||||||
<option value="socks5">SOCKS v5</option>
|
<option value="socks5">SOCKS v5</option>
|
||||||
|
<option value="socks5h">SOCKS v5 (+DNS)</option>
|
||||||
<option value="socks4">SOCKS v4</option>
|
<option value="socks4">SOCKS v4</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue