Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

Implementation Plan

  • Update createApp() function in src/app.js:

    • Accept httpProxy, httpsProxy, and noProxy properties in config
    • Validate that at least one of httpProxy or httpsProxy is provided
    • Implement logic to select the appropriate proxy based on target URL protocol
    • Implement noProxy filtering logic to bypass proxy for specified hosts
    • Remove proxyUri parameter
  • Update src/server.js:

    • Read http_proxy, https_proxy, and no_proxy environment variables
    • Parse no_proxy into an array
    • Pass new config properties to createApp()
    • Update validation logic
  • Create comprehensive tests:

    • Test httpProxy selection for http:// URLs
    • Test httpsProxy selection for https:// URLs
    • Test noProxy bypass for exact hostname matches
    • Test noProxy bypass for hostname:port matches
    • Test noProxy bypass for subdomain patterns (.example.com)
    • Test validation that requires at least one proxy
  • Update documentation in README.md:

    • Replace PROXY_URI with new environment variables
    • Document programmatic API changes
  • Run linter and formatter

  • Address code review feedback

    • Reverted unintended formatting changes to instruction file
  • Fix TypeScript build errors

  • Final security review with CodeQL

Summary

Successfully replaced PROXY_URI with standard proxy environment variables:

  • http_proxy - for HTTP requests
  • https_proxy - for HTTPS requests
  • no_proxy - comma-delimited list to bypass proxy

The implementation includes:

  • Full support for subdomain patterns (e.g., .example.com)
  • Hostname:port matching in the noProxy list
  • Protocol-based proxy selection
  • All tests passing
  • TypeScript build successful
  • No security issues found
Original prompt

Replace usage of PROXY_URI with these environment variables

  • http_proxy - the proxy server to use for requests that use the http protocol
  • https_proxy - the proxy server to use for requests that use the https protocol
  • no_proxy - a comma-delimited list of hostnames or hostname:port entries that should bypass using the configured proxy completely. If a hostname begins with a dot (.) then it applies to all subdomains. For instance .humanwhocodes.com applies to humanwhocodes.com, www.humanwhocodes.com, newsletter.humanwhocodes.com, etc.

Update createApp() so that it accepts corresponding properties:

  • httpProxy (string)
  • httpsProxy (string)
  • noProxy (string[])

Either httpProxy or httpsProxy are required.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 5 commits January 23, 2026 17:50
Co-authored-by: nzakas <38546+nzakas@users.noreply.github.com>
Co-authored-by: nzakas <38546+nzakas@users.noreply.github.com>
Co-authored-by: nzakas <38546+nzakas@users.noreply.github.com>
Co-authored-by: nzakas <38546+nzakas@users.noreply.github.com>
Co-authored-by: nzakas <38546+nzakas@users.noreply.github.com>
Copilot AI changed the title [WIP] Replace PROXY_URI with environment variables for proxy configuration Replace PROXY_URI with http_proxy, https_proxy, and no_proxy environment variables Jan 23, 2026
Copilot AI requested a review from nzakas January 23, 2026 17:57
@nzakas nzakas changed the title Replace PROXY_URI with http_proxy, https_proxy, and no_proxy environment variables feat!: Replace PROXY_URI with http_proxy, https_proxy, and no_proxy environment variables Jan 29, 2026
@nzakas nzakas marked this pull request as ready for review January 29, 2026 19:21
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot revert changes to this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Reverted in 240e0ab.

Co-authored-by: nzakas <38546+nzakas@users.noreply.github.com>
Copilot AI requested a review from nzakas January 29, 2026 19:25
@nzakas nzakas merged commit 9bcbaaa into main Jan 29, 2026
9 checks passed
@nzakas nzakas deleted the copilot/update-proxy-uri-usage branch January 29, 2026 20:04
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.

2 participants