Sub-Store/scripts/tls-fingerprint.js
2022-05-25 10:33:54 +08:00

14 lines
462 B
JavaScript

/**
* 为节点添加 tls 证书指纹
*/
function operator(proxies, targetPlatform) {
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}`;
}
});
return proxies;
}