New: Add support for PAC URL and windows registry#712
Open
tsvi wants to merge 8 commits intobrafdlog:masterfrom
Open
New: Add support for PAC URL and windows registry#712tsvi wants to merge 8 commits intobrafdlog:masterfrom
tsvi 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.