Node.js bindings for reqwest - Rust HTTP client library. This library provides support for system proxy and trusted system CA certificates without additional configuration. The build is made in a fashion that allows usage by Electron-based applications.
- mise for tool version management
- C++ development toolchain (required by Rust)
- Windows: Build Tools for Visual Studio
- macOS:
xcode-select --install - Linux: preinstalled
g++
- Docker Desktop for dev container (or OrbStack for macOS)
For native build run:
# Set GitHub token for mise tools installation (to avoid rate limits)
# <https://github.com/settings/personal-access-tokens/new?name=node_reqwest-env>
GITHUB_TOKEN=github_token_with_read_only_access_to_public_repositories
# Setup .env file (better to do that manually, but here is some automation)
[ -f .env ] || cp .env.example .env
grep -q "^GITHUB_TOKEN=" .env || echo "GITHUB_TOKEN=${GITHUB_TOKEN}" >> .env
mise trust # Trust the project
mise install # Install tools
mise test # Run testsYou can forcefully rerun tests with mise run -f t.
VSCode recommended extensions make development experience better. Check VSCode debug configurations for debugging and tasks for performance analysis.
To verify glibc compatibility or test in a clean environment, use VS Code Dev Containers extension to open the project directly in the container.
For manual Docker usage run:
# Setup .env file (better to do that manually, but here is some automation)
[ -f .env ] || cp .env.example .env
grep -q "^USER_UID=" .env || echo "USER_UID=$(id -u)" >> .env
grep -q "^USER_GID=" .env || echo "USER_GID=$(id -g)" >> .env
mise run docker # Build, run and attach to the container
mise test # Run the tests (inside the container)
exit # Exit and automatically stop the containerThe Docker environment includes mitmproxy
for inspecting HTTP/HTTPS traffic from the dev container.
The docker-compose.proxied.yaml is automatically merged by mise run docker.
To access the web UI:
# Set a known password
MITMPROXY_WEB_PASSWORD=example_password
# Add it to .env file
echo "MITMPROXY_WEB_PASSWORD=${MITMPROXY_WEB_PASSWORD}" >> .env
# Rebuild the container
mise run docker
# Access the UI at: `http://127.0.0.1:8081/?token=${MITMPROXY_WEB_PASSWORD}`
open http://127.0.0.1:8081/?token=${MITMPROXY_WEB_PASSWORD}Use the clean script to reset the environment (and free up disk space):
mise run clean