Skip to content

Commit

Permalink
Merge pull request #750 from p-l-/pylint-fixes
Browse files Browse the repository at this point in the history
Use https for Maxmind & list the URLs in the documentation
  • Loading branch information
p-l- committed Aug 13, 2019
2 parents e259013 + 0c637f2 commit 60dfbb5
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 8 deletions.
20 changes: 20 additions & 0 deletions doc/install/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,26 @@ command on one machine and create an ``ivre-data`` package containing
the files under the ``/usr/share/ivre/geoip`` directory (or distribute
those files somehow).

The URLs downloaded are stored in the configuration. By default, the
following files are downloaded:

::

$ python
>>> from ivre.config import IPDATA_URLS
>>> for fname, url in IPDATA_URLS.items():
... print("%s: %s" % (fname, url))
...
GeoLite2-City.tar.gz: https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz
GeoLite2-City-CSV.zip: https://geolite.maxmind.com/download/geoip/database/GeoLite2-City-CSV.zip
GeoLite2-Country.tar.gz: https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz
GeoLite2-Country-CSV.zip: https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip
GeoLite2-ASN.tar.gz: https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz
GeoLite2-ASN-CSV.zip: https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN-CSV.zip
iso3166.csv: https://dev.maxmind.com/static/csv/codes/iso3166.csv
BGP.raw: http://thyme.apnic.net/current/data-raw-table


Using Agents
------------

Expand Down
15 changes: 8 additions & 7 deletions ivre/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,20 +131,21 @@

IPDATA_URLS = {
'GeoLite2-City.tar.gz':
'http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz',
'https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz',
'GeoLite2-City-CSV.zip':
'http://geolite.maxmind.com/download/geoip/database/GeoLite2-City-CSV.zip',
'https://geolite.maxmind.com/download/geoip/database/'
'GeoLite2-City-CSV.zip',
'GeoLite2-Country.tar.gz':
'http://geolite.maxmind.com/download/geoip/database/'
'https://geolite.maxmind.com/download/geoip/database/'
'GeoLite2-Country.tar.gz',
'GeoLite2-Country-CSV.zip':
'http://geolite.maxmind.com/download/geoip/database/'
'https://geolite.maxmind.com/download/geoip/database/'
'GeoLite2-Country-CSV.zip',
'GeoLite2-ASN.tar.gz':
'http://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz',
'https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz',
'GeoLite2-ASN-CSV.zip':
'http://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN-CSV.zip',
'iso3166.csv': 'http://dev.maxmind.com/static/csv/codes/iso3166.csv',
'https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN-CSV.zip',
'iso3166.csv': 'https://dev.maxmind.com/static/csv/codes/iso3166.csv',
# This one is not from maxmind -- see http://thyme.apnic.net/
'BGP.raw': 'http://thyme.apnic.net/current/data-raw-table',
}
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions web/static/doc/_sources/install/installation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,26 @@ command on one machine and create an ``ivre-data`` package containing
the files under the ``/usr/share/ivre/geoip`` directory (or distribute
those files somehow).

The URLs downloaded are stored in the configuration. By default, the
following files are downloaded:

::

$ python
>>> from ivre.config import IPDATA_URLS
>>> for fname, url in IPDATA_URLS.items():
... print("%s: %s" % (fname, url))
...
GeoLite2-City.tar.gz: https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz
GeoLite2-City-CSV.zip: https://geolite.maxmind.com/download/geoip/database/GeoLite2-City-CSV.zip
GeoLite2-Country.tar.gz: https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz
GeoLite2-Country-CSV.zip: https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip
GeoLite2-ASN.tar.gz: https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz
GeoLite2-ASN-CSV.zip: https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN-CSV.zip
iso3166.csv: https://dev.maxmind.com/static/csv/codes/iso3166.csv
BGP.raw: http://thyme.apnic.net/current/data-raw-table


Using Agents
------------

Expand Down
17 changes: 17 additions & 0 deletions web/static/doc/install/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,23 @@ <h2>Getting IP data<a class="headerlink" href="#getting-ip-data" title="Permalin
command on one machine and create an <code class="docutils literal notranslate"><span class="pre">ivre-data</span></code> package containing
the files under the <code class="docutils literal notranslate"><span class="pre">/usr/share/ivre/geoip</span></code> directory (or distribute
those files somehow).</p>
<p>The URLs downloaded are stored in the configuration. By default, the
following files are downloaded:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ python
&gt;&gt;&gt; from ivre.config import IPDATA_URLS
&gt;&gt;&gt; for fname, url in IPDATA_URLS.items():
... print(&quot;%s: %s&quot; % (fname, url))
...
GeoLite2-City.tar.gz: https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz
GeoLite2-City-CSV.zip: https://geolite.maxmind.com/download/geoip/database/GeoLite2-City-CSV.zip
GeoLite2-Country.tar.gz: https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz
GeoLite2-Country-CSV.zip: https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip
GeoLite2-ASN.tar.gz: https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz
GeoLite2-ASN-CSV.zip: https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN-CSV.zip
iso3166.csv: https://dev.maxmind.com/static/csv/codes/iso3166.csv
BGP.raw: http://thyme.apnic.net/current/data-raw-table
</pre></div>
</div>
</div>
<div class="section" id="using-agents">
<h2>Using Agents<a class="headerlink" href="#using-agents" title="Permalink to this headline"></a></h2>
Expand Down
2 changes: 1 addition & 1 deletion web/static/doc/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 60dfbb5

Please sign in to comment.