Updated tls-fingerprint.js using the new targetPlatform parameter

This commit is contained in:
Peng-YM 2022-04-17 23:33:44 +08:00
parent f7547bf719
commit 3ce237d722

View File

@ -1,9 +1,9 @@
function operator(proxies) {
function operator(proxies, targetPlatform) {
const fingerprint = "你的指纹";
proxies.forEach(proxy => {
if ($.env.isSurge) {
if (targetPlatform === "Surge") {
proxy.tfo = `${proxy.tfo || false}, server-cert-fingerprint-sha256=${fingerprint}`;
} else if ($.env.isQX) {
} else if (targetPlatform === "QX") {
proxy.tfo = `${proxy.tfo || false}, tls-cert-sha256=${fingerprint}`;
}
});