-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Secure WebSockets #467
Comments
1- Traefik does support wss as it supports https. Consider using the same frontend/entrypoint configuration for http/ws and https/wss. 2- [entryPoints]
[entryPoints.foobar]
address = ":80" The name is "foobar". In your case, just create an entrypoint like the following: [entryPoints]
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[[entryPoints.https.tls.certificates]]
CertFile = "integration/fixtures/https/snitest.com.cert"
KeyFile = "integration/fixtures/https/snitest.com.key"
[[entryPoints.https.tls.certificates]]
CertFile = "integration/fixtures/https/snitest.org.cert"
KeyFile = "integration/fixtures/https/snitest.org.key" Then attach this entrypoint to the frontend with 3- And finally: yes, you can set TIPS- To test a simple end-to-end websocket client/server, use the following configuration: [entryPoints]
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[[entryPoints.https.tls.certificates]]
CertFile = "integration/fixtures/https/snitest.com.cert"
KeyFile = "integration/fixtures/https/snitest.com.key"
[[entryPoints.https.tls.certificates]]
CertFile = "integration/fixtures/https/snitest.org.cert"
KeyFile = "integration/fixtures/https/snitest.org.key"
[file]
[backends]
[backends.backend1]
[backends.backend1.servers.server1]
url = "wss://echo.websocket.org"
[frontends]
[frontends.frontend1]
backend = "backend1"
rule = "Path:/" Then run |
To followup on existing discussion, how would one configure WSS with Kubernetes Ingress[1]? I assume with an annotation akin to [1] Currently Ingress supports only HTTP rules. |
@samber Thank you for replying with very useful information! I have tested the setup and i can see the wss showing up in the traefik status page. I am still having a problem getting websockets to work, but it might be something on the container side at this point. Knowing what is needed is in place, cuts down the troubleshooting time! |
Hi guys.. I tried using wss but the logs of traefik say:
Did anyone have success with wss? |
@ascora I just tested successfully wss:
Closing this issue for now. |
@emilevauge Thanks a lot but maybe you can share the rules.toml that you've used for it? BEcause as soon as I use a backend URL that starts with wss://..., I get the message that wss is not a supported protocol scheme... |
@ascora sorry, I misread your issue... Could you try using https instead of wss ? |
Yes, that works fine. |
@emilevauge how do one set web sockets using docker backend |
using docker-backend how will one take advantage of using web sockets |
Does traefik support WSS ? If so, how are they setup on the front end( i cant find any documents that cover even web sockets, but i see mentions of ws use on the web ). I saw something about a rule, but i am not sure how that is pointed at a marathon app..
Also, i plan to run the app in marathon, do i just use the traefik.frontend.entryPoints=ws ( or wss? ) to stipulate its a wss only?
Lastely, does traefik support end to end wss? For example, for end to end https, you just add a tag in marathon ( traefik.protocol=https ) .. is that then traefik.protocol=wss ?
Thanks!! 😄
The text was updated successfully, but these errors were encountered: