[tor-bugs] #29734 [Obfuscation/Snowflake]: Broker should receive country stats information from Proxy and Client

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Mar 11 16:45:42 UTC 2019


#29734: Broker should receive country stats information from Proxy and Client
-------------------------------------+---------------------------
 Reporter:  cohosh                   |          Owner:  (none)
     Type:  enhancement              |         Status:  new
 Priority:  Medium                   |      Milestone:
Component:  Obfuscation/Snowflake    |        Version:
 Severity:  Normal                   |     Resolution:
 Keywords:  snowflake, geoip, stats  |  Actual Points:
Parent ID:  #29207                   |         Points:  1
 Reviewer:                           |        Sponsor:  Sponsor19
-------------------------------------+---------------------------

Comment (by ahf):

 We have a couple of options here for the implementation:

 - The broker strictly doesn't depend on anything Tor, but we could re-use
 the tor-geoipdb databases that is bundled in Debian/Ubuntu to get updates.
 These databases have a slightly different format than the official MaxMind
 GeoIP databases.

 - We can use MaxMind's own releases with the Go API found in
 https://github.com/oschwald/maxminddb-golang - this would require us to
 maintain the DB's ourselves.

 Once the broker is able to update per-country stats for the domain-fronted
 client connection it should also be able to relay information about which
 database it is using to the Snowflake proxies, such that they can keep
 stats about incoming proxy connections from clients and where these are
 coming from. This would (maybe?) allow us to notice if WebRTC filtering is
 happening in a country in that the Broker will see multiple connections
 from the given country, but the proxies reports no incoming clients from
 the given country.

 The proxies MUST NOT have to forward the client IP to the broker, which is
 why it is better for the proxies to fetch the GeoIP DB from the broker and
 cache it locally.

 The format used by Tor itself is very simple (IP-encoded as an integer
 followed by the country) that you keep in an ordered vector  where you do
 a binary search in whenever you need to look up a  country from a given
 IP. The simplicity of this data-structure might make it more interesting
 than MaxMind's binary format since we need to do the same implementation
 in both Go and JavaScript.

 The Tor implementation can be found in
 https://github.com/torproject/tor/blob/2f683465d4b666c5d8f84fb3b234ad539d8511cd/src/lib/geoip/geoip.c

 The Tor GeoIP database format can be seen here:
 https://github.com/torproject/tor/tree/master/src/config (see geoip,
 geoip6 and the mmdb-convert.py conversion script)

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


More information about the tor-bugs mailing list