Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configurability (and documentation) to environment model #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cluesque
Copy link

In my environment I want all TCPConnections to go through the proxy if they're bound for the real internet (say, paypal), but not if they're staying inside my firewalled net (memcached, etc.)

This allows that.

Environment variable PROXY_FILTER_LIST is a comma separated list of hosts (or IPs) to not use the proxy with
(e.g. '10.0.0.1,10.0.2.1')

Environment variable PROXY_FILTER_REGEXP is a regular expression, where if the host matches, it connects directly, not through the proxy
(e.g., '(10..*|localhost)')

Environment variable PROXY_FILTER_LIST is a comma separated list of hosts (or IPs) to not use the proxy with
  (e.g. '10.0.0.1,10.0.2.1')

Environment variable PROXY_FILTER_REGEXP is a regular expression, where if the host matches, it connects directly, not through the proxy
  (e.g., '(10\..*|localhost)')
@samuelkadolph
Copy link
Owner

I only planned on supporting the basic proxy environment variables (mainly from curl). I'm kind of against adding more unless they are widely used and do something substantial.

Did you just want this for ruby side? Because I could definitely imagine this.

require "proxifier/env"
TCPSocket.environment_no_proxy = proc { |host| host =~ /blah/ }

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.

2 participants