Skip to content
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

proxy issue: log in time out #117

Closed
shaoxul opened this issue Feb 12, 2019 · 6 comments
Closed

proxy issue: log in time out #117

shaoxul opened this issue Feb 12, 2019 · 6 comments
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@shaoxul
Copy link

shaoxul commented Feb 12, 2019

Dear friends,

For the sake of the gateway firewall, the http proxy must be used to connect internet.
But the log-in always times out. It looks like to try to connect to the leetcode server directly instead of through the proxy.

Is there any configuration I missed?

@jdneo
Copy link
Member

jdneo commented Feb 12, 2019

@shaoxul Hmm, I have not met this problem before. But just found that the VS Code has proxy related settings. Maybe you can have a try?

image

@shaoxul
Copy link
Author

shaoxul commented Feb 12, 2019

@jdneo Thank you for your reply. Yes, I tried, but it works for the VS code itself(e.g. extension market), but not works for this this extension.

@jdneo
Copy link
Member

jdneo commented Feb 12, 2019

So far, I have no idea what I can do for your problem...

Need some more investigation here...

@MiloJason
Copy link

@shaoxul I have met the same problem as you.

@jdneo jdneo added the help wanted Extra attention is needed label Feb 13, 2019
@RaymondZuo301
Copy link

same problem

edvardchen pushed a commit to edvardchen/vscode-leetcode that referenced this issue Feb 21, 2019
…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 pushed a commit to edvardchen/vscode-leetcode that referenced this issue Feb 22, 2019
…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?
@jdneo jdneo added this to the 0.11.0 milestone Feb 22, 2019
@jdneo jdneo added the bug Something isn't working label Feb 22, 2019
@jdneo
Copy link
Member

jdneo commented Feb 24, 2019

@edvardchen Provided a solution in #147.

Root Cause

The root cause is that when we trigger a leetcode-cli command, we will spawn a new child_process to send the request, which may bypass the proxy setting in VS Code.

Solution

So, we need to read the proxy setting of VS Code. and set it in the created child_process.

New Behavior

Now the extension should honor the proxy setting in VS Code

More details can be found in #147. And the fix will be released in 0.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants