-
Notifications
You must be signed in to change notification settings - Fork 430
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
Support proxy network #8
Comments
I'm not sure what this would change would entail. It looks like this request would want to add something like: Similar issue: ytdl-org/youtube-dl#402 (comment) |
Yes, clasp need to add
I am using socks5 protocol, there are others like http, https. |
@hanguokai Can you add proxy rule to the URL |
Pull requests are welcome. |
I would also like to see a proxy option. |
I'm using clasp from a censored internet where all things Google are blocked and need the proxy feature. Using proxy environment variables doesn't work. |
Why doesn't using proxy environment variables not work? Every request goes through Does every application you use require a proxy feature? |
Aha, please look at the same issue for firebase command line tool firebase/firebase-tools#155 . Nearly 2 years and 81 comments! Under certain conditions, people can't connect internet directly. That's it. |
@grant Yes, all blocked domains and IP requires a VPN or proxy. It's very standard in places like China. |
Unfortunately G Suite and many of Google's services are blocked in China. I can't solve that issue. I'm guessing the Firebase tool would probably prefer to not be blocked too to solve that linked issue. I don't understand why environment variables don't work, do you really need every single tool you use to implement a custom Underneath it all, we use To implement this feature, I'd need:
To be honest, I have no use for this feature and still don't understand why you can't use a proxy elsewhere in the tech stack. |
Hello, I'm running through the same problem. I tried setting up my user variables with proxy settings, and I'm still receiving the error below: Is there a workaround for this issue? |
I'm in favor of adding a proxy option, but to be honest, I don't know how to run a proxy and I don't know why env variables don't work like in the
I did a bit more research.
This is the most upvoted issue, and it looks like user variables doesn't work, so I'm in favor of support this feature in |
Thanks for the reply!
I'll take a look at it. I work for a big company that enforces us to use a
proxy. That's why for us, having a way to support proxy is extremely
important. I don't need a specific solution as the --proxy option, but a
watever solution that works behind a proxy.
Best,
Luis
Gustavo
…On Mon, Aug 20, 2018 at 6:12 PM Grant Timmerman ***@***.***> wrote:
I'm in favor of adding a proxy option, but to be honest, I don't know how
to run a proxy and I don't know why env variables don't work like in the
googleapis README:
export HTTP_PROXY=http://localhost:3128
export http_proxy=http://localhost:3128
export https_proxy=http://localhost:3128
export HTTPS_PROXY=http://localhost:3128
I did a bit more research.
- If someone wants to try this, add a proxy variable to this line of
code: https://github.com/google/clasp/blob/master/src/auth.ts#L40
Then rebuild clasp and test it out, and it works, that'd be awesome.
Then I can update clasp to include this proxy param.
- If someone ***@***.*** <https://github.com/hanguokai>, @nepsilon
<https://github.com/nepsilon>) describes exact steps on how to
download a proxy, see the error in clasp using some tool, I'll try to
reproduce the problem and create a solution.
- If you need help with a pull request, or building clasp, LMK too.
This is the most upvoted issue, and it looks like user variables doesn't
work, so I'm in favor of support this feature in clasp, but I'll need
some help for this one.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AZEcdMhPAkxXsw_MGk1jHS4ONV_NjIlWks5uSzRkgaJpZM4Rfrqw>
.
|
Can you give me directions of how to build clasp locally for testing
purpose? Them if works, you can help me with the pull request.
Best,
Luis Gustavo
On Tue, Aug 21, 2018 at 8:10 AM Gustavo Valensuela <[email protected]>
wrote:
… Thanks for the reply!
I'll take a look at it. I work for a big company that enforces us to use a
proxy. That's why for us, having a way to support proxy is extremely
important. I don't need a specific solution as the --proxy option, but a
watever solution that works behind a proxy.
Best,
Luis
Gustavo
On Mon, Aug 20, 2018 at 6:12 PM Grant Timmerman ***@***.***>
wrote:
> I'm in favor of adding a proxy option, but to be honest, I don't know how
> to run a proxy and I don't know why env variables don't work like in the
> googleapis README:
>
> export HTTP_PROXY=http://localhost:3128
> export http_proxy=http://localhost:3128
> export https_proxy=http://localhost:3128
> export HTTPS_PROXY=http://localhost:3128
>
> I did a bit more research.
>
> - If someone wants to try this, add a proxy variable to this line of
> code: https://github.com/google/clasp/blob/master/src/auth.ts#L40
> Then rebuild clasp and test it out, and it works, that'd be awesome.
> Then I can update clasp to include this proxy param.
> - If someone ***@***.*** <https://github.com/hanguokai>, @nepsilon
> <https://github.com/nepsilon>) describes exact steps on how to
> download a proxy, see the error in clasp using some tool, I'll try to
> reproduce the problem and create a solution.
> - If you need help with a pull request, or building clasp, LMK too.
>
> This is the most upvoted issue, and it looks like user variables doesn't
> work, so I'm in favor of support this feature in clasp, but I'll need
> some help for this one.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#8 (comment)>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AZEcdMhPAkxXsw_MGk1jHS4ONV_NjIlWks5uSzRkgaJpZM4Rfrqw>
> .
>
|
@valen22br Follow these instructions https://github.com/google/clasp#develop |
@grant the instructions worked for me. I will start playing with the proxy settings and will let you know the results. |
I did some research about google-api-nodejs-client. It says it support proxy. But in fact, googleapis use axios as it's http client library that doesn't support socks proxies. So In theory, googleapis should support http/https proxy like PS: I know |
I don't know the difference between socks proxies and non-socks proxies. Will a non-socks proxy work? |
I don't know either.
It seems that we are going from a proxy error to some OpenSSL incompatibility. Do you have such OpenSSL error message before? |
Hi @grant , the call to the method client.getToken(authCode) at auth.ts was not able to provide a return. Do you know how to debug that method? |
I wrote a sample to test env variables for googleapis directly. I found googleapis itself has issue for supporting http(non-socks) proxy. Someone filed an issue here. Axios, googleapis use it as http client library, also has issue about http proxy. So when googleapis fixed http proxy issue, let's review this issue again in clasp. Currently, I use VPN as a workaround method. |
@hanguokai , good point in your research. My tests also revealed that apparently, the environment variables with proxy settings are working. The problem is when the clasp tries to use the token got from the authentication process to use it against the google API. In this step, it seems that someone, (Google API as you pointed) is messing around with https requests. I'll take a look at the links you provided. Can you explain your workaround using the VPN behind the corporate proxy? |
(I moved some off-topic comments to a separate thread to keep this about a proxy FR. See #297 (comment)) |
It seems googleapis fixed the problem with proxy. |
I'm in the process of upgrading the packages. |
Can you install the latest clasp, 1.6.1? LMK if it's fixed with the new |
I was able to |
OK, thanks. I'll remove the |
Tomorrow I will run some tests with a proxy configuration. |
@aakasaka I removed the check to |
I simply tested clasp 1.6.3 with login, logout, status, clone, pull and push commands. It seems Ok now for |
👍 Thanks for testing. |
Hi, @grant , could you provide a quick step by step tutorial on how to set up the proxy and use the clasp? I have been trying hours on figuring out this issue even after reading this,long discussion. The error I got is still showing "Error retrieving access token: FetchError: request to https://oauth2.googleapis.com/token failed, reason: connect ETIMEDOUT xxx:443" |
I solved this issue, as i had another problem here related to proxy - here is the story: I am on windows in a very restricted corporate enterprise which has to use an http and https proxy. So i defined these two env variables in cmd (you can also do it in git bash console, just replace "set" with "export"): this is the error i got: The solution to my problem was that our https proxy used an http address, so i fixed the set to the following : Hope i helped others here too |
To use proxy network, like http(s) or socks5, I use
http_proxy
andhttps_proxy
environment variable that are supported by many tools. Currently, clasp can't work in proxy environment, for exampleclasp login
andclasp clone
.The text was updated successfully, but these errors were encountered: