New: Add support for PAC URL and windows registry#712
New: Add support for PAC URL and windows registry#712tsvi wants to merge 8 commits intobrafdlog:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for Windows registry-based proxy configuration and PAC (Proxy Auto-Config) file parsing to enable the application to work behind corporate proxies. The proxy configuration has been refactored from being import-specific to backend-level, ensuring proxy support for both scraping (via Puppeteer) and YNAB API calls (via undici).
Changes:
- Added Windows registry proxy detection for Windows environments
- Implemented PAC file fetching and basic proxy extraction via regex pattern matching
- Refactored proxy configuration into a dedicated
proxyConfigmodule with separate concerns (agent management, PAC files, Windows registry) - Integrated proxy initialization/teardown at the backend level to support both Chromium downloads, scraping, and YNAB API communication
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Added dependencies for winreg, @types/winreg, and undici |
| packages/main/src/backend/proxyConfig/windowsRegistry.ts | New file implementing Windows registry reading for proxy settings |
| packages/main/src/backend/proxyConfig/pacFile.ts | New file implementing PAC file fetching, caching, and basic proxy extraction |
| packages/main/src/backend/proxyConfig/index.ts | New orchestration module that checks environment variables, Windows registry, and PAC files for proxy configuration |
| packages/main/src/backend/proxyConfig/agentManager.ts | New module managing global HTTP/HTTPS agents and undici dispatcher configuration |
| packages/main/src/backend/index.ts | Integration of proxy initialization at scrape start and teardown at completion |
| packages/main/src/backend/import/downloadChromium.ts | Removed proxy-specific initialization/teardown (now handled at backend level) |
| packages/main/src/backend/import/bankScraper.ts | Updated import path from local to backend-level proxyConfig |
| packages/main/src/backend/import/proxyConfig.ts | Deleted old proxy configuration implementation |
| package.json | Added winreg, @types/winreg, and undici dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
395037b to
a8c92eb
Compare
…urrent calls and improve resource management
a612a76 to
c802abd
Compare
|
Pull request has been marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Had been working great for me for the past 2-3 months |
After some more usage of the proxy support I discovered a few issues,
I changed downloadChromium back to be proxy-agnostic. Setting the proxy is now done at the backend level supporting both scraping and pushing.
I refactored the proxyConfig code to make it clearer in functionality and set it as a directory under backend.