Routing a pure TCP route for electrum client

Hello! I need to set up a non-http, tcp only route for an electrumx client.

I'm currently running traefik from outside my kubenetes, which routes to an internal traeifk inside of k8s. The config I'm showing below is for the external traefik.

ideally, an electrum client could access electrumx.mydomain.com:50001, and route to localhost:31769 which is the direct port to the electrum client in the kubernetes cluster. For now I'll bypass the inner traefik in kubernetes until I get this external setup to work.

In my main traefik config, I have

log:
  level: "DEBUG"
  filePath: "/var/log/traefik.log"

entryPoints:
  web:
    address: :80

  electrum:
    address: :50001

  electrum-ssl:
    address: :50002

  websecure:
    address: ':443'
    http:
      tls:
        certResolver: default
        domains:
            - main: mydomain.com
              sans:
                - admin.mydomain.com
                - api.mydomain.com
                - electrumx.mydomain.com
                - docker.mydomain.com
                - rpc.mydomain.com

certificatesResolvers:
  default:
    acme:
      email: 'admin@mydomain.org'
      storage: '/etc/traefik/acme/mydomain-acme.json'
      tlsChallenge: true

providers:
  file:
    directory: /etc/traefik/configs

Then in my config router file

tcp:
    # Add the router
    routers:
      elec:
        entryPoints:
          - electrum
        service: electrumx
        rule: HostSNI(`*`)
        tls:
          passthrough: true
          certresolver: basic
          domains:
          - main: mydomain.com
            sans:
            - "electrumx.mydomain.com"

    services:
      electrumx:
        loadBalancer:
          servers:
          - address: "localhost:31769"

tls:
  options:
    foo:
      minVersion: VersionTLS12

It's definitely not working any help is GREATLY appreciated :smile: