# How to use GoProxies in Ruby?

## Using Ruby to Route Traffic Via GoProxies

In this guide, you'll learn how to utilize Ruby for sending traffic through GoProxies. Follow the steps below to efficiently manage your network traffic

Below you will find a straightforward example of sending a request through GoProxies in Ruby:

```
require 'uri'
require 'net/http'

uri = URI.parse('http://ipinfo.io')
proxy = Net::HTTP::Proxy('proxy.goproxies.com', 1080, 'customer-USERNAME-country-au', 'PASSWORD')

req = Net::HTTP::Get.new(uri)

result = proxy.start(uri.host, uri.port) do |http|
    http.request(req)
end

puts result.body
```

\
Congratulations! You have successfully sent a request through our proxy. To change the country, select a different country code in ISO 3166-1 alpha-2 format, like GB or DE.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.goproxies.com/proxies/integrations/how-to-use-goproxies-in-ruby.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
