From 54876ab8603bb810aff577bdd5cbf966eaeb300e Mon Sep 17 00:00:00 2001 From: Vittorio Parrella Date: Sat, 31 Aug 2024 17:28:20 +0200 Subject: [PATCH] initial connection issue --- api/api_client.go | 5 +++++ backend/backend_quiclygo.go | 2 +- backend/quicly-go | 2 +- shared/gateway_interface_windows.go | 4 ++++ workers/client/client.go | 8 +++++--- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/api/api_client.go b/api/api_client.go index 0cc8bfc0..51b9e92b 100644 --- a/api/api_client.go +++ b/api/api_client.go @@ -8,6 +8,7 @@ import ( "github.com/parvit/qpep/logger" "net" "net/http" + "net/http/httputil" "net/url" "runtime" "strings" @@ -60,6 +61,10 @@ func doAPIRequest(addr string, client *http.Client) (*http.Response, error) { logger.Error("%v\n", err) return nil, err } + + data, _ := httputil.DumpResponse(resp, true) + logger.Info("RESP: %v\n", string(data)) + return resp, nil } diff --git a/backend/backend_quiclygo.go b/backend/backend_quiclygo.go index 22f3fb64..425d50ce 100644 --- a/backend/backend_quiclygo.go +++ b/backend/backend_quiclygo.go @@ -73,7 +73,7 @@ func (q *quiclyGoBackend) init(isClient, traceOn bool, certPath, certKeyPath, cc CertificateFile: certPath, CertificateKey: certKeyPath, ApplicationProtocol: QUICLYGO_ALPN, - IdleTimeoutMs: 2 * 1000, + IdleTimeoutMs: 30 * 1000, CongestionAlgorithm: ccAlgorithm, CCSlowstartAlgorithm: ccSlowstartAlgo, TraceQuicly: traceOn, diff --git a/backend/quicly-go b/backend/quicly-go index f9f2d350..fed5a46d 160000 --- a/backend/quicly-go +++ b/backend/quicly-go @@ -1 +1 @@ -Subproject commit f9f2d3504a5bcf00595d4c1955e27205ed0c99c4 +Subproject commit fed5a46dc5ae026651b6e3de75fdf6c41da06cc6 diff --git a/shared/gateway_interface_windows.go b/shared/gateway_interface_windows.go index 89249422..b11c0773 100644 --- a/shared/gateway_interface_windows.go +++ b/shared/gateway_interface_windows.go @@ -168,6 +168,10 @@ BLOCK: } func SetSystemProxy(active bool) { + if active && ProxyAddress != nil { + return + } + preloadRegistryKeysForUsers() if !active { diff --git a/workers/client/client.go b/workers/client/client.go index 898afbf3..31548d7e 100644 --- a/workers/client/client.go +++ b/workers/client/client.go @@ -123,6 +123,11 @@ func handleServices(ctx context.Context, cancel context.CancelFunc, wg *sync.Wai // connection with the server to be on already up initialCheckConnection() + localAddr := ClientConfiguration.ListenHost + apiAddr := ClientConfiguration.GatewayHost + apiPort := ClientConfiguration.APIPort + connected, _ = gatewayStatusCheck(localAddr, apiAddr, apiPort) + // Update loop for { select { @@ -137,9 +142,6 @@ func handleServices(ctx context.Context, cancel context.CancelFunc, wg *sync.Wai continue } checkIsRunning = true - localAddr := ClientConfiguration.ListenHost - apiAddr := ClientConfiguration.GatewayHost - apiPort := ClientConfiguration.APIPort connected, _ = gatewayStatusCheck(localAddr, apiAddr, apiPort) checkIsRunning = false