Accessing repetier-server through ngrok
Hi,
I'm trying to connect to a local (of course) repetier-server through a tcp tunnel. In using a standard remote ssh tunnel I get connection to server. Instead, when I try to use ngrok tcp tunnel it doesn't work fine. I've already tested using ngrok tcp tunnel to even encapsulate ssh traffic so it doesn't seem a problem of ngrok mangling the stream.
Let me explain:
I am able to connect to 127.0.0.1:3344 through both tunnels. When connected by ngrok tcp tunnel, I get web main page, images and so but a banner pops up with message "Connection lost" _continiuosly_.
When connected by ssh tunnel, the very first attempt to open websocket connection pops up the same banner _but_ it is displayed once. Less a second later connection seems to be recovered and all is working.
I analyzed traffic and found out error happens as requesting the websocket.
Here, headers from request through a regular ssh tunnel:
GET /socket/?lang=en&sess=!%23A%5EehC9QOAiiv%25l!UD%23!goHFwvBeGgo HTTP/1.1
Host: mytesthost.com:11000
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
Origin: http://mytesthost.com:11000
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: es-ES,es;q=0.8,en;q=0.6
Cookie: _ga=GA1.2.155945040.1462660236
Sec-WebSocket-Key: qWL9Lc7wi+lCrNm5mIeIkA==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
An here, from a ngrok tunnel.
GET /socket/?lang=en HTTP/1.1
Host: 0.tcp.ngrok.io:13459
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
Origin: http://0.tcp.ngrok.io:13459
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: es-ES,es;q=0.8,en;q=0.6
Sec-WebSocket-Key: Xxg6EQg1QLlhma1WiA6lOw==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
As you can see, the main difference is the missing param "sess=" at ngrok request. I guess request for websocker is built by JS code at 127.0.0.1:3344.
Is there some known issue at this? Why does a standard tcp tunnel work but the same tcp tunnul by ngrok fail? Maybe some with response delay?
I'd thank any help or cue you could offer me.
Best regards.
Comments