Compare commits

..

8 Commits
dev ... 1.12.3

Author SHA1 Message Date
Owen Schwartz
57aa2e2e2c Merge pull request #336 from fosrl/dev
1.12.3
2026-04-29 16:02:49 -07:00
Owen Schwartz
9e92c42876 Merge pull request #333 from fosrl/dev
Dont block tcp for http unless there are targets
2026-04-28 14:51:01 -07:00
Owen Schwartz
ffd26f9a6d Merge pull request #331 from fosrl/dev
Follow redirects by default for backward compat
2026-04-28 10:13:49 -07:00
Owen Schwartz
bf33a66043 Merge pull request #328 from fosrl/dev
Quiet message
2026-04-27 20:11:01 -07:00
Owen Schwartz
df3aa60cf5 Merge pull request #327 from fosrl/dev
1.12.0
2026-04-27 20:08:45 -07:00
Owen Schwartz
cc663f1636 Merge pull request #323 from fosrl/dev
1.12.0-rc.1
2026-04-24 13:42:38 -07:00
Owen Schwartz
af2ecf486a Merge pull request #322 from fosrl/dev
Revert nix in cicd
2026-04-22 11:40:45 -07:00
Owen Schwartz
a0d2bb999a Merge pull request #321 from fosrl/dev
1.12.0-rc.0
2026-04-22 11:35:31 -07:00
2 changed files with 10 additions and 12 deletions

View File

@@ -279,7 +279,7 @@ func startPingCheck(tnet *netstack.Net, serverIP string, client *websocket.Clien
// More lenient threshold for declaring connection lost under load
failureThreshold := 4
if consecutiveFailures >= failureThreshold {
if consecutiveFailures >= failureThreshold && currentInterval < maxInterval {
if !connectionLost {
connectionLost = true
logger.Warn("Connection to server lost after %d failures. Continuous reconnection attempts will be made.", consecutiveFailures)
@@ -309,14 +309,12 @@ func startPingCheck(tnet *netstack.Net, serverIP string, client *websocket.Clien
}
}
}
if currentInterval < maxInterval {
currentInterval = time.Duration(float64(currentInterval) * 1.3) // Slower increase
if currentInterval > maxInterval {
currentInterval = maxInterval
}
ticker.Reset(currentInterval)
logger.Debug("Increased ping check interval to %v due to consecutive failures", currentInterval)
currentInterval = time.Duration(float64(currentInterval) * 1.3) // Slower increase
if currentInterval > maxInterval {
currentInterval = maxInterval
}
ticker.Reset(currentInterval)
logger.Debug("Increased ping check interval to %v due to consecutive failures", currentInterval)
}
} else {
// Track recent latencies

View File

@@ -356,16 +356,16 @@ func (h *HTTPHandler) handleRequest(w http.ResponseWriter, r *http.Request) {
return
}
// If the rule is HTTPS and a TLS certificate is configured, but the
// incoming request arrived over plain HTTP, redirect to HTTPS.
if rule.Protocol == "https" && rule.TLSCert != "" && rule.TLSKey != "" && r.TLS == nil {
// If the rule is plain HTTP but has a TLS certificate configured, redirect
// the client to the HTTPS equivalent of the requested URL.
if rule.Protocol == "http" && rule.TLSCert != "" && rule.TLSKey != "" {
host := r.Host
if host == "" {
host = r.URL.Host
}
httpsURL := "https://" + host + r.RequestURI
logger.Info("HTTP handler: redirecting %s %s -> %s (TLS cert present)", r.Method, r.URL.RequestURI(), httpsURL)
http.Redirect(w, r, httpsURL, http.StatusPermanentRedirect)
http.Redirect(w, r, httpsURL, http.StatusMovedPermanently)
return
}