mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-06-22 12:31:42 +08:00
Merge pull request #261 from Ariesly/master
This commit is contained in:
commit
17504ab5aa
@ -81,6 +81,24 @@ export default function ShadowRocket_Producer() {
|
|||||||
) {
|
) {
|
||||||
proxy['fast-open'] = proxy.tfo;
|
proxy['fast-open'] = proxy.tfo;
|
||||||
}
|
}
|
||||||
|
} else if (proxy.type === 'hysteria2') {
|
||||||
|
if (
|
||||||
|
proxy['obfs-password'] &&
|
||||||
|
proxy.obfs == 'salamander') {
|
||||||
|
proxy.obfs = proxy['obfs-password'];
|
||||||
|
delete proxy['obfs-password'];
|
||||||
|
}
|
||||||
|
if (isPresent(proxy, 'alpn')) {
|
||||||
|
proxy.alpn = Array.isArray(proxy.alpn)
|
||||||
|
? proxy.alpn
|
||||||
|
: [proxy.alpn];
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
isPresent(proxy, 'tfo') &&
|
||||||
|
!isPresent(proxy, 'fast-open')
|
||||||
|
) {
|
||||||
|
proxy['fast-open'] = proxy.tfo;
|
||||||
|
}
|
||||||
} else if (proxy.type === 'wireguard') {
|
} else if (proxy.type === 'wireguard') {
|
||||||
proxy.keepalive =
|
proxy.keepalive =
|
||||||
proxy.keepalive ?? proxy['persistent-keepalive'];
|
proxy.keepalive ?? proxy['persistent-keepalive'];
|
||||||
|
@ -244,11 +244,14 @@ export default function URI_Producer() {
|
|||||||
`sni=${encodeURIComponent(proxy.sni)}`,
|
`sni=${encodeURIComponent(proxy.sni)}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (proxy.fingerprint) {
|
if (proxy['tls-fingerprint']) {
|
||||||
hysteria2params.push(
|
hysteria2params.push(
|
||||||
`pinSHA256=${encodeURIComponent(proxy.fingerprint)}`,
|
`pinSHA256=${encodeURIComponent(proxy['tls-fingerprint'])}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (proxy.tfo) {
|
||||||
|
hysteria2params.push(`fastopen=1`);
|
||||||
|
}
|
||||||
result = `hysteria2://${proxy.password}@${proxy.server}:${
|
result = `hysteria2://${proxy.password}@${proxy.server}:${
|
||||||
proxy.port
|
proxy.port
|
||||||
}?${hysteria2params.join('&')}#${encodeURIComponent(
|
}?${hysteria2params.join('&')}#${encodeURIComponent(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user