⎗ ✓ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41const http = require('http'); const https = require('https'); const TARGET = 'agentrouter.org'; const PORT = 5000; const server = http.createServer((req, res) => { console.log(`${req.method} ${req.url}`); const options = { hostname: TARGET, port: 443, path: req.url, method: req.method, headers: { ...req.headers, 'host': TARGET, 'User-Agent': 'RooCode/3.28.15', 'HTTP-Referer': 'https://github.com/RooVetGit/Roo-Cline', 'X-Title': 'Roo Code' } }; const proxy = https.request(options, (proxyRes) => { res.writeHead(proxyRes.statusCode, proxyRes.headers); proxyRes.pipe(res); }); proxy.on('error', (err) => { console.error('Proxy error:', err); res.writeHead(500); res.end('Proxy error'); }); req.pipe(proxy); }); server.listen(PORT, () => { console.log(`Proxy running at http://localhost:${PORT}`); console.log(`Forwarding to https://${TARGET}`); });
Warning LINK You are about to visit a link which has been flagged with the above content warnings. Do you wish to continue? Continue Cancel