Closed snadn closed 2 years ago
Because 443 is the HTTPS port, so pretty much every site you visit with HTTPS will be on port 443; and I think that's also due to limitations in the proxy clients and their configuration possibilities.
@mholt Maybe it will be more flexible to make the port configurable. Sometimes we may expect to provide https service through other ports
I don't think that will do any good unless proxy clients support that.
@mholt The proxy client supports custom ports, such as SwitchyOmega. I used port 8443 when I used Caddy v1.
Ah, so I think I misread/misunderstood originally.
I don't think the port number itself is the point of that sentence. It's saying that your site address can't be example.com
or example.com:443
because Caddy will need to be configured to respond to requests with any Host header, not just your own domain name. So the port number can be :8443
or anything else (if clients support it), but you want to omit the domain name.
@mholt I think that when Caddy acts as an https proxy, the domain in the configuration is necessary, and the port can be set arbitrarily. The desired configuration is as follows:
https://example.com:xxxx {
forward_proxy {
...
}
}
The proxy configuration takes effect only when accessing the domain name specified in the configuration. The configuration of Caddy v1 can meet expectations, but v2 cannot.V2 can take effect with any configured domain name access.
why v2 only support 443 port? can support other port?
https://github.com/caddyserver/forwardproxy/blob/caddy2/README.md?plain=1#L19