Page MenuHomePhabricator

Yandex module must support proxy for contacting yandex API
Closed, ResolvedPublic1 Estimate Story Points

Description

If cxserver is running on private IP, it need a proxy with public IP to contact yandex MT API server.

See https://github.com/request/request#proxies

Details

Related Gerrit Patches:
mediawiki/services/cxserver : masterMT: Support proxy for Yandex

Event Timeline

santhosh created this task.Jan 26 2015, 6:48 PM
santhosh raised the priority of this task from to Medium.
santhosh updated the task description. (Show Details)
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 26 2015, 6:48 PM

Just setting some environment variables seems to be easy way to handle this. Someone should test that it actually works, though.

If there is a better approach, let's avoid using environment variables please. Services should have as clean as possible an environment.

Okay then. It looks like we can also do request.defaults( { proxy: 'http://localproxy.com '} ) and read the proxy variable from config file. It's a normal http proxy right?

Yes. After a talk with @csteipp it is quite possible that we will have a whitelist of hostnames that can be accessed but yes, otherwise it is a normal http forward proxy

santhosh raised the priority of this task from Medium to High.Feb 4 2015, 11:13 AM
santhosh added a project: LE-Sprint-82.

Yandex translate API URL is https://translate.yandex.net

@akosiaris Do you need to setup a new http forward proxy or is it possible to whitelist this address in one existing proxy?

@santhosh . We do have a HTTP forward proxy, but that is beside the point. My point is whether cxserver supports fetching URLs via a proxy and if it does what is the configuration knob to turn that support on.

@akosiaris , we will do the necessary code change to support proxy very soon.

Amire80 renamed this task from Yandex module should support proxy for contacting yandex API to Yandex module must support proxy for contacting yandex API.Feb 4 2015, 1:24 PM

Much appreciated @santhosh, thanks!

gerritbot added a subscriber: gerritbot.

Change 188753 had a related patch set uploaded (by Santhosh):
MT: Support proxy for Yandex

https://gerrit.wikimedia.org/r/188753

Patch-For-Review

santhosh claimed this task.Feb 5 2015, 6:25 AM
santhosh moved this task from Backlog to In Progress on the LE-Sprint-82 board.Feb 5 2015, 7:16 AM
santhosh moved this task from In Progress to In Review on the LE-Sprint-82 board.

Change 188753 merged by jenkins-bot:
MT: Support proxy for Yandex

https://gerrit.wikimedia.org/r/188753

KartikMistry moved this task from In Review to Done on the LE-Sprint-82 board.Feb 6 2015, 12:26 PM
KartikMistry closed this task as Resolved.Feb 10 2015, 11:54 AM
Pginer-WMF edited a custom field.Feb 24 2015, 2:20 PM