[tor-bugs] #29734 [Obfuscation/Snowflake]: Broker should receive country stats information from Proxy and Client
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Apr 18 07:48:33 UTC 2019
#29734: Broker should receive country stats information from Proxy and Client
-------------------------------------+--------------------------------
Reporter: cohosh | Owner: cohosh
Type: enhancement | Status: needs_revision
Priority: Medium | Milestone:
Component: Obfuscation/Snowflake | Version:
Severity: Normal | Resolution:
Keywords: snowflake, geoip, stats | Actual Points: 2
Parent ID: #29207 | Points: 1
Reviewer: ahf | Sponsor: Sponsor19
-------------------------------------+--------------------------------
Comment (by dcf):
Oh and it looks like country stats don't get incremented whenever
`GetCountryByAddr` doesn't find a match. I'm afraid this will make
analysis difficult if a large fraction of proxies aren't covered by the
geoip database, or the database is improperly installed, or something.
Could we count them with a country code of `"??"` or something?
https://github.com/cohosh/snowflake/blob/fb01c2d1c9d402cc4d96f01df2e6fb6cb37bc9a6/broker/geoip.go#L213
`GetCountryByAddr` returns `(string, error)`, but failure to find an entry
in a database is not really an "error". It makes it seem like there are
three return stats possible (found, not found, error) when really there
are only two (found, not found). How about changing the signature to
{{{
func GetCountryByAddr(table GeoIPTable, ip net.IP) (string, bool)
}}}
where the second return value is an `ok` flag, like when indexing a map or
reading from a channel. The caller can then do the `"??"` substitution
whenever `!ok`.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29734#comment:25>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list