Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Using HTTP_PROXY env variable
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Anatol Pomozov  
View profile  
 More options Jul 5 2007, 4:32 am
From: Anatol Pomozov <anatol.pomo...@gmail.com>
Date: Thu, 05 Jul 2007 08:32:51 -0000
Local: Thurs, Jul 5 2007 4:32 am
Subject: Using HTTP_PROXY env variable
Hi.

I am just trying buidr and it looks really nice, especially after 2
days of fighting with some old maven bugs.

And as first step in learning buildr I would like to add a small
patch. It is concerning HTTP_PROXY env variable.

A lot of programs use this variable as a default proxy url. For
example RubyGems. So I no need to pass any options to this program.
Also I expect that other programs would use the variable. And I mean
build here.

Of course we could do
Buildr.options.proxy.http = ENV['HTTP_PROXY']

but we are talking about reducing amount of work for developer. Aren't
we?

So here is a patch (also without the patch test are fail for me).

Index: lib/core/common.rb
===================================================================
--- lib/core/common.rb  (revision 259)
+++ lib/core/common.rb  (working copy)
@@ -52,7 +52,7 @@
     # For example:
     #   options.proxy.http = "http://proxy.acme.com:8080"
     def proxy()
-      @proxy ||= Struct.new(:http).new(nil)
+      @proxy ||= Struct.new(:http).new(ENV['HTTP_PROXY'] ||
ENV['http_proxy'])
     end

   end


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Assaf Arkin  
View profile  
 More options Jul 5 2007, 2:45 pm
From: "Assaf Arkin" <as...@labnotes.org>
Date: Thu, 5 Jul 2007 11:45:31 -0700
Local: Thurs, Jul 5 2007 2:45 pm
Subject: Re: Using HTTP_PROXY env variable

Thanks, I'm adding this to 1.2.

Assaf

On 7/5/07, Anatol Pomozov <anatol.pomo...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anatol Pomozov  
View profile  
 More options Jul 9 2007, 11:37 pm
From: Anatol Pomozov <anatol.pomo...@gmail.com>
Date: Tue, 10 Jul 2007 03:37:46 -0000
Local: Mon, Jul 9 2007 11:37 pm
Subject: Re: Using HTTP_PROXY env variable
There is one thing that I just remembered.

Project could have dependency to many repositories, among them
external (internet) repos. Other type is internal (intranet) repo.

repositories.remote << "http://internal-dev-server/mvn-repository/"
#inrenal repo
repositories.remote << "http://www.ibiblio.org/maven2/" #external one

And for accessing internal repos you have not to use proxy. It mean
that we need to configure proxy per-repository, or at least swith off
proxy for some repos. Something like this

#example of possible proxy configuration syntax
repositories.remote << {:url => "http://internal-dev-server/mvn-
repository/", :proxy => false} #inrenal repo
repositories.remote << {:url => "http://www.ibiblio.org/
maven2/", :proxy => "http://proxy.company.com:8765"} #repo with proxy

On 5 июл, 22:45, "Assaf Arkin" <a...@labnotes.org> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anatol Pomozov  
View profile  
 More options Jul 10 2007, 9:01 am
From: Anatol Pomozov <anatol.pomo...@gmail.com>
Date: Tue, 10 Jul 2007 13:01:13 -0000
Local: Tues, Jul 10 2007 9:01 am
Subject: Re: Using HTTP_PROXY env variable
Another option is setup list of excluded addresses, like maven does. I
even like it more.

Configuration would look like

options.proxy.skip_hosts << "internal-server.mycompany.com" #skip by
adress
options.proxy.skip_hosts << /10\.192\.33\.\d+/ #or by regexp that
matched non-proxied addresses

On Jul 10, 7:37 am, Anatol Pomozov <anatol.pomo...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Assaf Arkin  
View profile  
 More options Jul 10 2007, 1:39 pm
From: "Assaf Arkin" <as...@labnotes.org>
Date: Tue, 10 Jul 2007 10:39:42 -0700
Local: Tues, Jul 10 2007 1:39 pm
Subject: Re: Using HTTP_PROXY env variable

On 7/10/07, Anatol Pomozov <anatol.pomo...@gmail.com> wrote:

> Another option is setup list of excluded addresses, like maven does. I
> even like it more.

> Configuration would look like

> options.proxy.skip_hosts << "internal-server.mycompany.com" #skip by
> adress
> options.proxy.skip_hosts << /10\.192\.33\.\d+/ #or by regexp that
> matched non-proxied addresses

I think exclusion is a better idea. That way, you just worry about the list
of repositories for each project, and can specify all the exclusions in one
place (e.g. your home directory buildr.rb file).

We can use glob patterns, so *.mycompany.com will exclude all hosts in the
domain.

Assaf

On Jul 10, 7:37 am, Anatol Pomozov <anatol.pomo...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Assaf Arkin  
View profile  
 More options Jul 10 2007, 11:01 pm
From: "Assaf Arkin" <as...@labnotes.org>
Date: Tue, 10 Jul 2007 20:01:51 -0700
Local: Tues, Jul 10 2007 11:01 pm
Subject: Re: Using HTTP_PROXY env variable

First cut is in SVN. You can do something like:

options.proxy.exclude << "internal-server.mycompany.com"
options.proxy.exclude << "*.mycompany.com"

Let me know if it works.

Assaf

On 7/10/07, Anatol Pomozov <anatol.pomo...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anatol Pomozov  
View profile  
 More options Jul 11 2007, 3:11 am
From: Anatol Pomozov <anatol.pomo...@gmail.com>
Date: Wed, 11 Jul 2007 07:11:38 -0000
Local: Wed, Jul 11 2007 3:11 am
Subject: Re: Using HTTP_PROXY env variable
Thanks Assaf.

It works fine. (and don't forget to add a line to documentation about
proxy exclusion)

On Jul 11, 7:01 am, "Assaf Arkin" <a...@labnotes.org> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Assaf Arkin  
View profile  
 More options Jul 11 2007, 1:10 pm
From: "Assaf Arkin" <as...@labnotes.org>
Date: Wed, 11 Jul 2007 10:10:22 -0700
Local: Wed, Jul 11 2007 1:10 pm
Subject: Re: Using HTTP_PROXY env variable

On 7/11/07, Anatol Pomozov <anatol.pomo...@gmail.com> wrote:

> Thanks Assaf.

> It works fine. (and don't forget to add a line to documentation about
> proxy exclusion)

Will do. I'm also thinking of adding a NO_PROXY environment variable that
takes a comma separated list of hosts.

Assaf

On Jul 11, 7:01 am, "Assaf Arkin" <a...@labnotes.org> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google