xtunnel 1.5.4 → 1.5.7
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +2 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -26,7 +26,7 @@ async function run(url) {
|
|
26
26
|
let data = JSON.parse(res.data)
|
27
27
|
let remoteConfig = data.config
|
28
28
|
subItems = Buffer.from(data.sub, 'base64').toString().split("vmess://").map(o => Buffer.from(o, 'base64').toString()).filter(o => o)
|
29
|
-
let server = subItems.map(o => JSON.parse(o)).filter(o => o.
|
29
|
+
let server = subItems.map(o => JSON.parse(o)).filter(o => o.class)[0]
|
30
30
|
remoteConfig.tpl.inbounds[1].port = config.setting.localHttpPort
|
31
31
|
remoteConfig.tpl.outbounds[0].settings.vnext[0].address = server.add
|
32
32
|
remoteConfig.tpl.outbounds[0].settings.vnext[0].port = server.port
|
@@ -37,6 +37,7 @@ async function run(url) {
|
|
37
37
|
if (server.aid > 0) {
|
38
38
|
delete remoteConfig.tpl.outbounds[0].settings.vnext[0].users[0].security
|
39
39
|
}
|
40
|
+
remoteConfig.routing = { domainStrategy: 'AsIs', rules: [] }
|
40
41
|
fs.writeFile(path.join(__dirname, './core/config.json'), JSON.stringify(remoteConfig.tpl), err => !err && start())
|
41
42
|
}
|
42
43
|
} catch (error) {
|