Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
orbea
Tor
Commits
e9c950af
Commit
e9c950af
authored
4 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
src/config/README: add documentation for geoip format.
parent
769d54c5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/config/README
+29
-0
29 additions, 0 deletions
src/config/README
with
29 additions
and
0 deletions
src/config/README
+
29
−
0
View file @
e9c950af
...
...
@@ -33,3 +33,32 @@ torrc.sample.in:
most people shouldn't mess with.
==============================
On the geoip format:
Our geoip files are line-oriented. Any empty line, or line starting
with a #, is ignored.
All other lines are composed of three comma-separated values:
START,END,CC. For the geoip file, START and END are IPv4 addresses
as expressed as 32-bit integers (such as 3325256709 to represent
198.51.100.5). For the geoip6 file, START and END are IPv6
addresses, with no brackets. In both cases CC is a two-character
country code.
The semantic meaning of a line START,END,CC is that all addresses
between START and END _inclusive_ should be mapped to the country code
CC.
We guarantee that all entries within these files are disjoint --
that is, there is no address that is matched by more than one
line. We also guarantee that all entries within these files are
sorted in numerically ascending order by address.
Thus, one effective search algorithm here is to perform a binary
search on all the entries in the file.
Note that there _are_ "gaps" in these databases: not every possible
address maps to a country code. In those cases, Tor reports the
country as ??.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment