Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify host for layer4 #19

Open
Miggets7 opened this issue Aug 8, 2023 · 2 comments
Open

Specify host for layer4 #19

Miggets7 opened this issue Aug 8, 2023 · 2 comments

Comments

@Miggets7
Copy link

Miggets7 commented Aug 8, 2023

Hi,

Is it possible to specify a host/domain for a service?

I'm using the caddy-docker-proxy module in combination with yours with this label:

labels:
        caddy.layer4.:27017.proxy: "{{upstreams 27017}}"

which generates this caddy part:

"layer4": {
      "servers": {
        "srv0": {
          "listen": [":27017"],
          "routes": [
            {
              "handle": [
                {
                  "handler": "proxy",
                  "upstreams": [{ "dial": ["10.0.22.76:27017"] }]
                }
              ]
            }
          ]
        }
      }
    }

But I would like to specify the host/domain, so I could have multiple services running on the same port. Is it possible?

@arashsm79
Copy link

Check out section 5 of this comment. It tries to multiplex HTTPS and SSH by having layer4 itself listen on 433.
It uses SSH and SNI matchers along with the subroute handler; I'm not sure if caddy-ext/layer4 supports those.

@Miggets7
Copy link
Author

@arashsm79 Not sure how the link should help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants