xtunnel 1.0.4 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- package/config/default.json +2 -2
- package/index.js +4 -1
- package/package.json +2 -3
package/config/default.json
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
"setting": {
|
3
3
|
"localHttpPort": "1087",
|
4
4
|
"localSockPort": "1080",
|
5
|
-
"subscribeLink": "
|
6
|
-
"selectedServer": "
|
5
|
+
"subscribeLink": "",
|
6
|
+
"selectedServer": "",
|
7
7
|
"selectedMode": "PAC"
|
8
8
|
},
|
9
9
|
"routingPac": {
|
package/index.js
CHANGED
@@ -2,11 +2,13 @@
|
|
2
2
|
|
3
3
|
const program = require('commander')
|
4
4
|
const axios = require('axios')
|
5
|
-
const config = require('config')
|
6
5
|
const path = require('path')
|
7
6
|
const fs = require('fs')
|
8
7
|
const child_process = require('child_process')
|
9
8
|
|
9
|
+
console.log(path.join(__dirname, './config/default.json'))
|
10
|
+
const config = JSON.parse(fs.readFileSync(path.join(__dirname, './config/default.json')))
|
11
|
+
|
10
12
|
let rayProcess = null
|
11
13
|
|
12
14
|
process.on('SIGINT', () => stop())
|
@@ -39,6 +41,7 @@ function switchServer(server) {
|
|
39
41
|
config.tpl.outbounds[0].settings.vnext[0].address = server.add
|
40
42
|
config.tpl.outbounds[0].settings.vnext[0].port = server.port
|
41
43
|
config.tpl.outbounds[0].settings.vnext[0].users[0].id = server.id
|
44
|
+
console.log(path.join(__dirname, './core/config.json'))
|
42
45
|
fs.writeFile(path.join(__dirname, './core/config.json'), JSON.stringify(config.tpl), err => !err && start())
|
43
46
|
}
|
44
47
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "xtunnel",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.6",
|
4
4
|
"description": "xtunnel",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {},
|
@@ -11,7 +11,6 @@
|
|
11
11
|
"license": "ISC",
|
12
12
|
"dependencies": {
|
13
13
|
"axios": "^0.24.0",
|
14
|
-
"commander": "^8.3.0"
|
15
|
-
"config": "^3.3.6"
|
14
|
+
"commander": "^8.3.0"
|
16
15
|
}
|
17
16
|
}
|