Skip to content

[webapp] Add web-based PAC file tester#234

Merged
manugarg merged 2 commits intomainfrom
pactester_app
Feb 10, 2026
Merged

[webapp] Add web-based PAC file tester#234
manugarg merged 2 commits intomainfrom
pactester_app

Conversation

@manugarg
Copy link
Copy Markdown
Owner

Adds a client-side web app (web/) for testing PAC files in the browser without installing any software. Key features:

  • Paste or upload a PAC file and test it against a URL
  • Custom host→IP DNS mappings to mock dnsResolve() / myIpAddress()
  • Full PAC helper function support (all functions from pac_utils.h)
  • Debug panel showing DNS lookups made and whether myIpAddress() was called
  • 100% client-side — no data leaves the browser

To keep pac_utils.h and the web app in sync, adds:

  • src/pac_utils_dump.c: tiny C program that dumps pac_utils.h JS as a JS source string (const PAC_UTILS_JS) into web/pac_utils.js
  • Makefile targets pac_utils_dump and pac_utils_js
  • web/pac_utils.js: generated file, checked in so the app works without a build step

Also adds .github/workflows/deploy-pages.yml to publish the app to GitHub Pages on every push to main that touches web/ or pac_utils.h. Enable Pages (source: GitHub Actions) in repo settings to activate.

Adds a client-side web app (web/) for testing PAC files in the browser
without installing any software. Key features:
- Paste or upload a PAC file and test it against a URL
- Custom host→IP DNS mappings to mock dnsResolve() / myIpAddress()
- Full PAC helper function support (all functions from pac_utils.h)
- Debug panel showing DNS lookups made and whether myIpAddress() was called
- 100% client-side — no data leaves the browser

To keep pac_utils.h and the web app in sync, adds:
- src/pac_utils_dump.c: tiny C program that dumps pac_utils.h JS as a
  JS source string (const PAC_UTILS_JS) into web/pac_utils.js
- Makefile targets pac_utils_dump and pac_utils_js
- web/pac_utils.js: generated file, checked in so the app works without
  a build step

Also adds .github/workflows/deploy-pages.yml to publish the app to
GitHub Pages on every push to main that touches web/ or pac_utils.h.
Enable Pages (source: GitHub Actions) in repo settings to activate.
@manugarg manugarg changed the title Add web-based PAC file tester [webapp] Add web-based PAC file tester Feb 10, 2026
@manugarg manugarg merged commit febcc37 into main Feb 10, 2026
27 checks passed
@manugarg manugarg deleted the pactester_app branch February 10, 2026 06:50
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant