-
Notifications
You must be signed in to change notification settings - Fork 219
Description
Feature Request Add no_proxy support for selective proxy bypass
Motivation
Currently, when SVIX_PROXY_ADDR is configured, all outbound webhook requests are routed through the proxy. There's no way to configure exceptions for specific domains or IP ranges that should bypass the proxy.
This feature would align Svix with standard HTTP client proxy behavior and is commonly supported by tools like curl, wget, and most HTTP libraries through NO_PROXY environment variable support.
Use Case
It is common to use internal connection between components.
We may need to use svix webhook for an internal service hosted on the same k8s cluster where svix-server is running.
Proposal
Add support for a no_proxy configuration that allows specifying domains, IP addresses, or CIDR ranges that should bypass the proxy, similar to the standard NO_PROXY environment variable used by many HTTP clients.
Environment variable:
SVIX_PROXY_ADDR="http://proxy.example.com:8080"
SVIX_NO_PROXY="localhost,127.0.0.1,10.0.0.0/8,internal.company.com"Configuration file:
[proxy_config]
proxy_addr = "http://proxy.example.com:8080"
no_proxy = ["localhost", "127.0.0.1", "10.0.0.0/8", "internal.company.com", "*.internal"]Expected Behavior
- Requests to URLs matching
no_proxypatterns should connect directly - Requests to other URLs should continue using the configured proxy
- Support for:
- Exact domain matches (
internal.company.com) - Wildcard domain matches (
*.internal) - IP addresses (
127.0.0.1) - CIDR ranges (
10.0.0.0/8,192.168.0.0/16) - Port-specific matches (
localhost:8080)
- Exact domain matches (
Alternatives
So far to by pass the proxy we need to use non standard way that may introduce infrastructure complexity:
- Configure proxy server itself to handle no_proxy rules
- Use network-level routing
- Run multiple Svix instances (one with proxy, one without)