[tor-bugs] #17741 [GetTor]: GetTor RESTful API

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Dec 3 09:46:22 UTC 2015


#17741: GetTor RESTful API
--------------------+---------------------
 Reporter:  ilv     |          Owner:  ilv
     Type:  task    |         Status:  new
 Priority:  Medium  |      Milestone:
Component:  GetTor  |        Version:
 Severity:  Normal  |     Resolution:
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
  Sponsor:          |
--------------------+---------------------

Comment (by sukhbir):

 Hi. Thanks for starting this ticket!

 Replying to [ticket:17741 ilv]:
 > One of the deliverables for the current roadmap is to create a RESTful
 API that could provide useful information for third party apps that want
 to distribute the links. The API itself should be very simple but with the
 capability for further improvements. Taking the
 [https://developer.github.com/v3/ Github API] as the main reference, I
 think a basic version of the GetTor API should display, at least, the
 following data (in JSON format):
 >
 > On "/":
 >
 > {{{
 > {
 >     "links": "https://gettor.torproject.org/links/{provider}",
 >     "mirrors": "https://gettor.torproject.org/mirrors",
 >     "latest_version": "https://gettor.torproject.org/latest",
 > }
 > }}}
 >
 > On "/links":
 >
 > {{{
 > {
 >     "provider1": "https://gettor.torproject.org/links/provider1",
 >     "provider2": "https://gettor.torproject.org/links/provider2",
 >     "providerN": "https://gettor.torproject.org/links/providerN",
 > }
 > }}}
 >
 > On "/links/{provider}":
 >
 > {{{
 > {
 >     "linux": {
 >         "en-US": {
 >             "32_link": "https://provider/link32-fa",
 >             "32_link_asc": "https://provider/link32_asc-fa",
 >             "32_sha": "sha32",
 >             "64_link": "https://provider/link64-fa",
 >             "64_link_asc": "https://provider/link64_asc-fa",
 >             "64_sha": "sha64",
 >         },
 >         "fa": {
 >             "32_link": "https://provider/link32-fa",
 >             "32_link_asc": "https://provider/link32_asc-fa",
 >             "32_sha": "sha32",
 >             "64_link": "https://provider/link64-fa",
 >             "64_link_asc": "https://provider/link64_asc-fa",
 >             "64_sha": "sha64",
 >         }
 >     },
 >     (...and so on for the other OS)
 > }
 > }}}
 >
 > On "/latest":
 >
 > {{{
 > {
 >     "stable": "5.0.4",
 >     "alpha": "5.5a4",
 > }
 > }}}

 This looks good and I think you have covered everything. I will think a
 bit more about this and add to the ticket later if required. A small
 nitpick:

 > On "/links":

 Should be "/providers"

 >     "provider1": "https://gettor.torproject.org/links/provider1",

 > On "/links/{provider}"

 Should be "/{provider}/link"?

 > I think "/mirrors" needs a little bit of discussion, specially for
 defining the filtering. I see two possible filters, the protocol: http,
 https, rsync, ftp, etc., or the region: US, UA, FR, etc. Thoughts?

 Sounds great. Protocol and region is also pretty much what I had in mind.

 > With respect to technical details, I have experience doing similar stuff
 with Tornado, so I suggest we use Nginx + [Cyclone http://cyclone.io/], "a
 web server framework for Python that implements the Tornado API as a
 Twisted protocol". This was recommended and used in [Erebus
 http://github.com/erebus/erebus], one of the Summer of Privacy projects.
 >
 > So, let's discuss this! Is the proposed format consistent? What other
 data should we display? Are you OK with using Cyclone?

 I am OK with using Cyclone if you feel confident. I will admit I haven't
 heard of Cyclone but if you feel that it's good and you can do it, go for
 it.

 > How could we get an SSL certificate for gettor.tpo?

 Let's Encrypt? :) But I think we should ask weasel.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/17741#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list