xtunnel 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +4 -7
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
|
1
3
|
const program = require('commander')
|
2
4
|
const axios = require('axios')
|
3
5
|
const config = require('config')
|
@@ -9,15 +11,10 @@ let rayProcess = null
|
|
9
11
|
|
10
12
|
process.on('SIGINT', () => stop())
|
11
13
|
|
12
|
-
program
|
13
|
-
|
14
|
-
.description('Tunnel CLI')
|
15
|
-
program
|
16
|
-
.command('* <url>')
|
17
|
-
.action(url => url && init(url))
|
14
|
+
program.version('1.0.0').description('Tunnel CLI')
|
15
|
+
program.command('* <url>').action(url => url && init(url))
|
18
16
|
program.parse(process.argv)
|
19
17
|
|
20
|
-
|
21
18
|
async function init(url) {
|
22
19
|
try {
|
23
20
|
let res = await axios.get(url)
|