Can Traefik v2 router handle with the CONNECT Method?

Hello all.

I'm trying to use Traefik in front of a proxy server. The server need CONNECT method to work, but every request i sent are dropped to no where.
[IP MASKED] - - [10/Feb/2023:14:33:08 +0000] "CONNECT - HTTP/2.0" 404 19 "-" "-" 495 "-" "-" 0ms

I tried to add Method(CONNECT) to the matching rule but things are still not working.


kind: IngressRoute
  name: naive
  namespace: applications
  - websecure
  - match: Host(`[HOST]`) && Method(`CONNECT`)
    kind: Rule
    - name: naive
      kind: Service
      port: 8080
      scheme: h2c
    secretName: [TLSNAME]

So could traefik handle with CONNECT request in the first place???

Thanks for your help!

Hi @Orwill,

What do you mean?
Could you explain the architecture in place?

So I'm using a proxy software call Naiveproxy. GitHub - klzgrad/naiveproxy: Make a fortune quietly Which expose a h2c port, and I want to use Traefik as Naiveproxy's reserve proxy, with the ingressroute I provided.

So it's like client -> Traefik(TLS) -> naiveproxy(h2c).

But Naiveproxy require CONNECT to work, and Traefik always drop the CONNECT request to no where, and that brings the question.