Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pass http proxy as env to command (fix #136, #117)#147

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jdneo merged 4 commits intoLeetCode-OpenSource:masterfromedvardchen:fix-proxy-issue
Feb 24, 2019

Conversation

edvardchen
Copy link
Contributor

We use leetcode-cli and leetcode-cli uses request to call LeetCode web API.
It's lucky that request respects the http proxy env variables(http_proxy, https_proxy),
so all we need to do is passing proxy as env variable http_proxy to every command.

TODO: do we need to set https_proxy for https request?

@jdneo
Copy link
Member

jdneo commentedFeb 22, 2019
edited
Loading

Thank you@edvardchen for contribution.

So Is this PR aimed to fix#117 &#136

…ode-OpenSource#117)We use leetcode-cli and leetcode-cli uses request to call LeetCode web API.It's lucky that request respects the http proxy env variables(http_proxy, https_proxy),so all we need to do is passing proxy as env variable http_proxy to every command.TODO: do we need to set https_proxy for https request?
@edvardchen
Copy link
ContributorAuthor

Yes.

@jdneo
Copy link
Member

@edvardchen Awesome, I'll take a look later, thanks!

@jdneojdneo self-requested a reviewFebruary 22, 2019 01:51
@jdneojdneo added this to the0.11.0 milestoneFeb 22, 2019
@jdneo
Copy link
Member

Hi@edvardchen

What will happen if we don't set https_proxy for https request

@edvardchen
Copy link
ContributorAuthor

request will use http_proxy as fallback

@edvardchen
Copy link
ContributorAuthor

Because vscode user setting doesn't have a https.proxy option, so we should not worry about it.

}

// clone process.env and add http proxy
export function createEnvOption(): {} {
Copy link
Member

Choose a reason for hiding this comment

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

Looks like cpUtils.ts is a better place to put this method?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Sure. I'll move it there.

Copy link
Member

@jdneojdneo left a comment

Choose a reason for hiding this comment

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

LGTM

@jdneojdneo merged commit06e33d2 intoLeetCode-OpenSource:masterFeb 24, 2019
@jdneo
Copy link
Member

@edvardchen Thank you for your contribution!

@jdneojdneo mentioned this pull requestFeb 24, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jdneojdneojdneo approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
0.11.0
Development

Successfully merging this pull request may close these issues.

2 participants
@edvardchen@jdneo

[8]ページ先頭

©2009-2025 Movatter.jp