mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-08 21:59:09 -05:00
[GH-ISSUE #1034] Access to websocket server not possible. #10491
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @EmbeddedAndMore on GitHub (Jul 8, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/1034
i am trying to access a webserver on mylocal setup through Pangolin proxy, the HTTP part loads without problem but then i get the following error:
If the URL for the server is:
https://foo.proxy.domain.com, the URL that i not loading iswss://foo.proxy.domain.com.How can i fix it?
Also, i am using v1.6.2 of Pangolin
Sincerely
@oschwartz10612 commented on GitHub (Jul 8, 2025):
Hum this is strange. I am not 100% sure how to trouble shoot here. If HTTPS is working fine with no complaints from the browser about a self signed cert then the websocket should work as well. Do you see any logs in your target application that indicate if the websocket is making it to the server or not? I would like to get an idea if it is getting terminated by pangolin or by the target web server.
Only other thing I could think of is that the websocket is not getting sent with the cookies necessary for passing the pangolin auth. Could you check by disabling the auth on the resource and see if the websocket connects? If so it is getting blocked.
@eeveezayas commented on GitHub (Jul 8, 2025):
not to hijack @EmbeddedAndMore 's issue but I have a similar one where using openwebui with pangolin auth it has a websockets issue resulting in
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data, which doesn't occur if I disable auth in pangolin.@EmbeddedAndMore commented on GitHub (Jul 9, 2025):
@oschwartz10612 I am trying to troubleshoot and give you more info, and I found something even weirder. When I run the Newt on the target machine, after the first try from the tunneled connection, I get the same error even when I want to access the web server locally.
So when the Newt is running, i get the error both locally and through tunnel. As soon as i terminate Newt, everything seems normal again.
Unfortunately, the WebServer is a third-party software which i don't have the knowledge or capability to dig into for troubleshooting.
Also disabling the Auth didn't help.
@oschwartz10612 commented on GitHub (Jul 9, 2025):
Okay. For @eeveezayas, I think that sounds like an "auth issue." Meaning the client application does not use the cookies provided when connecting to the websocket and, therefore, gets rejected by Badger when it gets to the proxy. I have seen this before, and unfortunately, it is kind of an issue with the client application—we can't do anything to auth traffic if it does not respect standards and pass some sort of identifier, I think—but please, anyone, correct me. Your best option might be to either disable auth on this resource or look into the dev tools in your browser and see what the WSS path is (like /ws or something) and whitelist that path in your auth. It is not 100% secure but might get you close to what you need.
For @EmbeddedAndMore, this is stranger. It sounds like maybe not something with the auth but with the client application. I do empathize with trying to use some provided vendor software and having no visibility! If you can get any logs, it could be helpful to troubleshoot. I would also try to stop Newt, turn off auth in Pangolin, and try to connect again and see if it works. Off the top of my head, it might not like the connection from Newt and "dies" as soon as it gets the error in the first place? Maybe you could look into the documentation to see if there is any need to add a trust proxy field to trust the Newt connection or the Traefik connection? Or maybe you can reach out to the support of the target application and ask them if there is any config needed when running behind an authenticated reverse proxy?
@EmbeddedAndMore commented on GitHub (Jul 10, 2025):
@oschwartz10612 Today i tested the CF tunnel and it worked without problem.
i am 100% sure that the WebSocket client is not the newest and best.
I'll try to check the other things you mentioned.
@github-actions[bot] commented on GitHub (Jul 25, 2025):
This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
@JulScsl commented on GitHub (Jul 26, 2025):
I also experience similar issues. @EmbeddedAndMore can you elaborate your thoughts on the websocket client and how you came to this conclusion?
@github-actions[bot] commented on GitHub (Aug 11, 2025):
This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
@Momi-V commented on GitHub (Aug 15, 2025):
I have a similar issue with Cockpit. This can easily be reproduced by just trying to forward https://cockpit.domain to https://localhost:9090 on any linux server with cockpit and newt installed and running.
This is even the case without ANY auth enabled.
It looks like wss://domain just isn't accepted at all (it's either http:// or https://) and therefore the connection just fails.
@oschwartz10612 commented on GitHub (Aug 16, 2025):
@HPPinata do you see anything in the console logs / network tab that
could help?
In the network tab is it sending the cookie in the wss request? If not
that is why auth is blocking it.
What you could do as a tmp fix is to add a rule to bypass auth on the
websocket. I am aware though that is not secure - but if the client
application does not send the cookie we are a but SOL...
@Momi-V commented on GitHub (Aug 16, 2025):
@oschwartz10612 there isn't any auth enabled in pangolin.
It's just an exposed test server. The only auth is the native one in Cockpit (and it works locally). I'll send some network tab logs over soon, but the only error I see is: wss://cockpit.domain connection refused.
The site loads over http(s), I input the server password and then the web socket fails to connect and I get served an error page.
As far as I can tell, there's nothing pangolin side I could configure, because pangolin shouldn't block any connections.
It's just used for it's forwarding and https, not it's auth capabilities.
@oschwartz10612 commented on GitHub (Aug 16, 2025):
Oh very interesting then. Yeah everything should just pass through
Traefik at that point! If you watch in the network tab of your browser
and look for the websocket do you get an error code in the response? 502
or 404, 403, etc...?
@Momi-V commented on GitHub (Aug 16, 2025):
I just found out what was wrong on my end... Layer 8 (kind of).
The corporate firewall I was behind when originally diagnosing this yesterday apparently really doesn't like web sockets.
From a privately controlled network and client Cockpit works both with and without auth.
For documentations sake: The browser console just spits out NS_ERROR_NET_RESET since it's blocked before ever reaching Pangolin.
@github-actions[bot] commented on GitHub (Aug 31, 2025):
This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
@krod1408 commented on GitHub (Sep 6, 2025):
For me pangolin has been running fine and now I can not reach any of the resource sites
@krod1408 commented on GitHub (Sep 6, 2025):
I just did not feel like dealing with it I believe the error was newt connection refused...Docker socket availability for Newt r2wp08w2ry4rs1f: available=false, socketPath=
2025-09-06T01:36:37.410Z [warn]: Newt r2wp08w2ry4rs1f does not have Docker socket access. but like i said it has been running fine till now.
@oschwartz10612 commented on GitHub (Sep 6, 2025):
@krod1408 is the issue that newt cant connect to Pangolin or that the
docker socket does not work? If you updated newt please make sure to use
the latest version - there was a patch allowing tcp and unix access to
the docker socket that introduced a bug that could be causing this. I
fixed it in the latest release.
@github-actions[bot] commented on GitHub (Sep 21, 2025):
This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
@github-actions[bot] commented on GitHub (Oct 5, 2025):
This issue has been automatically closed due to inactivity. If you believe this is still relevant, please open a new issue with up-to-date information.
@okfro commented on GitHub (Dec 7, 2025):
I receive the same error when using a resource with a target configuration using newt. I have a wireguard tunnel between my instances, so I can use different targets for the same resource to test.
fwiw, the service I am using is Komodo--I am testing the latest 2.0-swarm branch which uses websockets in the latest periphery agent.
@nefariouslegion commented on GitHub (Dec 19, 2025):
Hi,
I'm running into a websocket issue while trying to get ownCloud setup and with Collabora. Wondering if you ever figured out a solution because I am also using Komodo
@okfro commented on GitHub (Dec 19, 2025):
For the time being, I am just avoiding Newt altogether--it's orders of magnitude slower than my wireguard mesh connection. I started adding Newt sites because manually expanding wireguard mesh configs is tedious and I thought Newt would be an easy workaround.
@kylepyke commented on GitHub (Dec 29, 2025):
Hilariously, I'm having this exact same issue, with this exact same setup minus Komodo. Did you find anything?
@pblue3 commented on GitHub (Jan 10, 2026):
I have the same problem with ttyd: the websocket is constantly closed after a few seconds.
@kylepyke commented on GitHub (Jan 14, 2026):
FYI, I figured this out from this post here:
https://github.com/fosrl/pangolin/issues/2176#issuecomment-3695380702
You have to add:
Under
entryPoints: websecure: http:portion of your traefik config.@okfro commented on GitHub (Jan 18, 2026):
I will test this afternoon and report back its effect on my setup. I have been working with Gerbil disabled since the issue first appeared for me, so I will have to shuffle some pieces around (i.e. could take a Mississippi minute to properly test).
@kylepyke commented on GitHub (Jan 19, 2026):
No worries. It's been working for me 😀