From 3b2aa2ff95c61f576e1d2c50053a91efbde746c2 Mon Sep 17 00:00:00 2001 From: kawsik Date: Tue, 2 Jun 2026 11:49:06 +0530 Subject: [PATCH] Update API backend URLs from ngrok to seekright production server --- client_agent_prototype.py | 8 ++++---- deploy_agent.sh | 6 +++--- prometheus.yml.tmp | 2 +- rmm-ui/src/App.jsx | 12 +++--------- rmm-ui/vite.config.js | 5 +++-- 5 files changed, 14 insertions(+), 19 deletions(-) diff --git a/client_agent_prototype.py b/client_agent_prototype.py index 34e5543..e32daba 100644 --- a/client_agent_prototype.py +++ b/client_agent_prototype.py @@ -7,12 +7,12 @@ import psutil CLIENT_ID = "client_1" import os -# Using the public ngrok URL so the agent can connect from anywhere in the world! -CENTRAL_API_URL = f"https://culprit-campfire-galore.ngrok-free.dev/api/get-command?client_id={CLIENT_ID}" -CENTRAL_TELEMETRY_URL = f"https://culprit-campfire-galore.ngrok-free.dev/api/telemetry?client_id={CLIENT_ID}" +# Using the central production backend URL +CENTRAL_API_URL = f"http://rmm-backend.seekright.com/api/get-command?client_id={CLIENT_ID}" +CENTRAL_TELEMETRY_URL = f"http://rmm-backend.seekright.com/api/telemetry?client_id={CLIENT_ID}" platform_name = "nt" if os.name == "nt" else "posix" -CENTRAL_COMMANDS_URL = f"https://culprit-campfire-galore.ngrok-free.dev/api/get-commands?platform={platform_name}" +CENTRAL_COMMANDS_URL = f"http://rmm-backend.seekright.com/api/get-commands?platform={platform_name}" # SECURITY MECHANISM: The "Whitelist" # The agent NEVER executes arbitrary strings from the internet. diff --git a/deploy_agent.sh b/deploy_agent.sh index 9a9e855..643746a 100644 --- a/deploy_agent.sh +++ b/deploy_agent.sh @@ -46,11 +46,11 @@ import os CLIENT_ID = "TEMPLATE_CLIENT_ID" -CENTRAL_API_URL = f"https://culprit-campfire-galore.ngrok-free.dev/api/get-command?client_id={CLIENT_ID}" -CENTRAL_TELEMETRY_URL = f"https://culprit-campfire-galore.ngrok-free.dev/api/telemetry?client_id={CLIENT_ID}" +CENTRAL_API_URL = f"http://rmm-backend.seekright.com/api/get-command?client_id={CLIENT_ID}" +CENTRAL_TELEMETRY_URL = f"http://rmm-backend.seekright.com/api/telemetry?client_id={CLIENT_ID}" platform_name = "nt" if os.name == "nt" else "posix" -CENTRAL_COMMANDS_URL = f"https://culprit-campfire-galore.ngrok-free.dev/api/get-commands?platform={platform_name}" +CENTRAL_COMMANDS_URL = f"http://rmm-backend.seekright.com/api/get-commands?platform={platform_name}" CACHED_COMMANDS = {} diff --git a/prometheus.yml.tmp b/prometheus.yml.tmp index 3008fda..f60fd05 100644 --- a/prometheus.yml.tmp +++ b/prometheus.yml.tmp @@ -26,7 +26,7 @@ scrape_configs: # - job_name: "desktop_ngrok_test" # scheme: https # static_configs: -# - targets: ["culprit-campfire-galore.ngrok-free.dev"] +# - targets: ["rmm-backend.seekright.com"] # # - job_name: "sasi_gpu" # scheme: https diff --git a/rmm-ui/src/App.jsx b/rmm-ui/src/App.jsx index c10356e..dd0c02d 100644 --- a/rmm-ui/src/App.jsx +++ b/rmm-ui/src/App.jsx @@ -15,17 +15,11 @@ import { Play } from 'lucide-react'; -const API_BASE = 'https://culprit-campfire-galore.ngrok-free.dev'; // Target FastAPI central server in production VM +const API_BASE = 'http://rmm-backend.seekright.com'; // Target FastAPI central server in production VM -// Secure API fetch wrapper to automatically bypass ngrok's transitional browser warning page +// Secure API fetch wrapper const apiFetch = (url, options = {}) => { - return fetch(url, { - ...options, - headers: { - ...options.headers, - 'ngrok-skip-browser-warning': 'true' - } - }); + return fetch(url, options); }; function App() { diff --git a/rmm-ui/vite.config.js b/rmm-ui/vite.config.js index 53e8582..5cf66f6 100644 --- a/rmm-ui/vite.config.js +++ b/rmm-ui/vite.config.js @@ -5,7 +5,8 @@ import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], server: { - host: 'localhost', - port: 8080, + host: '0.0.0.0', + port: 4173, + allowedHosts: ["rmm.seekright.com"] }, }) \ No newline at end of file