Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket doesn't work #3

Open
VivianoRiccardo opened this issue Apr 1, 2021 · 0 comments
Open

Websocket doesn't work #3

VivianoRiccardo opened this issue Apr 1, 2021 · 0 comments

Comments

@VivianoRiccardo
Copy link

VivianoRiccardo commented Apr 1, 2021

i compiled everything then i tried the code on localhost.

What i did:

I opened a websocket server on 127.0.0.1:8082

run the go server as follows:

./server -p "8083" -x "127.0.0.1:8084"

So, as far as i understood it listens for go clients it tunnels to on 127.0.0.1:8084 and accepts websockets connections on 8083

Then i run a client as follows:

./client -p 8082 -r "127.0.0.1:8084" -sc

It should alert the server (127.0.0.1:8084) that it must tunnels to this client, and the client redirects everything on the websocket server on 127.0.0.1:8082

I Have run a piece of code from the browser that opens a websocket on 127.0.0.1:8083 and this is the error it appears on the go server shell:
2021-04-01 17:34:12.560030599 +0200 CEST - Request: %!(EXTRA string=127.0.0.1:8083 <-> 127.0.0.1:34044) 2021-04-01 17:34:12.560093315 +0200 CEST - H: bytes%!(EXTRA int=537) 2021-04-01 17:34:12.560152436 +0200 CEST - Request: host: localtunnel.net 127.0.0.1:8083 2021-04-01 17:34:12.560192542 +0200 CEST - Router: id for host%!(EXTRA string=, string=127.0.0.1:8083) 2021-04-01 17:34:12.560203094 +0200 CEST - Router: for id: %!(EXTRA string=, string=Router: map[g:0xc82007fd40]) 2021-04-01 17:34:12.560206414 +0200 CEST - Request: coundn't find proxy for%!(EXTRA string=127.0.0.1:8083)

It does not proxy anything to the go client :/

OS: Ubuntu 16.04 lts

From the Chrome developer console this appears:
WebSocket connection to 'ws:https://127.0.0.1:8083/' failed: Error during WebSocket handshake: net::ERR_INVALID_HTTP_RESPONSE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant