[Feat] Download PLS from API

This commit is contained in:
Minoricew
2025-06-09 18:02:11 +08:00
parent 8ab55bc93c
commit ed29f1b86f
13 changed files with 662 additions and 55 deletions

View File

@@ -28,18 +28,7 @@ const updatePlsRulesFromLocal = async () => {
return plsRules;
};
/**
*
* @returns {string}
*/
const genRandomHex = () => {
let result = "";
for (let i = 0; i < 8; i++) {
const randomNum = Math.floor(Math.random() * 0x10000);
result += randomNum.toString(16).padStart(4, "0");
}
return result;
};
const { genRandomHex } = require("../../utils/crypto");
/**
*