Because of china GFW, I should use http proxy or socket proxy with google services.
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.