You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

Nova Resource:Google-api-proxy/Documentation: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Kaldari
(more info)
imported>BryanDavis
(→‎Tools using the proxy: interwiki links)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''Google-api-proxy''' provides a static IP for communication with the [https://developers.google.com/custom-search/ Google Custom Search] search API.  
'''Google-api-proxy''' provides a static IP for communication with the [https://developers.google.com/custom-search/ Google Custom Search] API.  


== Usage ==
== Usage ==
Line 6: Line 6:


== How it works ==
== How it works ==
<code><nowiki>https://google-api-proxy.wmflabs.org</nowiki></code> is a [[Help:Proxy|Labs web proxy]] pointing at an [[Help:Instances|instance]] in the google-api-proxy project with a [[Help:Addresses|static IP address]]. The instance is running an [[w:Nginx|Nginx]] web server configured as a [[w:Reverse_proxy|reverse proxy]]. All HTTP requests sent to this proxy will be relayed to <code><nowiki>https://www.googleapis.com</nowiki></code> and the upstream response will be provided back to the requesting client. Details of the Nginx configuration are available [https://github.com/bd808/labs-google-api-proxy on GitHub].
<code><nowiki>https://google-api-proxy.wmflabs.org</nowiki></code> is a [[Help:Using a web proxy to reach Cloud VPS servers from the internet|Cloud VPS web proxy]] pointing at an [[Help:Instances|instance]] in the google-api-proxy project with a [[Help:Manage floating IP addresses assigned to Cloud VPS instances|static IP address]]. The instance is running an [[w:Nginx|Nginx]] web server configured as a [[w:Reverse_proxy|reverse proxy]]. All HTTP requests sent to this proxy will be relayed to <code><nowiki>https://www.googleapis.com</nowiki></code> and the upstream response will be provided back to the requesting client. Details of the Nginx configuration are available [[phab:source/operations-puppet/browse/production/modules/role/manifests/labs/google_api_proxy.pp|in our Puppet repo's role::labs::google_api_proxy module]].


API keys using this proxy will need to whitelist the IP address <code>208.80.155.245</code> in the Google developer console.
API keys using this proxy will need to whitelist the IP address <code>185.15.56.54</code> in the Google developer console.


[https://wikisource.org/wiki/Wikisource:Google_OCR Google OCR] for Wikisource uses a similar proxy at <code><nowiki>https://googlevision-api-proxy.wmflabs.org/</nowiki></code> that allows access to the Google Vision API.
[https://wikisource.org/wiki/Wikisource:Google_OCR Google OCR] for Wikisource uses a similar proxy at <code><nowiki>https://googlevision-api-proxy.wmflabs.org/</nowiki></code> that allows access to the Google Vision API.


== Tools using the proxy ==
== Tools using the proxy ==
* [https://tools.wmflabs.org/copyvios/ Earwig's copyvio detector] (who's API is used by [https://tools.wmflabs.org/copypatrol/ CopyPatrol])
* [[mw:Help:Extension:Wikisource/Wikimedia OCR|Wikimedia OCR]] (when using the Google engine)
* [https://he.wikipedia.org/wiki/%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%94:%D7%91%D7%95%D7%98/%D7%91%D7%95%D7%98_%D7%94%D7%94%D7%A1%D7%91%D7%94 Kotz' bot "BotHasava"]
* [[toolforge:copyvios|Earwig's copyvio detector]] (who's API is used by [[toolforge:copypatrol|CopyPatrol]])
* [[w:he:ויקיפדיה:בוט/בוט_ההסבה|Kotz' bot "BotHasava"]]

Latest revision as of 16:11, 5 August 2022

Google-api-proxy provides a static IP for communication with the Google Custom Search API.

Usage

  1. Get the Wikimedia Google API key from Kaldari
  2. Use https://google-api-proxy.wmflabs.org/ instead of https://www.googleapis.com/ when interacting with Google's Custom Search JSON/Atom API.

How it works

https://google-api-proxy.wmflabs.org is a Cloud VPS web proxy pointing at an instance in the google-api-proxy project with a static IP address. The instance is running an Nginx web server configured as a reverse proxy. All HTTP requests sent to this proxy will be relayed to https://www.googleapis.com and the upstream response will be provided back to the requesting client. Details of the Nginx configuration are available in our Puppet repo's role::labs::google_api_proxy module.

API keys using this proxy will need to whitelist the IP address 185.15.56.54 in the Google developer console.

Google OCR for Wikisource uses a similar proxy at https://googlevision-api-proxy.wmflabs.org/ that allows access to the Google Vision API.

Tools using the proxy