mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
feat: 输入增加 Hysteria2 URI 支持; Surge Hysteria2 输出增加 fingerprint
This commit is contained in:
@@ -367,6 +367,9 @@ function wireguard(proxy) {
|
||||
}
|
||||
|
||||
function hysteria2(proxy) {
|
||||
if (proxy.obfs || proxy['obfs-password']) {
|
||||
throw new Error(`obfs is unsupported`);
|
||||
}
|
||||
const result = new Result(proxy);
|
||||
result.append(`${proxy.name}=hysteria2,${proxy.server},${proxy.port}`);
|
||||
|
||||
@@ -388,6 +391,10 @@ function hysteria2(proxy) {
|
||||
`,skip-cert-verify=${proxy['skip-cert-verify']}`,
|
||||
'skip-cert-verify',
|
||||
);
|
||||
result.appendIfPresent(
|
||||
`,server-cert-fingerprint-sha256=${proxy.fingerprint}`,
|
||||
'fingerprint',
|
||||
);
|
||||
|
||||
// tfo
|
||||
result.appendIfPresent(`,tfo=${proxy['fast-open']}`, 'fast-open');
|
||||
|
||||
Reference in New Issue
Block a user