feat: 订阅和文件的请求链接支持传入 $options , 可在脚本中使用

This commit is contained in:
xream
2024-09-03 13:58:10 +08:00
parent e1489a3cf7
commit 99d5868cff
7 changed files with 103 additions and 12 deletions

View File

@@ -77,7 +77,13 @@ function parse(raw) {
return proxies;
}
async function processFn(proxies, operators = [], targetPlatform, source) {
async function processFn(
proxies,
operators = [],
targetPlatform,
source,
$options,
) {
for (const item of operators) {
// process script
let script;
@@ -176,6 +182,7 @@ async function processFn(proxies, operators = [], targetPlatform, source) {
targetPlatform,
$arguments,
source,
$options,
);
} else {
processor = PROXY_PROCESSORS[item.type](item.args || {});