小编A3e*_*eXy的帖子

Traefik 2.0 TLS TCP 直通

我有一个 VM0,其中 Traefik 作为 Docker 运行,还有两个目标系统 VM1 和 VM2,它们都运行着 Web 服务器。

所有domainA.com 请求都应通过 TCP 路由器和 tls 直通发送至 VM1,因为此 Web 服务正在自行处理证书。

所有domainB.com 请求都应通过http 路由器发送至VM2,并且Traefik 应生成该域的tls 证书。

我现在的问题是,一旦我将任何 tls 配置添加到 http 路由器,tcp 直通似乎就不再起作用了。在日志中我看到以下消息:

time="2020-03-15T21:46:18Z" level=debug msg="为请求提供默认证书:\"subdomain.DomainA.com\"" time="2020-03-15T21:46:18Z" level= debug msg="http:来自 192.168.1.116:55103 的 TLS 握手错误:远程错误:tls:未知证书" time="2020-03-15T21:46:18Z" level=debug msg="为请求提供默认证书:\ “subdomain.DomainA.com\”” time =“2020-03-15T21:46:18Z”level = debug msg =“http:来自192.168.1.116:55104的TLS握手错误:远程错误:tls:未知证书”

如果我通过 Traefik 访问该网站,它会向我显示来自 Traefik 的自签名证书。

如果我删除 http 路由器下的所有 tls 设置,直通将再次工作。

我的动态文件:

http:
  routers:

    HTTProuter0:
      rule: "HostRegexp(`{subdomain:[a-z]+}.domainA.com`)"
      service: "domainA"
      entryPoints:
       - "websecure"
      tls:
        certResolver: "myresolver"
        domains:
         - main: "domainA.com" …
Run Code Online (Sandbox Code Playgroud)

ssl tcp traefik

3
推荐指数
1
解决办法
7665
查看次数

标签 统计

ssl ×1

tcp ×1

traefik ×1