How to configure protocal to http2 in docker mod cloudflared?

I succeeded deployed the docker mod cloudflare in swag according to
Zero Trust Hosting and Reverse Proxy via Cloudflare, SWAG and Authelia | LinuxServer.io, but there still have problem about cloudflare quic protocol. right now the protocol of quic is not works well for my currently ISP network, I saw there are many connection error in the log.
I tried to find possible reasons, after search, I found peoples say you can change the protocol from quic to http2, then the issue could be solved.

the method is add parameter in original cloudflare’s docker’s environment like below:

command: tunnel --no-autoupdate --protocol http2 run --token.
I tried it with cloudflare’s docker, it works.
but for the docker mod of cloudflared in swag, I can’t find the place where could put the parameter.
Could someone help to give me some advice about it, thanks!

today found the solution:

version: "2.1"
services:
  swag:
    image: lscr.io/linuxserver/swag
    container_name: swag
    cap_add:
      - NET_ADMIN
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
      - URL=lsio-test.com
      - VALIDATION=dns
      - SUBDOMAINS=wildcard
      - DNSPLUGIN=cloudflare
      - DOCKER_MODS=linuxserver/mods:swag-auto-proxy|linuxserver/mods:universal-docker|linuxserver/mods:universal-cloudflared
      - DOCKER_HOST=dockerproxy
      - CF_ZONE_ID=kujg35k2j4vg5k2hjv34g5jv23kj325
      - CF_ACCOUNT_ID=kh1gv35khgv34k5v3g5hkgcv4k34jv5k
      - CF_API_TOKEN=kh5vk135v4k1j3gv54k1v3g5k354gjv
      - CF_TUNNEL_NAME=lsio-test.com
      - CF_TUNNEL_PASSWORD=iugv1k5guvf4kgh15vk4ghc5ku3o6gu3y4vg1o4uy159
      - FILE__CF_TUNNEL_CONFIG=/config/tunnelconfig.yml
    extra_hosts:
      - lsio-test.com:127.0.0.1
    volumes:
      - /home/aptalca/appdata/swag:/config
    restart: unless-stopped

in file tunnelconfig.yml, add extra configuration"protocol: http2"

protocol: http2 #changed the protocol to http2. like below. the issue solved.
ingress:
  - hostname: test.yourdomain.url
    service: http://localhost:80
  - service: http_status:404
1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.