fix(core): update

This commit is contained in:
2020-02-07 13:04:11 +00:00
parent 0eabdcde28
commit 1c3619040c
9 changed files with 586 additions and 346 deletions

View File

@ -228,7 +228,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
});
this.httpsServer.listen(this.port);
console.log(`OK: now listening for new connections on port ${this.port}`);
console.log(`ProxyWorker -> OK: now listening for new connections on port ${this.port}`);
}
public async updateProxyConfigs(proxyConfigsArg: plugins.tsclass.IReverseProxyConfig[]) {

View File

@ -6,15 +6,16 @@ let netServer: plugins.net.Server;
const portProxyCalls = {
start: async (portArg = 8000) => {
netServer = net
.createServer(from => {
const to = net.createConnection({
host: 'localhost',
port: 8001
});
from.pipe(to);
to.pipe(from);
})
.listen(portArg);
.createServer(from => {
const to = net.createConnection({
host: 'localhost',
port: 8001
});
from.pipe(to);
to.pipe(from);
})
.listen(portArg);
console.log(`PortProxy -> OK: Now listening on port ${portArg}`);
},
stop: async () => {
const done = plugins.smartpromise.defer();