MDSLab / wstun

Tunnels and reverse tunnels over WebSocket
Apache License 2.0
114 stars 44 forks source link

Reverse Client+Server Pair - Server Crashing #10

Closed t3chguy closed 6 years ago

t3chguy commented 8 years ago

Client is giving the Server access to a HTTP Proxy so that the Server can Send HTTP(s) Requests using the Client's IP Address. After a while of running this is the output, ignore the fact that my IP is in there, it has cycled since these logs.

root@ChromiumVNC-Base:~/ClientTunnel/node_modules/node-reverse-wstunnel/bin# ./wstt.js -r -s 12345
Thu Jun 02 2016 19:58:49 GMT+0000 (UTC) Server is listening on port 12345
Created TCP server on port 12121
WS Connectio for Control Created
Request for Data WS Socket
Request for Data WS Socket
Thu Jun 02 2016 20:01:41 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:01:41 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:01:41 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:01:41 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
(node:2893) Warning: Possible EventEmitter memory leak detected. 11 created listeners added. Use emitter.setMaxListeners() to increase limit
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Request for Data WS Socket
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:02 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)tcp Error Error: read ECONNRESET
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)tcp Error Error: read ECONNRESET
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)tcp Error Error: read ECONNRESET
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)tcp Error Error: read ECONNRESET
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)tcp Error Error: read ECONNRESET
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)tcp Error Error: read ECONNRESET
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)TCP connection Close
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Thu Jun 02 2016 20:03:32 GMT+0000 (UTC)WebSocket Peer ::ffff:79.66.225.8 disconnected for:"Normal connection closure"
Request for Data WS Socket
/root/ClientTunnel/node_modules/websocket/lib/WebSocketRequest.js:509
        throw new Error('WebSocketRequest may only be accepted or rejected one time.');
        ^

Error: WebSocketRequest may only be accepted or rejected one time.
    at WebSocketRequest._verifyResolution (/root/ClientTunnel/node_modules/websocket/lib/WebSocketRequest.js:509:15)
    at WebSocketRequest.accept (/root/ClientTunnel/node_modules/websocket/lib/WebSocketRequest.js:250:10)
    at EventEmitter.<anonymous> (/root/ClientTunnel/node_modules/node-reverse-wstunnel/lib/wst_server_reverse.js:111:46)
    at emitOne (events.js:101:20)
    at EventEmitter.emit (events.js:188:7)
    at WebSocketServer.<anonymous> (/root/ClientTunnel/node_modules/node-reverse-wstunnel/lib/wst_server_reverse.js:84:23)
    at emitOne (events.js:96:13)
    at WebSocketServer.emit (events.js:188:7)
    at WebSocketServer.handleUpgrade (/root/ClientTunnel/node_modules/websocket/lib/WebSocketServer.js:213:14)
    at emitThree (events.js:116:13)

Any insight is appreciated. Thanks

tleegaard commented 7 years ago

I seem to have the same problem:

sudo /usr/local/lib/node_modules/node-reverse-wstunnel/bin/wstt.js -r -s 8885 > wstt_status.txt
(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at EventEmitter.addListener (events.js:160:15)
    at Server.<anonymous> (/usr/local/lib/node_modules/node-reverse-wstunnel/lib/wst_server_reverse.js:100:25)
    at Server.EventEmitter.emit (events.js:95:17)
    at TCP.onconnection (net.js:1188:8)

/usr/local/lib/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRequest.js:509
        throw new Error('WebSocketRequest may only be accepted or rejected one
              ^
Error: WebSocketRequest may only be accepted or rejected one time.
    at WebSocketRequest._verifyResolution (/usr/local/lib/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRequest.js:509:15)
    at WebSocketRequest.accept (/usr/local/lib/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketRequest.js:250:10)
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/node-reverse-wstunnel/lib/wst_server_reverse.js:111:46)
    at EventEmitter.emit (events.js:117:20)
    at WebSocketServer.<anonymous> (/usr/local/lib/node_modules/node-reverse-wstunnel/lib/wst_server_reverse.js:84:23)
    at WebSocketServer.EventEmitter.emit (events.js:95:17)
    at WebSocketServer.handleUpgrade (/usr/local/lib/node_modules/node-reverse-wstunnel/node_modules/websocket/lib/WebSocketServer.js:213:14)
    at Server.EventEmitter.emit (events.js:106:17)
    at Socket.socket.ondata (http.js:1986:14)
    at TCP.onread (net.js:525:27)
lucaslopez commented 7 years ago

Exactly the same issue here. I tried to change ports just in case I messed it up, but could not manage make it work. Did you guys find any solution?

npeditto commented 6 years ago

Bug solved tagging new incoming connections with uuid codes: solved in this commit