Giter Club home page Giter Club logo

Comments (4)

max06 avatar max06 commented on May 24, 2024 1

Hello @rtribotte , thank you for your reply.

Yes, that issue matches mine. The documentation misses any mention of a different handling of tcp and tls-tcp, similar to http. $someone should find the chance to update this, since I've found multiple similar issues in your own community forum regarding the same confusion.

And while we're on it: Is there any preferred solution to my original question? I'm not a big fan of re-encrypting the traffic multiple times if there's no need for that. And somewhere on that way I'm loosing the original client ip... different issue.

from traefik.

rtribotte avatar rtribotte commented on May 24, 2024

Hello @max06,

Thanks for reporting this!

This seems to be the same report as #10186.
Please take a look at #10186 (comment) for more explanations.
I'm closing this issue as a duplicate, but don't hesitate to reopen it if you think this is not the case.

from traefik.

rtribotte avatar rtribotte commented on May 24, 2024

Hello @max06,

To make the catchAll TCP-TLS router take precedence over the HTTPS catchAll router, you can redefine the TCP-TLS router rule to prevent Traefik from considering it as a "catchAll" rule, while being a rule matching any host.

tcp:
  routers:
    catchall:
      entryPoints:
        - secure
      service: catchall
      # keep the catchAll behavior in regards to matching, but prevent Traefik from detecting this as a "catchAll" router.
      rule: !HostSNI(`foobar`)
      priority: 1
      tls:
        passthrough: true

This is only an example, the rule HostSNI(`*`) || HostSNI(`*`) would have worked too.
Here is the explanation of why:

var catchAll bool
if ruleTree.RuleLeft == nil && ruleTree.RuleRight == nil && len(ruleTree.Value) == 1 {
catchAll = ruleTree.Value[0] == "*" && strings.EqualFold(ruleTree.Matcher, "HostSNI")
}

from traefik.

max06 avatar max06 commented on May 24, 2024

Oh no.... I was so close 😂

Thank you, I'll give it a try this evening!

from traefik.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.