Add TOOL_HOSTS constant for per-tool DNS mapping and integrate into MitmToolCard component (#788)

This commit is contained in:
mrcyclo 2026-04-28 09:50:11 +07:00 committed by GitHub
parent 58a821d687
commit 54a67dbeb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 29 additions and 9 deletions

View file

@ -0,0 +1,12 @@
/**
* Per-tool DNS hosts written to hosts file as 127.0.0.1 when MITM DNS is enabled.
* Kept in sync with MITM routing; shared by Node (dnsConfig) and dashboard UI.
*/
const TOOL_HOSTS = {
antigravity: ["daily-cloudcode-pa.googleapis.com", "cloudcode-pa.googleapis.com"],
copilot: ["api.individual.githubcopilot.com"],
kiro: ["q.us-east-1.amazonaws.com", "codewhisperer.us-east-1.amazonaws.com"],
cursor: ["api2.cursor.sh"],
};
module.exports = { TOOL_HOSTS };