green-tunnel
Advanced tools
Comparing version 1.6.7 to 1.6.8
@@ -23,3 +23,3 @@ #!/usr/bin/env node | ||
describe: 'ip address to bind proxy server', | ||
default: '127.0.0.1' | ||
default: '127.0.0.1', | ||
}) | ||
@@ -30,3 +30,3 @@ | ||
describe: 'port address to bind proxy server', | ||
default: config.port | ||
default: config.port, | ||
}) | ||
@@ -37,3 +37,3 @@ | ||
choices: ['https', 'tls'], | ||
default: config.dns.type | ||
default: config.dns.type, | ||
}) | ||
@@ -43,3 +43,3 @@ | ||
type: 'string', | ||
default: config.dns.server | ||
default: config.dns.server, | ||
}) | ||
@@ -51,3 +51,3 @@ | ||
describe: 'run in silent mode', | ||
default: false | ||
default: false, | ||
}) | ||
@@ -59,8 +59,14 @@ | ||
describe: 'debug mode', | ||
default: '' | ||
default: '', | ||
}) | ||
.option('system-proxy', { | ||
type: 'boolean', | ||
describe: 'automatic set system-proxy', | ||
default: true, | ||
}) | ||
.example('$0') | ||
.example('$0 --ip 127.0.0.1 --port 8000') | ||
.example('$0 --dnsServer https://doh.securedns.eu/dns-query') | ||
.example('$0 --dns-server https://doh.securedns.eu/dns-query') | ||
.epilog('ISSUES: https://github.com/SadeghHayeri/GreenTunnel/issues\n' + | ||
@@ -100,12 +106,12 @@ 'DONATE: https://github.com/SadeghHayeri/GreenTunnel#donation'); | ||
async function main() { | ||
if (argv.verbose) { | ||
debug.enable(argv.verbose); | ||
if (argv['verbose']) { | ||
debug.enable(argv['verbose']); | ||
} | ||
const proxy = new Proxy({ | ||
ip: argv.ip, | ||
port: parseInt(argv.port, 10), | ||
ip: argv['ip'], | ||
port: parseInt(argv['port'], 10), | ||
dns: { | ||
type: argv.dnsType, | ||
server: argv.dnsServer | ||
type: argv['dns-type'], | ||
server: argv['dns-server'] | ||
} | ||
@@ -119,3 +125,3 @@ }); | ||
if (!argv.silent) { | ||
if (!argv['silent']) { | ||
clear(); | ||
@@ -135,5 +141,5 @@ } | ||
await proxy.start({setProxy: true}); | ||
await proxy.start({setProxy: argv['system-proxy']}); | ||
if (!argv.silent && !argv.verbose) { | ||
if (!argv['silent'] && !argv['verbose']) { | ||
clear(); | ||
@@ -140,0 +146,0 @@ printBanner(); |
{ | ||
"name": "green-tunnel", | ||
"version": "1.6.7", | ||
"version": "1.6.8", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
29541
705