Skip to content

Conversation

@RatnaKumarTR
Copy link

Split Evaluator

What did you accomplish?

Added comprehensive HTTP/HTTPS proxy support to Split.io Evaluator, enabling deployment in corporate environments with network restrictions.

Key Features Implemented:

  • Universal Proxy Detection: Supports all standard environment variables (HTTPS_PROXY, HTTP_PROXY, https_proxy, http_proxy)
  • Environment Variable Priority: Follows established conventions (HTTPS_PROXY > https_proxy > HTTP_PROXY > http_proxy)
  • Graceful Error Handling: Works with or without https-proxy-agent package, providing clear warnings
  • Backward Compatibility: Zero breaking changes for existing deployments
  • Docker Support: Proper package management for containerized environments
  • NO_PROXY Infrastructure: Foundation for domain bypass functionality
    Technical Changes:
  1. Enhanced sdk.js with proxy detection and configuration logic
  2. Updated package.json to include https-proxy-agent as a dependency
  3. Added comprehensive unit tests (14 test cases, all passing)
  4. Created documentation for usage and troubleshooting

How do we test the changes introduced in this PR?

npm test tests/proxy.test.js

Extra Notes

This implementation resolves timeout issues when deploying Split.io Evaluator in corporate environments with proxy restrictions. Previously, the evaluator could not connect to Split.io APIs (sdk.split.io, auth.split.io, events.split.io) due to network restrictions.

Implementation Approach:

  • Standards Compliant: Uses established proxy environment variable conventions
  • Production Ready: Comprehensive error handling and logging
  • Enterprise Friendly: Enables deployment in restricted network environments
  • Open Source Ready: Clean, well-documented code suitable for upstream contribution

- Integrated `https-proxy-agent` for corporate proxy configuration in sdk.js.
- Updated Dockerfile to install necessary packages and set up user permissions.
- Modified package.json and package-lock.json to include `https-proxy-agent` dependency.
- Add automatic proxy detection using standard environment variables
- Support HTTPS_PROXY, HTTP_PROXY, https_proxy, http_proxy
- Move https-proxy-agent to optional dependencies
- Enhance settings with proxy configuration while maintaining backward compatibility
- Add comprehensive documentation and unit tests for proxy functionality
@RatnaKumarTR RatnaKumarTR requested a review from a team as a code owner September 22, 2025 06:35
@RatnaKumarTR RatnaKumarTR reopened this Sep 22, 2025
@RatnaKumarTR RatnaKumarTR reopened this Sep 22, 2025
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