Skip to content

Using proxy

Max Melentiev edited this page Jan 5, 2020 · 1 revision

SOCKS

It's only possible to setup SOCKS proxy for all TCP connections at once.

# Gemfile
gem 'socksify', require: false

# config/initializers/socksify.rb
if ENV['SOCKS_SERVER']
  require 'socksify'
  TCPSocket.socks_server = ENV['SOCKS_SERVER']
  TCPSocket.socks_port = ENV['SOCKS_PORT']
  TCPSocket.socks_username = ENV['SOCKS_USERNAME']
  TCPSocket.socks_password = ENV['SOCKS_PASSWORD']
end

See discussions more details.

Clone this wiki locally