Re: [vagrant-up] Vagrant::Util::Downloader class support for proxy

2016-10-24 Thread Budh Ram
On Tue, Oct 18, 2016 at 1:42 PM, Alvaro Miranda Aguilera 
wrote:

> the tools used in vagrant use the standard variables,
>
> so you can test in the following way:
>
>  set the variables outside vagrant
>
>
> the variables are
>
>
> http_proxy=http://user:pass@server:port
> https_proxy=http://user:pass@server:port
> HTTP_PROXY=http://user:pass@server:port
> HTTPS_PROXY=http://user:pass@server:port
>
> if you use windows/cmd
>
> set variable=content
>
> for bash/linux/osx
>
> export variable=content
>
>
Thanks for the reply. But I think is for general use through Vagrant
command line.

I am talking here about the code perspective of this class [1]

How can I use this class to download url using Vagrant::Util::Downloader
class? I believe it uses curl [2] to download.

But couldn't find the way to use proxy details.


[1]
https://github.com/mitchellh/vagrant/blob/master/lib/vagrant/util/downloader.rb#L14
[2]
https://github.com/mitchellh/vagrant/blob/master/lib/vagrant/util/downloader.rb#L181


>
>
>
> On Tue, Oct 18, 2016 at 9:12 AM, Budh Ram 
> wrote:
>
>> Hi Folks,
>>
>> I have a use case where I am using Vagrant native downloader to download
>> a file from url to some location locally in developing a plugin [1].
>>
>> Now, I have requirement where my workstation doesn't have any internet
>> access except to proxy server.
>>
>> As I remember, curl support proxy as answered here [2] :
>>
>> curl http://www.example.com --proxy http://125.119.175.48:8909
>>
>>
>> Can I achieve similar thing with `Vagrant::Util::Downloader` utility
>> class?
>>
>>
>> [1] https://github.com/projectatomic/vagrant-service-manager
>> /blob/master/lib/vagrant-service-manager/binary_
>> handlers/binary_handler.rb#L65
>> [2] http://stackoverflow.com/a/27837460/1120530
>>
>>
>> Thanks
>> Budh Ram
>>
>> --
>> This mailing list is governed under the HashiCorp Community Guidelines -
>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>> violation of those guidelines may result in your removal from this mailing
>> list.
>>
>> GitHub Issues: https://github.com/mitchellh/vagrant/issues
>> IRC: #vagrant on Freenode
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Vagrant" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to vagrant-up+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/vagrant-up/c0eff2cc-624d-4fe4-b115-b10387da2adb%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Alvaro
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/vagrant-up/CAHqq0ez9yrVuAb_g_q3RJeBMR12M1iEz5-rTOj_nP%
> 3D98nwys_g%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Regards,
Budh Ram Gurung

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vagrant-up+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CACLS%3D%2BcexdHWy4V-tc%3DkcQ1tfi1eAg4i4kTURvyFO8pGzmUvmQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [vagrant-up] Vagrant::Util::Downloader class support for proxy

2016-10-18 Thread Alvaro Miranda Aguilera
the tools used in vagrant use the standard variables,

so you can test in the following way:

 set the variables outside vagrant


the variables are


http_proxy=http://user:pass@server:port
https_proxy=http://user:pass@server:port
HTTP_PROXY=http://user:pass@server:port
HTTPS_PROXY=http://user:pass@server:port

if you use windows/cmd

set variable=content

for bash/linux/osx

export variable=content




On Tue, Oct 18, 2016 at 9:12 AM, Budh Ram 
wrote:

> Hi Folks,
>
> I have a use case where I am using Vagrant native downloader to download a
> file from url to some location locally in developing a plugin [1].
>
> Now, I have requirement where my workstation doesn't have any internet
> access except to proxy server.
>
> As I remember, curl support proxy as answered here [2] :
>
> curl http://www.example.com --proxy http://125.119.175.48:8909
>
>
> Can I achieve similar thing with `Vagrant::Util::Downloader` utility class?
>
>
> [1] https://github.com/projectatomic/vagrant-service-
> manager/blob/master/lib/vagrant-service-manager/binary_handlers/binary_
> handler.rb#L65
> [2] http://stackoverflow.com/a/27837460/1120530
>
>
> Thanks
> Budh Ram
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/vagrant-up/c0eff2cc-624d-4fe4-b115-b10387da2adb%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Alvaro

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vagrant-up+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0ez9yrVuAb_g_q3RJeBMR12M1iEz5-rTOj_nP%3D98nwys_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.