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

Invalid response from forwarded server #8

Open
codeinabox opened this issue Oct 9, 2023 · 4 comments
Open

Invalid response from forwarded server #8

codeinabox opened this issue Oct 9, 2023 · 4 comments

Comments

@codeinabox
Copy link

I was trying this out by spinning up a local server using python3 -m http.server 8004, and then running docker run -it --rm --network=host -v tunwg_keys:/data ghcr.io/ntnj/tunwg tunwg --forward=http://localhost:8004.

When I try visiting the URL returned by tunwg, I get the error Invalid response from forwarded server. Looking at the Python logs there was no HTTP request, and the tunwg logs say:

2023/10/09 11:25:19 http: proxy error: dial tcp [::1]:8004: connect: connection refused

@SerJaimeLannister
Copy link

Same.

@ntnj
Copy link
Owner

ntnj commented Feb 20, 2025

Is a server running on your localhost?
The error message is indicating trouble with connecting to the local server.

Maybe try forwarding to --forward=http://host.docker.internal:8004 and not using --network=host.

@SerJaimeLannister
Copy link

Is a server running on your localhost? The error message is indicating trouble with connecting to the local server.

Maybe try forwarding to --forward=http://host.docker.internal:8004 and not using --network=host.

I was running it on the server that you provided actually.

@ntnj
Copy link
Owner

ntnj commented Feb 25, 2025

If you're getting the error: Invalid response from forwarded server, it means that request was successfully forwarded from tunwg server to tunwg client, but instead the issue is with the local server you're trying to forward to, for e.g. which was started with python3 -m http.server 8004

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

3 participants