Skip to content

Commit 93ae942

Browse files
committed
feat: 脚本操作中可使用内部 DOMAIN_RESOLVERS
1 parent 94ac8bb commit 93ae942

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sub-store",
3-
"version": "2.22.17",
3+
"version": "2.22.18",
44
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
55
"main": "src/main.js",
66
"scripts": {

backend/src/core/proxy-utils/processors/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,7 @@ function createDynamicFunction(name, script, $arguments, $options) {
11711171
'Buffer',
11721172
'b64d',
11731173
'b64e',
1174+
'DOMAIN_RESOLVERS',
11741175
'scriptResourceCache',
11751176
'flowUtils',
11761177
'produceArtifact',
@@ -1192,6 +1193,7 @@ function createDynamicFunction(name, script, $arguments, $options) {
11921193
ProxyUtils.Buffer,
11931194
ProxyUtils.Base64.decode,
11941195
ProxyUtils.Base64.encode,
1196+
DOMAIN_RESOLVERS,
11951197
scriptResourceCache,
11961198
flowUtils,
11971199
produceArtifact,
@@ -1208,6 +1210,7 @@ function createDynamicFunction(name, script, $arguments, $options) {
12081210
'Buffer',
12091211
'b64d',
12101212
'b64e',
1213+
'DOMAIN_RESOLVERS',
12111214
'scriptResourceCache',
12121215
'flowUtils',
12131216
'produceArtifact',
@@ -1223,6 +1226,7 @@ function createDynamicFunction(name, script, $arguments, $options) {
12231226
ProxyUtils.Buffer,
12241227
ProxyUtils.Base64.decode,
12251228
ProxyUtils.Base64.encode,
1229+
DOMAIN_RESOLVERS,
12261230
scriptResourceCache,
12271231
flowUtils,
12281232
produceArtifact,

scripts/demo.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ function operator(proxies = [], targetPlatform, context) {
127127
// $.info(statusCode)
128128
// $.info(body)
129129
// const obj = JSON.parse(body)
130+
130131
// scriptResourceCache 缓存
131132
// 可参考 https://t.me/zhetengsha/1003
132133
// const cache = scriptResourceCache
@@ -172,6 +173,8 @@ function operator(proxies = [], targetPlatform, context) {
172173
// scriptResourceCache._cleanup(undefined, 1 * 3600 * 1000);
173174
// }
174175

176+
// DOMAIN_RESOLVERS 为内置域名解析, 详见 backend/src/core/proxy-utils/processors/index.js
177+
175178
// ProxyUtils 为节点处理工具
176179
// 可参考 https://t.me/zhetengsha/1066
177180
// const ProxyUtils = {

0 commit comments

Comments
 (0)