proxy_update_target
Modify domain settings in the web proxy server to adjust monitoring parameters like header capture, body capture, and enable/disable status.
Instructions
Update target domain configuration
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain to update | |
| description | No | New description | |
| enabled | No | Enable/disable target | |
| captureHeaders | No | Enable/disable header capture | |
| captureBody | No | Enable/disable body capture |
Implementation Reference
- src/tools/tool-handlers.js:197-210 (handler)Tool handler for proxy_update_target: prepares updates from args and calls targetManager.updateTarget, returns success message.case 'proxy_update_target': const updates = {}; if ('enabled' in args) updates.enabled = args.enabled; if ('description' in args) updates.description = args.description; if ('captureHeaders' in args) updates.captureHeaders = args.captureHeaders; if ('captureBody' in args) updates.captureBody = args.captureBody; const updated = this.targetManager.updateTarget(args.domain, updates); return { content: [{ type: "text", text: `Target updated: ${args.domain}\nStatus: ${updated ? 'success' : 'not found'}\nUpdates: ${JSON.stringify(updates, null, 2)}` }] };
- src/tools/tool-definitions.js:73-102 (schema)Input schema definition for proxy_update_target tool including properties and required fields.proxy_update_target: { name: "proxy_update_target", description: "Update target domain configuration", inputSchema: { type: "object", properties: { domain: { type: "string", description: "Domain to update" }, description: { type: "string", description: "New description" }, enabled: { type: "boolean", description: "Enable/disable target" }, captureHeaders: { type: "boolean", description: "Enable/disable header capture" }, captureBody: { type: "boolean", description: "Enable/disable body capture" } }, required: ["domain"] } },
- src/proxy/target-manager.js:374-391 (helper)Core updateTarget method in TargetManager class that applies configuration updates to the target domain and regenerates PAC file.updateTarget(domain, updates) { const target = this.targets.get(domain.toLowerCase()); if (!target) { return false; } // Apply updates if ('enabled' in updates) target.enabled = updates.enabled; if ('description' in updates) target.description = updates.description; if ('includeSubdomains' in updates) target.includeSubdomains = updates.includeSubdomains; if ('captureHeaders' in updates) target.captureHeaders = updates.captureHeaders; if ('captureBody' in updates) target.captureBody = updates.captureBody; target.lastModified = new Date(); this._updatePacFile(); return true; }