Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

Add proxy support in kpm #324

Merged
merged 1 commit into from
Jun 17, 2014
Merged

Add proxy support in kpm #324

merged 1 commit into from
Jun 17, 2014

Conversation

ChengTian
Copy link
Contributor

  • Add proxy option to "kpm restore" subcommand
  • "kpm restore" uses global proxy (http_proxy env var) by default

parent #215

@ChengTian
Copy link
Contributor Author

You can specify proxy address with http_proxy environment variable or

kpm restore -p|--proxy <ADDRESS>

I set up a proxy server with Azure VM and verified that when you specify a proxy, the http requests do go through the proxy. However, I couldn't find a easy way to simulate the environment where myget.org/nugt.org blocks my direct access and I can only use a proxy to do kpm restore.

@swimtver @shaunxu could you guys please help to verify my fix in your environment?

@davidfowl
Copy link
Member

@ChengTian what about authenticated proxies? You can set one up using fiddler (it has support for doing that). We might need to support something like http://user:password@...

@ChengTian
Copy link
Contributor Author

@davidfowl , added support for authenticated proxies and tested with fiddler.

@@ -54,6 +54,7 @@ public int Main(string[] args)
CommandOptionType.MultipleValue);
var optFallbackSource = c.Option("-f|--fallbacksource <FEED>",
"A list of packages sources to use as a fallback", CommandOptionType.MultipleValue);
var optProxy = c.Option("-p|--proxy <ADDRESS>", "The http proxy used when retrieving packages", CommandOptionType.SingleValue);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http --> HTTP

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And used --> to use

@ChengTian
Copy link
Contributor Author

Improved based on feedbacks. @Eilon @davidfowl , please sign off if it's Ok.

@Eilon
Copy link
Member

Eilon commented Jun 17, 2014

:shipit:

1 similar comment
@davidfowl
Copy link
Member

:shipit:

- Add proxy option to "kpm restore" subcommand
- "kpm restore" uses global proxy (http_proxy env var) by default
- Add support for authenticated proxies
@ChengTian ChengTian merged commit 243c045 into dev Jun 17, 2014
@ChengTian ChengTian deleted the add-proxy-support-in-kpm branch June 17, 2014 21:48
@sleemer
Copy link

sleemer commented Mar 10, 2015

@ChengTian in my enviroment it doesn't work.
What I found out is when using UriBuilder we couldn't specify domain user name (for example 'company.com\username:password' or '[email protected]:password')

@ChengTian
Copy link
Contributor Author

@sleemer , thank you for reporting the problem.

I created an issue at #1364. Next time when you want to report any problem, please create an issue at https://github.com/aspnet/DNX/issues. Thank you for your contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants