Opened 6 years ago

Closed 3 years ago

#11956 closed enhancement (wontfix)

Implement relay search functionality of rewritten weather

Reported by: sreenatha Owned by:
Priority: Medium Milestone:
Component: Metrics/Tor Weather Version:
Severity: Keywords: weather-rewrite
Cc: karsten, meejah Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

One of the requirements of the rewritten weather is to provide a search feature that enables users to search for relays to subscribe where the keyword for the search could be IP address, relay fingerprint or the nickname. Refer to the requirements section of this wiki page.

Child Tickets

Change History (4)

comment:1 Changed 6 years ago by sreenatha

https://github.com/lucyd/tor-weather/commit/291b6ce0b2081db7520eb55211109ddeb7dbd06e

The current implementation uses a local variable instead of a database for storing the query data(like baumanno's hourly script). It takes an input keyword and builds a request to onionoo with an If-Modified-Since header as per the onionoo protocol specification.

comment:2 Changed 6 years ago by meejah

I think we should use the "requests" library (http://docs.python-requests.org/en/latest/) for these Onionoo transactions; it does HTTPS certificate hostname checking by default, whereas urllib2 does not.

+1 for having it on a branch already :)

It's probably worth thinking about pulling some common methods out of these scripts and abstracting some of the calls already, even if it's not in a database yet.

For example, building URLs to Onionoo, or getting the last-modified-time of a query (that is, instead of directly accessing the global, call a method like "query_last_modified(query)". Then when it comes time to add persistence to a database, you just have to re-write the guts of those methods.

comment:3 Changed 6 years ago by sreenatha

Status: newneeds_review

Check out some of the commits at https://github.com/lucyd/tor-weather/commits/search

After merging the 'search' and 'onionoo-wrapper' branches, it's clear how simple it is to implement the relay-search functionality :)

comment:4 Changed 3 years ago by karsten

Resolution: wontfix
Status: needs_reviewclosed

Tor Weather has been discontinued as of May 24, 2016: https://lists.torproject.org/pipermail/tor-relays/2016-June/009424.html. Batch-closing all remaining tickets as announced in #19382. A list of these tickets and any other Weather tickets modified after June 26, 2016 will be available here: https://trac.torproject.org/projects/tor/query?changetime=Jun+27%2C+2016..&component=^Metrics%2FTor+Weather

Note: See TracTickets for help on using tickets.