Toxa
1
I have problem with TCP, UDP EntryPoints
time="2022-08-03T10:12:16Z" level=error msg="accept tcp [::]:3478: use of closed network connection" entryPointName=tcp3478
time="2022-08-03T10:12:16Z" level=error msg="Error while starting server: accept tcp [::]:3478: use of closed network connection" entryPointName=tcp3478
time="2022-08-03T10:12:16Z" level=error msg="accept tcp [::]:80: use of closed network connection" entryPointName=http
time="2022-08-03T10:12:16Z" level=error msg="Error while starting server: accept tcp [::]:80: use of closed network connection" entryPointName=http
time="2022-08-03T10:12:16Z" level=error msg="accept tcp [::]:443: use of closed network connection" entryPointName=https
time="2022-08-03T10:12:16Z" level=error msg="Error while starting server: accept tcp [::]:443: use of closed network connection" entryPointName=https
time="2022-08-03T10:12:16Z" level=error msg="accept tcp [::]:57772: use of closed network connection" entryPointName=tcp57772
time="2022-08-03T10:12:16Z" level=error msg="Error while starting server: accept tcp [::]:57772: use of closed network connection" entryPointName=tcp57772
Toxa
2
my Traefik.yaml
global:
checkNewVersion: true
# pilot:
# token: ""
serversTransport:
insecureSkipVerify: true
api:
dashboard: true
entryPoints:
http:
address: ":80"
https:
address: ":443"
tcp57772:
address: ":57772"
tcp3478:
address: ":3478"
udp3478:
address: ":3478/udp"
udp10000:
address: ":10000/udp"
# k8s-api:
# address: ":6443"
# metrics:
# address: ":8082"
# metrics:
# prometheus:
# entryPoint: metrics
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
file:
directory: /custom
watch: true
# kubernetesIngress:
# endpoint: "https://rke.onkokms.ru/k8s/clusters/c-xxxxx"
# token: "" # Token from Rancher
# ingressClass: "traefik-lb"
# ingressEndpoint:
# ip: "" # you external IP
certificatesResolvers:
letsEncrypt:
acme:
email: brayankms94@gmail.com
storage: acme.json
httpChallenge:
entryPoint: http
# hetzner:
# acme:
# email: brayankms94@gmail.com
# storage: acme-hetzner.json
# dnsChallenge:
# provider: hetzner
# delayBeforeCheck: 30
Docker-compose.yaml.
version: '3.7'
services:
traefik:
image: traefik
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
ports:
- 80:80
- 443:443
- 3478:3478
- 3478/udp:3478/udp
- 10000/udp:10000/udp
- 57772:57772
# - 6443:6443
# environment:
# HETZNER_API_KEY: ${HETZNER_API_KEY}
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./data/traefik.yml:/traefik.yml:ro
- ./data/acme.json:/acme.json
- ./data/custom/:/custom/:ro
- ./data/basic.auth:/basic.auth
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=https"
- "traefik.http.routers.traefik.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.routers.traefik.tls.certresolver=letsEncrypt"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.services.traefik-traefik.loadbalancer.server.port=888"
- "traefik.http.routers.traefik.middlewares=traefik-auth"
- "traefik.http.middlewares.traefik-auth.basicAuth.usersFile=/basic.auth"
# global redirect to https
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=http"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
networks:
- webproxy
networks:
webproxy:
name: webproxy
and my Custom conf for File provider
tmk.onkokms.ru.yaml
http:
routers:
tmk:
entryPoints:
- https
- http
rule: Host(`tmk.onkokms.ru`)
service: tmk-service
tls:
certResolver: letsEncrypt
services:
tmk-service:
loadBalancer:
servers:
- url: https://10.40.109.215
tcp:
routers:
tmk-service-3478:
entryPoints:
- tcp3478
rule: "HostSNI(`tmk.onkokms.ru`)"
service: tmk-service-3478
tls:
passthrough: true
tmk-service-57772:
entryPoints:
- tcp57772
rule: "HostSNI(`tmk.onkokms.ru`)"
service: tmk-service-57772
tls:
passthrough: true
services:
tmk-service-3478:
loadBalancer:
servers:
- address: 10.40.109.215:3478
tmk-service-57772:
loadBalancer:
servers:
- address: 10.40.109.215:57772
udp:
routers:
tmk-service-3478/udp:
entryPoints:
- udp3478
# rule: "HostSNI(`tmk.onkokms.ru`)"
service: tmk-service-3478/udp
tmk-service-10000/udp:
entryPoints:
- udp10000
# rule: "HostSNI(`tmk.onkokms.ru`)"
service: tmk-service-10000/udp
services:
tmk-service-3478/udp:
loadBalancer:
servers:
- address: 10.40.109.215:3478
tmk-service-10000/udp:
loadBalancer:
servers:
- address: 10.40.109.215:10000
proofy
3
Hostname in the rule with tcp doesn't work and udp: is missing