WIP: rebase for 2026-05-18 #7
@@ -32,7 +32,9 @@ func (d *Dialer) Dial(ctx context.Context) (*ClientConn, error) {
|
|||||||
host := d.Hostname
|
host := d.Hostname
|
||||||
// If using a custom control server (on a non-standard port), prefer that.
|
// If using a custom control server (on a non-standard port), prefer that.
|
||||||
// This mirrors the port selection in newNoiseClient from noise.go.
|
// This mirrors the port selection in newNoiseClient from noise.go.
|
||||||
if d.HTTPPort != "" && d.HTTPPort != "80" && d.HTTPSPort == "443" {
|
// Also use ws:// when HTTPS is explicitly disabled (NoPort), which happens
|
||||||
|
// for http:// URLs with private hostnames (e.g. http://localhost:31544).
|
||||||
|
if d.HTTPPort != "" && d.HTTPPort != "80" && (d.HTTPSPort == "443" || d.HTTPSPort == NoPort) {
|
||||||
wsScheme = "ws"
|
wsScheme = "ws"
|
||||||
host = net.JoinHostPort(host, d.HTTPPort)
|
host = net.JoinHostPort(host, d.HTTPPort)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user