How to enable proxyprotocol on a service declared from docker swarm?


The symptom

My issue is this log line: level=error msg="field not found, node: proxyprotocol" providerName=docker container=...

My setup

I try to enable proxyprotocol for a service that I am running in a docker service/task/... but it doesn't seems to work. I use "docker stack deploy -c docker-compose.yml" with this file (cleared a bit):

version: "3.8"                                                                                                                     
    image: blah:latest                                                                                                     
      - ./data:/data                                                                                                               
        traefik.enable: "true"                                                                                                     
        traefik.tcp.routers.tcp-587.entrypoints: "smtp"                                                                            
        traefik.tcp.routers.tcp-587.rule: "HostSNI(`*`)"                                                                           
        traefik.tcp.routers.tcp-587.service: "tcp-587"                                                                             "587"                                                               "2"  

Some investigations

  1. I found the documentation: Docker - Traefik
    With "".

  2. In the code repo GitHub - traefik/traefik: The Cloud Native Application Proxy I had no match with this: ag proxyprotocol | grep docker and I have no match for golang files while have some with ag proxyprotocol | grep kubernetes.

So I'm asking if the feature is implemented for the docker provider.

Do I miss something?

ProxyProtocol should be declared at the EntryPoint in the Traefik static configuration (docs).