mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
Reworked Surge producer
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
/**
|
||||
* 为节点添加 tls 证书指纹
|
||||
* 示例
|
||||
* #fingerprint=...
|
||||
*/
|
||||
function operator(proxies, targetPlatform) {
|
||||
const {fingerprint} = $arguments;
|
||||
function operator(proxies) {
|
||||
const { fingerprint } = $arguments;
|
||||
proxies.forEach(proxy => {
|
||||
if (targetPlatform === "Surge") {
|
||||
proxy.tfo = `${proxy.tfo || false}, server-cert-fingerprint-sha256=${fingerprint}`;
|
||||
} else if (targetPlatform === "QX") {
|
||||
proxy.tfo = `${proxy.tfo || false}, tls-cert-sha256=${fingerprint}`;
|
||||
}
|
||||
proxy['tls-fingerprint'] = fingerprint;
|
||||
});
|
||||
return proxies;
|
||||
}
|
||||
Reference in New Issue
Block a user