fix: ensure proxy is used by @polymarket/clob-client

Add proxy-patch.cjs that patches https.request BEFORE axios is loaded.
This forces all Polymarket API calls through the proxy, including
internal axios instances used by @polymarket/clob-client.

Import patch as very first thing in sniper.js and sniper-tui.js.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
direkturcrypto
2026-03-01 22:18:06 +07:00
co-authored by Claude Opus 4.6
parent b2f8447d0b
commit 368a3f8da5
3 changed files with 54 additions and 0 deletions
+3
View File
@@ -9,6 +9,9 @@
* For the TUI dashboard version, use: npm run sniper-tui
*/
// Load proxy patch BEFORE any other imports (must patch https before axios is loaded)
import './utils/proxy-patch.cjs';
import { validateMMConfig } from './config/index.js';
import config from './config/index.js';
import logger from './utils/logger.js';