Commit 7c2e308
authored
feat(rust): add HTTP proxy support (#364)
## Summary
- Add HTTP/HTTPS proxy support to the Rust ADBC driver via 4 new config
parameters:
- `databricks.http.proxy.url` — proxy URL (overrides
`HTTP_PROXY`/`HTTPS_PROXY` env vars)
- `databricks.http.proxy.username` / `password` — authenticated proxy
support
- `databricks.http.proxy.bypass_hosts` — comma-separated hosts to skip
proxy
- All changes scoped to `DatabricksHttpClient::new()` — proxy applies to
all requests (SEA API, CloudFetch, OAuth)
- Includes design spec, unit tests, e2e tests, and a new `rust-e2e.yml`
CI workflow with Squid proxy sidecars
## Changes
### Core implementation (`rust/src/client/http.rs`)
- New `ProxyConfig` struct with `url`, `username`, `password`,
`bypass_hosts`
- Added `proxy` field to `HttpClientConfig`
- Updated `DatabricksHttpClient::new()` to conditionally configure
`reqwest::Proxy`
### Config parsing (`rust/src/database.rs`)
- `set_option` / `get_option_string` handlers for all 4 proxy parameters
### E2E tests (`rust/tests/proxy_e2e.rs`)
- `test_connection_through_proxy` — unauthenticated Squid proxy
- `test_connection_through_authenticated_proxy` — basic auth Squid proxy
- `test_proxy_bypass_hosts` — verifies bypass list skips proxy
### CI workflow (`.github/workflows/rust-e2e.yml`)
- New generic Rust e2e workflow (first job: proxy tests, extensible for
future e2e jobs)
- Squid service container (unauthenticated) + docker run step
(authenticated proxy with custom config)
- Squid access log verification to prove traffic actually routed through
proxy
## Test plan
- [x] Unit tests pass (`cargo test` — 236 passed)
- [x] Clippy clean (`cargo clippy --all-targets -- -D warnings`)
- [x] Format clean (`cargo +stable fmt --all`)
- [x] E2E/Proxy CI job passes (3 tests against real Databricks through
Squid proxies)
This pull request was AI-assisted by Isaac.1 parent 656960d commit 7c2e308
File tree
9 files changed
+1155
-7
lines changed- .github/workflows
- rust
- ci/proxy
- spec
- src
- client
- tests
9 files changed
+1155
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments