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

Hope work with http proxy #3

Open
tinytub opened this issue Mar 7, 2017 · 2 comments
Open

Hope work with http proxy #3

tinytub opened this issue Mar 7, 2017 · 2 comments

Comments

@tinytub
Copy link

tinytub commented Mar 7, 2017

Because of china GFW, I should use http proxy or socket proxy with google services.

I try to set export https_proxy=http://127.0.0.1:8888;export http_proxy=http://127.0.0.1:8888 (my system proxy path) in script filter ,but it not work.

I try the translate script in cmdline with "export my proxy", but it also not work and return

./translate.js en zh-CN queue 简体中文

(node:4499) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: connect ETIMEDOUT 74.125.204.102:443

So I realized the script didn't use my proxy.

My proxy works fine with curl or git (github also blocked by GFW) in cmd line. may be nodejs has other way to use proxy?

I don't know how to code with nodejs, hope you can help .

thanks.

@zetavg
Copy link
Owner

zetavg commented Jun 8, 2017

Sorry for the (very) late reply, but in case that you're still stuck in this problem (or for anyone that found this with the same problem), I'll try to leave some information that I know (and update them if I learned more) :)



The internet connection to Google Translate is handled by (wrapped side) the google-translate-api package, and google-translate-api uses got. There is an example on using got with proxies, but it seems that you need to modify the source code in google-translate-api to get things working.

@zetavg
Copy link
Owner

zetavg commented Apr 4, 2019

https://github.com/liuxing87327/alfred-google-translate-workflow

使用translation.js插件翻译,解决原版无法在大陆使用的问题

This might work under GFW :)

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

No branches or pull requests

2 participants