Apparently I was connecting the wrong way with the ssh, by not providing the right port. Also did some modifications, moved my sshd port to 6662 and used 22 for layer4, and it works perfectly fine, I can clone with ssh by just using my domain.
I did encounter another issue with the certificate. I can’t seem to make it work with caddy auto certificate and layer4.
More exactly I can’t figure out how to properly use caddy for tls and layer4 for proxy, without having caddy to handle the request
{
debug
acme_dns cloudflare 1234
dynamic_dns {
provider cloudflare 1234
domains {
marcelsoftware.dev @ www
}
dynamic_domains
}
layer4 {
0.0.0.0:587 {
route {
proxy localhost:1507
}
}
0.0.0.0:993 {
route {
proxy localhost:1903
}
}
0.0.0.0:6612 {
route {
proxy localhost:6611
}
}
:443 {
@secure tls sni git.marcelsoftware.dev
route @secure {
proxy :6610
}
@ssh ssh
route @ssh {
proxy :6611
}
}
}
}
git.marcelsoftware.dev {
tls mail@marcelsoftware.dev {
on_demand
}
}