mirror of
https://github.com/smittix/intercept.git
synced 2026-06-21 11:48:28 -07:00
refactor: route agent wifi clients through generic proxy
Removes the one-off proxy_wifi_clients route and the dead getApiBase() helper; the allowlisted passthrough now covers agent wifi traffic. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+1
-11
@@ -32,16 +32,6 @@ const WiFiMode = (function() {
|
||||
// Agent Support
|
||||
// ==========================================================================
|
||||
|
||||
/**
|
||||
* Get the API base URL, routing through agent proxy if agent is selected.
|
||||
*/
|
||||
function getApiBase() {
|
||||
if (typeof currentAgent !== 'undefined' && currentAgent !== 'local') {
|
||||
return `/controller/agents/${currentAgent}/wifi/v2`;
|
||||
}
|
||||
return CONFIG.apiBase;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current agent name for tagging data.
|
||||
*/
|
||||
@@ -1353,7 +1343,7 @@ const WiFiMode = (function() {
|
||||
|
||||
if (isAgentMode) {
|
||||
// Route through agent proxy
|
||||
response = await fetch(`/controller/agents/${currentAgent}/wifi/v2/clients?bssid=${encodeURIComponent(bssid)}&associated=true`);
|
||||
response = await fetch(`/controller/agents/${currentAgent}/proxy/wifi/v2/clients?bssid=${encodeURIComponent(bssid)}&associated=true`);
|
||||
} else {
|
||||
response = await fetch(`${CONFIG.apiBase}/clients?bssid=${encodeURIComponent(bssid)}&associated=true`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user