Skip to content

feat(adapters): support explicit proxy configuration - #51

Merged
leonkenneth merged 2 commits into
mainfrom
feat/adapter-proxy-option
Aug 27, 2026
Merged

feat(adapters): support explicit proxy configuration#51
leonkenneth merged 2 commits into
mainfrom
feat/adapter-proxy-option

Conversation

@leonkenneth

Copy link
Copy Markdown
Contributor

Summary

  • Add a proxy client option, threaded through to the Faraday, httpx, and net/http adapters.
  • Passing a URI string forces a specific proxy; passing false disables proxying (including HTTP_PROXY/HTTPS_PROXY env auto-detection) for a fixed, trusted base_url.
  • Leaving proxy unset preserves each adapter's existing default behavior (Faraday and net/http auto-detect from env; httpx never does).

Test plan

  • bundle exec rspec
  • bundle exec rubocop
  • bundle exec srb tc

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

https://claude.ai/code/session_01T1xdiN28Drqsrh3rET88kW

Add a `proxy` client option that is threaded through to the Faraday,
httpx, and net/http adapters. Passing a URI string forces a specific
proxy; passing `false` disables proxying (including env-based
auto-detection) for a fixed, trusted `base_url`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T1xdiN28Drqsrh3rET88kW
@albert20260301

Copy link
Copy Markdown
Contributor

Required: the Ruby 3.2 job is still failing. HTTPX exposes an anonymous wrapper class on that runtime, so the assertion on client.class.to_s fails even when the proxy plugin is configured.

Please replace that class-name assertion with an observable proxy configuration or request-behavior assertion, then rerun CI before merging.

HTTPX's dynamically generated plugin classes only get a readable
to_s via Class#set_temporary_name, which is Ruby >= 3.4 only. On
Ruby 3.2/3.3 the class stays anonymous, so the proxy spec's
`client.class.to_s.include?("Plugins::Proxy")` assertion always
failed there, breaking CI. Check the client's actual proxy option
instead, which is version-independent.
@leonkenneth
leonkenneth merged commit 309aa8f into main Aug 27, 2026
7 checks passed
@leonkenneth
leonkenneth deleted the feat/adapter-proxy-option branch August 27, 2026 07:15
leonkenneth pushed a commit that referenced this pull request Aug 27, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.2.0](altertable/v1.1.2...altertable/v1.2.0)
(2026-08-27)


### Features

* **adapters:** support explicit proxy configuration
([#51](#51))
([309aa8f](309aa8f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants