mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-04-19 12:19:33 +08:00
feat: sing-box hop_interval 和 server_ports 不需要 includeUnsupportedProxy
This commit is contained in:
parent
8f701570e4
commit
29525b3e22
@ -587,7 +587,6 @@ const hysteria2Parser = (proxy = {}, includeUnsupportedProxy) => {
|
||||
};
|
||||
if (parsedProxy.server_port < 0 || parsedProxy.server_port > 65535)
|
||||
throw 'invalid port';
|
||||
if (includeUnsupportedProxy) {
|
||||
if (proxy['hop-interval'])
|
||||
parsedProxy.hop_interval = /^\d+$/.test(proxy['hop-interval'])
|
||||
? `${proxy['hop-interval']}s`
|
||||
@ -596,7 +595,6 @@ const hysteria2Parser = (proxy = {}, includeUnsupportedProxy) => {
|
||||
parsedProxy.server_ports = proxy['ports']
|
||||
.split(/\s*,\s*/)
|
||||
.map((p) => p.replace(/\s*-\s*/g, ':'));
|
||||
}
|
||||
if (proxy.up) parsedProxy.up_mbps = parseInt(`${proxy.up}`, 10);
|
||||
if (proxy.down) parsedProxy.down_mbps = parseInt(`${proxy.down}`, 10);
|
||||
if (proxy.obfs === 'salamander') parsedProxy.obfs.type = 'salamander';
|
||||
|
Loading…
x
Reference in New Issue
Block a user