Add a range option to server to specify specific port client attribution

This commit is contained in:
Olivier MICHAUD
2021-05-17 21:35:38 +02:00
parent 3ebcab8830
commit 3c06736520
3 changed files with 20 additions and 4 deletions
+5
View File
@@ -31,6 +31,10 @@ const argv = optimist
default: 10,
describe: 'maximum number of tcp sockets each client is allowed to establish at one time (the tunnels)'
})
.options('range', {
default: null,
describe: 'will bind incoming connections only on ports in range xxx:xxxx'
})
.argv;
if (argv.help) {
@@ -42,6 +46,7 @@ const server = CreateServer({
max_tcp_sockets: argv['max-sockets'],
secure: argv.secure,
domain: argv.domain,
range: argv.range,
});
server.listen(argv.port, argv.address, () => {