You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kernel backend: route each destination with Go's NO_PROXY rules #611
On the kernel backend, NO_PROXY from the environment is applied with the kernel's matching rules for every host other than the warehouse, so routing can differ from the Thrift path. The kernel backend should make Go's own routing decision (http.ProxyFromEnvironment) for each destination: the warehouse, CloudFetch storage and OAuth hosts.
The driver passes the kernel a single proxy URL plus a bypass list translated from NO_PROXY. The kernel matches that list by host name only: a domain entry also matches its subdomains, and there are no port-specific entries. The warehouse always follows Go's exact decision; other hosts get the closest kernel equivalent:
.example.net bypasses only subdomains in Go, but also example.net itself on the kernel path.
host:port entries are port-specific in Go. On the kernel path they're kept only for port 443 (storage and OAuth hosts) and dropped otherwise.
An entry that would wrongly bypass a proxied warehouse under the kernel's rules is dropped, so another host can lose a bypass the user intended.
An http:// warehouse proxied through HTTP_PROXY makes the other hosts (https) use HTTP_PROXY too, where Thrift would use HTTPS_PROXY.
Some of these cases also change routing for plain HTTP(S) proxies, not only SOCKS. CONNECTION_PARAMETERS.md documents them.
What's needed
A way for the driver to decide the proxy per destination through the shared kernel transport, for example a per-request proxy resolver in the kernel's C API (databricks/databricks-sql-kernel), failing closed when the driver selects an unsupported proxy.
The driver then routes every kernel destination with http.ProxyFromEnvironment. That also makes it possible to reject an env socks4:///socks4a:// proxy only for a destination that actually selects it.
The existing proxy test tables should assert the resulting proxy/direct decision for each destination.
Context: #607 (review discussion on kernel_config.go).
Activity