Skip to content

Add proxy support in kvm #80

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

Closed
wants to merge 3 commits into from
Closed

Conversation

ChengTian
Copy link
Contributor

  • Add proxy option to "kvm upgrade"
  • "kvm upgrade" uses global proxy (http_proxy env var) by default
  • Support authenticated proxies

parent aspnet/dnx#215

- Add proxy option to "kvm upgrade"
- "kvm upgrade" uses global proxy (http_proxy env var) by default
- Support authenticated proxies
@ChengTian ChengTian self-assigned this Jun 17, 2014
@@ -1,6 +1,7 @@
param(
[parameter(Position=0)]
[string] $command,
[string] $proxy = "",
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need to specify a default value here. Also, when checking you want to do

if (!$proxy) {
   $proxy = $env:http_proxy
}

@ChengTian
Copy link
Contributor Author

@pranavkm , thank you for the feedbacks. I just revised based on your suggestions and it looks much cleaner now 😄

@@ -135,6 +156,7 @@ param(

$wc = New-Object System.Net.WebClient
$wc.Credentials = new-object System.Net.NetworkCredential("aspnetreadonly", "4d8a2d9c-7b80-4162-9978-47e918c9658c")
Add-Proxy-If-Specified([ref]$wc)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not super sure if you need the [ref] here. If it works without it, might be cleaner to remove it. Also in theory you could do
Add-Proxy-If-Specified $wc (without the round brackets) and it should work. Not particularly important though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just tested and seems I don't need [ref] here. They are removed in latest commit.
I keep the round brackets for consistency with all other invocations in this file. But thank you for the hint, it's good for people new to PowerShell script like me 😄

@pranavkm
Copy link
Contributor

:shipit: if @glennc (or whoever's responsible for this repo) is fine with it.

@glennc
Copy link
Contributor

glennc commented Jun 18, 2014

This isn't where this change should be made. These changes should be done here: https://github.com/aspnet/KRuntime/blob/dev/setup/kvm.ps1

The file is checked in here after a build has taken the source from the kruntime and replaced things like the build number. It is put here as a temporary convenience until there is somewhere on the inter-webs that it can live. Does that make sense?

@glennc
Copy link
Contributor

glennc commented Jun 18, 2014

Otherwise the change looks fine :)

@ChengTian
Copy link
Contributor Author

@glennc , thank you for the explanation. I created a new PR aspnet/dnx#352. This one is closed.

@ChengTian ChengTian closed this Jun 18, 2014
@ChengTian ChengTian deleted the add-proxy-support-in-kvm branch June 18, 2014 17:39
natemcmaster pushed a commit that referenced this pull request Oct 17, 2018
See internal issue #80 about demands evaluation
natemcmaster pushed a commit that referenced this pull request Oct 17, 2018
natemcmaster pushed a commit that referenced this pull request Nov 9, 2018
ryanbrandenburg pushed a commit that referenced this pull request Nov 19, 2018
dougbu pushed a commit to dotnet-maestro-bot/AspNetCore that referenced this pull request Sep 11, 2019
Jesusdebug pushed a commit to Jesusdebug/aspnetcore that referenced this pull request May 23, 2024
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.

3 participants