Traefik tcp router for squid

Hello,

I want to use traefik to route queries to my squid cluster.
For this I need a tcp LB.

however according to the documentation I cannot create a rule if I don't use TLS (this is my case here I don't have TLS involve)

Any idea on how to route proxy.domain.com to my container in tcp mode ?

thanks !

You can't. When you connect to your reverse proxy, it needs to know to which service to forward. Either by Host()/HostSNI() or PathPrefix(). When using http, host and path are provided. When using plain TCP, the host is only provided when using TLS.

For other TCP content, you can not do any matching. Only a non-TLS catchall on the whole entrypoint traffic with HostSNI(`*`). Doc.

thank you for your feedback.

I got used to Haproxy where I can map an entrypoint to one service.
Seems this is not possible with traefik.

The quickest solution in my case was to use swarm ingress.

Using HostSNI(`*`)you can map exactly one entrypoint to one service. But that one entrypoint also means one dedicated listening port for the service.

Maybe check simple Traefik TCP example.