squeezr-ai 1.16.10 → 1.16.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/squeezr.js +28 -1
  2. package/package.json +1 -1
package/bin/squeezr.js CHANGED
@@ -177,6 +177,16 @@ async function startDaemon() {
177
177
  console.log(` HTTP proxy (Claude/Aider/Gemini): http://localhost:${port}`)
178
178
  console.log(` MITM proxy (Codex): http://localhost:${mitmPort}`)
179
179
  console.log(` Logs: ${logFile}`)
180
+
181
+ // Restore HTTPS_PROXY in Windows registry now that the proxy is alive
182
+ if (process.platform === 'win32') {
183
+ try { execSync(`setx HTTPS_PROXY "http://localhost:${mitmPort}"`, { stdio: 'pipe' }) } catch {}
184
+ } else if (isWSL()) {
185
+ try {
186
+ const setxExe = '/mnt/c/Windows/System32/setx.exe'
187
+ if (fs.existsSync(setxExe)) execSync(`"${setxExe}" HTTPS_PROXY "http://localhost:${mitmPort}"`, { stdio: 'pipe' })
188
+ } catch {}
189
+ }
180
190
  }
181
191
 
182
192
  function showLogs() {
@@ -232,6 +242,16 @@ function stopProxy() {
232
242
  }
233
243
  } catch {}
234
244
  }
245
+ // Clear HTTPS_PROXY so npm and other tools don't try to use the dead proxy
246
+ if (process.platform === 'win32') {
247
+ try { execSync('setx HTTPS_PROXY ""', { stdio: 'pipe' }) } catch {}
248
+ } else if (isWSL()) {
249
+ try {
250
+ const setxExe = '/mnt/c/Windows/System32/setx.exe'
251
+ if (fs.existsSync(setxExe)) execSync(`"${setxExe}" HTTPS_PROXY ""`, { stdio: 'pipe' })
252
+ } catch {}
253
+ }
254
+
235
255
  if (killed) {
236
256
  console.log(`Squeezr stopped`)
237
257
  console.log(` HTTP proxy (Claude/Aider/Gemini): http://localhost:${port}`)
@@ -1086,7 +1106,14 @@ switch (command) {
1086
1106
  console.log(` MITM proxy (Codex): http://localhost:${startMitmPort}`)
1087
1107
  console.log(` Logs: ${logFile}`)
1088
1108
 
1089
- if (isWSL()) {
1109
+ // Restore HTTPS_PROXY now that the proxy is alive
1110
+ if (process.platform === 'win32') {
1111
+ try { execSync(`setx HTTPS_PROXY "http://localhost:${startMitmPort}"`, { stdio: 'pipe' }) } catch {}
1112
+ } else if (isWSL()) {
1113
+ try {
1114
+ const setxExe = '/mnt/c/Windows/System32/setx.exe'
1115
+ if (fs.existsSync(setxExe)) execSync(`"${setxExe}" HTTPS_PROXY "http://localhost:${startMitmPort}"`, { stdio: 'pipe' })
1116
+ } catch {}
1090
1117
  console.log('\n ⚠️ IMPORTANT: Close this terminal and open a new one so the')
1091
1118
  console.log(' environment variables take effect. Otherwise tools like')
1092
1119
  console.log(' Claude Code may fail with 502 errors.\n')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squeezr-ai",
3
- "version": "1.16.10",
3
+ "version": "1.16.11",
4
4
  "description": "AI proxy that compresses Claude Code, Codex, Aider, Gemini CLI and Ollama context windows to save thousands of tokens per session",
5
5
  "keywords": [
6
6
  "claude",