Skip to content

Support overriding DNS with resolve option - #8

Open
strzibny wants to merge 2 commits into
mainfrom
resolved-ips
Open

strzibny wants to merge 2 commits into
mainfrom
resolved-ips

Conversation

@strzibny

@strzibny strzibny commented Sep 18, 2026

Copy link
Copy Markdown

Support overriding DNS resolution that wreq itself already supports.

Example:

client = Wreq::Client.new(
  resolve: {
    "example.com" => "127.0.0.1",                       # one address
    "api.example.com" => ["10.0.0.1", "10.0.0.2"],      # tried in order
  }
)

resp = client.get("https://example.com/")  # connects to 127.0.0.1:443

This can be helpful when DNS is already resolved as part of a security check.

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.

1 participant