Commit 90620b6
committed
[SEA-NodeJS] feat(kernel): support the explicit proxy ConnectionOption on the kernel backend
Map the public Thrift-shaped `ConnectionOptions.proxy`
(`{protocol, host, port, auth}`) onto the kernel napi binding's
`proxy?: string`, so the SAME proxy connection option that works on the
Thrift backend now also routes kernel/SEA traffic through a proxy.
`buildKernelProxyOptions` composes `protocol://[user:pass@]host:port`,
percent-encoding any `auth.{username,password}` into the URL userinfo so
credentials with reserved characters survive; the kernel parses the
userinfo off and applies it as proxy basic-auth. Wired into
`buildKernelConnectionOptions` alongside the TLS / HTTP option builders.
The regenerated napi contract (`native/kernel/index.d.ts`) carries the
new `proxy?: string` and `socketTimeoutMs?: number` fields exposed by the
kernel PR (databricks/databricks-sql-kernel#129).
Note: env-var proxying (`HTTPS_PROXY` / `HTTP_PROXY` / `NO_PROXY`) already
worked on the kernel backend (reqwest honours it natively); this adds the
*programmatic* path for callers who cannot set process env vars.
Verified end-to-end via mitmproxy against a live serverless warehouse:
explicit `proxy` option (no env var) routes all SEA calls through the
proxy; a dead proxy port fails the connection (proving the proxy is used).
Co-authored-by: Isaac1 parent 26be3be commit 90620b6
2 files changed
Lines changed: 72 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
176 | 188 | | |
177 | 189 | | |
178 | 190 | | |
| 191 | + | |
179 | 192 | | |
180 | 193 | | |
181 | 194 | | |
| |||
492 | 505 | | |
493 | 506 | | |
494 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
495 | 531 | | |
496 | 532 | | |
497 | 533 | | |
| |||
501 | 537 | | |
502 | 538 | | |
503 | 539 | | |
504 | | - | |
| 540 | + | |
| 541 | + | |
505 | 542 | | |
506 | 543 | | |
507 | 544 | | |
| |||
517 | 554 | | |
518 | 555 | | |
519 | 556 | | |
| 557 | + | |
| 558 | + | |
520 | 559 | | |
521 | 560 | | |
522 | 561 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments