Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
209e5644c0 | |||
128c9f9751 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartproxy",
|
"name": "@pushrocks/smartproxy",
|
||||||
"version": "1.0.22",
|
"version": "1.0.23",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartproxy",
|
"name": "@pushrocks/smartproxy",
|
||||||
"version": "1.0.22",
|
"version": "1.0.23",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "a proxy for handling high workloads of proxying",
|
"description": "a proxy for handling high workloads of proxying",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -38,11 +38,14 @@ export class ProxyWorker {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const Websocket = await import('ws');
|
||||||
|
|
||||||
// Enable websockets
|
// Enable websockets
|
||||||
const wss = new plugins.ws.Server({ server: this.httpsServer });
|
const wss = new plugins.ws.Server({ server: this.httpsServer });
|
||||||
wss.on('connection', function connection(ws) {
|
wss.on('connection', function connection(ws) {
|
||||||
const wscConnected = plugins.smartpromise.defer();
|
const wscConnected = plugins.smartpromise.defer();
|
||||||
const wsc = new plugins.ws(`${ws.url}`);
|
|
||||||
|
const wsc = new Websocket.default(`${ws.url}`);
|
||||||
wsc.on('open', () => {
|
wsc.on('open', () => {
|
||||||
wscConnected.resolve();
|
wscConnected.resolve();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user