RB
Languages & HTTP Clients
Ruby (Net::HTTP) proxy integration
Ruby's standard Net::HTTP supports proxies through Net::HTTP.new with proxy host, port, user, and password arguments. This routes your Ruby requests through Aethyn residential IPs without extra gems.
Setup steps
- 1Use Net::HTTP.new with proxy host, port, user, and password.
- 2Build the request and call request on the proxied connection.
- 3Embed targeting suffixes in the proxy username.
- 4Wrap in start for connection reuse.
Code
Net::HTTP with proxy
require 'net/http'
require 'uri'
uri = URI('https://httpbin.org/ip')
http = Net::HTTP.new(uri.host, uri.port,
'proxy.aethyn.io', 2099,
'aethyn-XXXXX-country-us', 'PASSWORD')
http.use_ssl = true
puts http.get(uri.request_uri).bodyReplace aethyn-XXXXX and PASSWORD with your dashboard credentials. See the full targeting reference and protocol/port list.
Tips
- Set use_ssl = true for HTTPS targets.
- Reuse the http object inside a start block for multiple requests.
- For higher-level needs, the Faraday or HTTParty gems accept the same proxy.
Ruby (Net::HTTP) proxy FAQ
Do I need a gem for proxies in Ruby?
No. The standard library Net::HTTP accepts proxy host, port, username, and password directly. Gems like Faraday are optional conveniences.
Docs, solutions & blog
Premium residential proxiesCost-efficient rotating residential pool from €2.00/GB for bulk scraping and monitoring.Elite residential proxiesCurated high-trust pool with city and ISP targeting for hard anti-bot targets.Quickstart docsCredentials, endpoints, and your first proxied request.Proxy glossaryPlain-English definitions for residential proxies, rotation, anti-bot, and scraping terms.