Migrated geoip.html
This commit is contained in:
@ -41,6 +41,7 @@ LEGACY_PAGES_MAP={
|
||||
'donate': 'get-involved/donate',
|
||||
'faq': 'support/faq',
|
||||
'getinvolved': 'get-involved',
|
||||
'geoip': 'docs/spec/geoip',
|
||||
'glossary': 'support/glossary',
|
||||
'halloffame': 'about/hall-of-fame',
|
||||
'how': 'docs',
|
||||
|
@ -184,7 +184,7 @@ Traditionally used only by Java applications and higher-level APIs.
|
||||
</li><li>
|
||||
<a href="{{ site_url('docs/spec/configuration') }}">{{ _('Configuration File Format') }}</a></li>
|
||||
</li><li>
|
||||
<a href="geoip.html">GeoIP File Format</a></li>
|
||||
<a href="{{ site_url('docs/spec/geoip') }}">GeoIP File Format</a></li>
|
||||
</li></ul>
|
||||
|
||||
<h3>{% trans %}Developer's Guides and Resources{% endtrans %}</h3>
|
||||
|
@ -1,20 +1,21 @@
|
||||
{% extends "_layout.html" %}
|
||||
{% block title %}GeoIP File Specification{% endblock %}
|
||||
{% extends "global/layout.html" %}
|
||||
{% block title %}{% trans %}GeoIP File Specification{% endtrans %}{% endblock %}
|
||||
{% block lastupdated %}{% trans %}May 2013{% endtrans %}{% endblock %}
|
||||
{% block accuratefor %}0.9.6{% endblock %}
|
||||
{% block content %}
|
||||
Updated May 2013, current as of router version 0.9.6
|
||||
|
||||
|
||||
<h2>Overview</h2>
|
||||
<p>
|
||||
<h2>{% trans %}Overview{% endtrans %}</h2>
|
||||
<p>{% trans -%}
|
||||
This page specifies the format of the various GeoIP files,
|
||||
used by the router to look up a country for an IP.
|
||||
</p>
|
||||
{%- endtrans %}</p>
|
||||
|
||||
|
||||
<h2>Country Name (countries.txt) Format</h2>
|
||||
<p>
|
||||
<h2>{% trans %}Country Name (countries.txt) Format{% endtrans %}</h2>
|
||||
<p>{% trans -%}
|
||||
This format is easily generated from data files available from many public sources.
|
||||
For example:
|
||||
{%- endtrans %}</p>
|
||||
<pre>
|
||||
# wget http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip
|
||||
# unzip GeoIPCountryCSV.zip
|
||||
@ -29,10 +30,11 @@ For example:
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>IPv4 (geoip.txt) Format</h2>
|
||||
<p>
|
||||
<h2>{% trans %}IPv4 (geoip.txt) Format{% endtrans %}</h2>
|
||||
<p>{% trans -%}
|
||||
This format is borrowed from Tor and is easily generated from data files available from many public sources.
|
||||
For example:
|
||||
{%- endtrans %}</p>
|
||||
<pre>
|
||||
# wget http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip
|
||||
# unzip GeoIPCountryCSV.zip
|
||||
@ -49,10 +51,11 @@ For example:
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>IPv6 (geoipv6.dat.gz) Format</h2>
|
||||
<p>
|
||||
<h2>{% trans %}IPv6 (geoipv6.dat.gz) Format{% endtrans %}</h2>
|
||||
<p>{% trans -%}
|
||||
This is a compressed binary format designed for I2P.
|
||||
The file is gzipped. Ungzipped format:
|
||||
{%- endtrans %}</p>
|
||||
<pre>
|
||||
Bytes 0-9: Magic number "I2PGeoIPv6"
|
||||
Bytes 10-11: Version (0x0001)
|
||||
@ -65,8 +68,7 @@ The file is gzipped. Ungzipped format:
|
||||
8 byte to (/64)
|
||||
2 byte ISO country code LOWER case (ASCII)
|
||||
</pre>
|
||||
<p>
|
||||
NOTES:
|
||||
<p>{% trans %}NOTES:{% endtrans %}</p>
|
||||
<ul>
|
||||
<li>Data must be sorted (SIGNED long twos complement), no overlap.
|
||||
So the order is 8000:: ... FFFF:: 0000:: ... 7FFF::
|
Reference in New Issue
Block a user