Git Product home page Git Product logo

maxmind-geolite-mirror's Introduction

Build Status Coverage Status Maintainability

maxmind-geolite-mirror

Mirror maxmind GeoIP version 2 databases from maxmind.com.

Install

npm install -g maxmind-geolite-mirror
mkdir -p /usr/local/share/GeoIP
/usr/local/bin/maxmind-geolite-mirror

The last command will download all the databases to the GeoIP share directory.

Configure

The MaxMind license key must be configured. It can be set by:

  1. editing config.js
  2. setting the environment variable MAXMIND_LICENSE_KEY

If neither is set, the script will emit an error.

Update databases

/usr/local/bin/maxmind-geolite-mirror

Set this to run once a week or so. Downloads happen only when the remote file is newer than the local version.

Custom path to store maxmind database

If access to /usr/local/share/GeoIP is unavailable, the following environment variable is available: MAXMIND_DB_DIR. E.g.

export MAXMIND_DB_DIR=/home/example/maxmind-db

Contributions

Contributions are welcome and appreciated. Please keep in mind the following:

  • there are no dependencies. That's on purpose.
  • test coverage is at 100%, help keep it that way.

Contributors

  • Carl Banbury
  • Tom Lee

NPM

NPM

maxmind-geolite-mirror's People

Contributors

greenkeeper[bot] avatar msimerson avatar sbma44 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

maxmind-geolite-mirror's Issues

Error messages during network problems

Hi, I have seen this in docker containers having no internet connectivity. It looks potential errors are not handled correctly. To simulate the situation, I used an invalid hostname in config.js producing this output:

{ [Error: getaddrinfo ENOTFOUND geolite.maxmind.com1 geolite.maxmind.com1:80]
  code: 'ENOTFOUND',
  errno: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'geolite.maxmind.com1',
  host: 'geolite.maxmind.com1',
  port: 80 }
fs.js:53
        throw backtrace;
        ^

Error: ENOENT: no such file or directory, unlink '/tmp/GeoIP.dat'
    at rethrow (fs.js:48:21)
    at makeCallback (fs.js:74:12)
    at Object.fs.unlink (fs.js:923:14)
    at ClientRequest.<anonymous> (/Users/stefan/sematext/logagent-js/node_modules/maxmind-geolite-mirror/bin/maxmind-geolite-mirror:88:12)
    at emitOne (events.js:77:13)
    at ClientRequest.emit (events.js:169:7)
    at Socket.socketErrorListener (_http_client.js:256:9)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at connectErrorNT (net.js:997:8)

Please add better error handling.

  1. Check if file exists before removal
  2. Add callback function to fs.unlink() to catch the error. bin/maxmind-geolite-mirror:88:12

GeoLite2 support

Hi,

we use the maxmind API and maxmind-geolite-mirror to download the files.
After changing to V1 API, we still get this error message in nodejs:

Uncaught Error: Maxmind v1 module has changed API.
  Upgrade instructions can be found here:   https://github.com/runk/node-maxmind/wiki/Migration-guide
  If you want to use legacy libary then explicitly install [email protected]

at new Metadata (node_modules/maxmind/lib/metadata.js:18:11)
      at Reader.load (node_modules/maxmind/lib/reader.js:27:19)
      at new Reader (node_modules/maxmind/lib/reader.js:21:8)
      at node_modules/maxmind/index.js:18:18

I assume the problem is the difference data format GeoLite & GeoLite2 and not the called API function. Please check https://github.com/runk/node-maxmind/wiki/Migration-guide for more information.

An in-range update of mocha is breaking the build ๐Ÿšจ

The devDependency mocha was updated from 6.1.4 to 6.2.0.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โœ… continuous-integration/appveyor/branch: AppVeyor build succeeded (Details).
  • โŒ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v6.2.0

6.2.0 / 2019-07-18

๐ŸŽ‰ Enhancements

๐Ÿ› Fixes

๐Ÿ“– Documentation

๐Ÿ” Coverage

๐Ÿ”ฉ Other

Commits

The new version differs by 39 commits.

  • bd47776 Release v6.2.0
  • cc595af update CHANGELOG.md for v6.2.0 [ci skip]
  • 59d70ee fix: remove duplicate line-height property (#3957)
  • f77cac4 fix: do not redeclare variable (#3956)
  • 6201e42 Hide stacktrace when cli args are missing (#3963)
  • 88f45d5 Don't re-initialize grep option on watch re-run (#3960)
  • 5d4dd98 Fix No Files error when file is passed via --files (#3942)
  • 15b96af Collect test files later (#3953)
  • ccee5f1 Base reporter store ref to console.log (#3725)
  • 47318a7 update @mocha/contributors to v1.0.4 (#3944)
  • c903147 More, improved integration tests for watching (#3929)
  • e341ea4 Update CI config files to use Node-12.x (#3919)
  • 3064d25 update @mocha/docdash to v2.1.1 (#3945)
  • 9ea45e7 do not fork if no node flags present (#3827)
  • d02a096 modify Mocha constructor to accept options.global or options.globals (#3914)

There are 39 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

Error: Response code 404 not handled!

This week I started getting a not found error.

404
HEADERS: {"date":"Mon, 07 Jan 2019 23:43:53 GMT","content-type":"text/html","connection":"close","set-cookie":["__cfduid=db2b6e32730c8d072002d9a6ee5cbafac1546904633; expires=Tue, 07-Jan-20 23:43:53 GMT; path=/; domain=.maxmind.com; HttpOnly"],"cf-cache-status":"HIT","expires":"Tue, 08 Jan 2019 03:43:53 GMT","cache-control":"public, max-age=14400","server":"cloudflare","cf-ray":"495a4a08f27c2611-DFW"}
downloading /usr/local/share/GeoIP/GeoIP.dat
response code 404 not handled!

Can this be fixed?

publish to NPM?

Is there a version bump & npm publish coming up soon? Would love to be able to use the configurable db path option: #4

An in-range update of mocha is breaking the build ๐Ÿšจ

Version 3.4.0 of mocha just got published.

Branch Build failing ๐Ÿšจ
Dependency mocha
Current Version 3.3.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As mocha is โ€œonlyโ€ a devDependency of this project it might not break production or downstream projects, but โ€œonlyโ€ your build or test tools โ€“ preventing new deploys or publishes.

I recommend you give this issue a high priority. Iโ€™m sure you can resolve this ๐Ÿ’ช

Status Details
  • โœ… continuous-integration/appveyor/branch AppVeyor build succeeded Details,- โŒ continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes v3.4.0

Mocha is now moving to a quicker release schedule: when non-breaking changes are merged, a release should happen that week.

This week's highlights:

  • allowUncaught added to commandline as --allow-uncaught (and bugfixed)
  • warning-related Node flags

๐ŸŽ‰ Enhancements

๐Ÿ› Fixes

๐Ÿ”ฉ Other

Commits

The new version differs by 9 commits0.

  • 7554b31 Add Changelog for v3.4.0
  • 9f7f7ed Add --trace-warnings flag
  • 92561c8 Add --no-warnings flag
  • ceee976 lint test/integration/fixtures/simple-reporter.js
  • dcfc094 Revert "use semistandard directly"
  • 93392dd no special case for macOS running Karma locally
  • 4d1d91d --allow-uncaught cli option
  • fb1e083 fix allowUncaught in browser
  • 4ed3fc5 Add license report and scan status

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot ๐ŸŒด

response code 401 not handled !

Issue on db update.

  • Kindly I am facing this issue by only following the steps that you mentioned in the readme file.

image

  • Kindly advise.

publish new version?

@msimerson 1.0.9 includes changes to the config file to include the ASN tarball, but not the code that handles it properly -- the published version suffers from the "tar file as mmdb" issue. Could you publish a new version containing the code presently in master?

test downloaded files and assure correct format

MaxMind sometimes provides files in .tar.gz format. This library has gained expansion support for it in PR #16 but we should have a test that the output result is a proper MaxMind mmdb file.

One way to accomplish this is to include one of the MaxMind libraries as a dev dependency and then have it load the downloaded file(s). That's a great end-to-end test, but also pretty heavy. I'd rather tests that heavy (and that hit MaxMind servers) be reserved for running only on developers workstations.

A good unit test would be including a couple truncated (only the file header would matter) data files in test/fixtures and using an equivalent of the file utility to taste them.

good

$ file GeoLite2-City.mmdb 
GeoLite2-City.mmdb: data

bad

$ file GeoLite2-ASN.mmdb 
GeoLite2-ASN.mmdb: POSIX tar archive (GNU)

An in-range update of eslint is breaking the build ๐Ÿšจ

The devDependency eslint was updated from 5.16.0 to 6.0.0.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โœ… continuous-integration/appveyor/branch: AppVeyor build succeeded (Details).
  • โŒ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v6.0.0
  • 81aa06b Upgrade: [email protected] (#11869) (Teddy Katz)
  • 5f022bc Fix: no-else-return autofix produces name collisions (fixes #11069) (#11867) (Milos Djermanovic)
  • ded9548 Fix: multiline-comment-style incorrect message (#11864) (golopot)
  • cad074d Docs: Add JSHint W047 compat to no-floating-decimal (#11861) (Timo Tijhof)
  • 41f6304 Upgrade: sinon (#11855) (Toru Nagashima)
  • 167ce87 Chore: remove unuseable profile command (#11854) (Toru Nagashima)
  • c844c6f Fix: max-len properly ignore trailing comments (fixes #11838) (#11841) (ZYSzys)
  • 1b5661a Fix: no-var should not fix variables named 'let' (fixes #11830) (#11832) (Milos Djermanovic)
  • 4d75956 Build: CI with Azure Pipelines (#11845) (Toru Nagashima)
  • 1db3462 Chore: rm superfluous argument & fix perf-multifiles-targets (#11834) (่–›ๅฎš่ฐ”็š„็Œซ)
  • c57a4a4 Upgrade: @babel/polyfill => core-js v3 (#11833) (่–›ๅฎš่ฐ”็š„็Œซ)
  • 65faa04 Docs: Clarify prefer-destructuring array/object difference (fixes #9970) (#11851) (Oliver Sieweke)
  • 81c3823 Fix: require-atomic-updates reports parameters (fixes #11723) (#11774) (Toru Nagashima)
  • aef8ea1 Sponsors: Sync README with website (ESLint Jenkins)
Commits

The new version differs by 134 commits.

  • a7985a6 6.0.0
  • be74dd9 Build: changelog update for 6.0.0
  • 81aa06b Upgrade: [email protected] (#11869)
  • 5f022bc Fix: no-else-return autofix produces name collisions (fixes #11069) (#11867)
  • ded9548 Fix: multiline-comment-style incorrect message (#11864)
  • cad074d Docs: Add JSHint W047 compat to no-floating-decimal (#11861)
  • 41f6304 Upgrade: sinon (#11855)
  • 167ce87 Chore: remove unuseable profile command (#11854)
  • c844c6f Fix: max-len properly ignore trailing comments (fixes #11838) (#11841)
  • 1b5661a Fix: no-var should not fix variables named 'let' (fixes #11830) (#11832)
  • 4d75956 Build: CI with Azure Pipelines (#11845)
  • 1db3462 Chore: rm superfluous argument & fix perf-multifiles-targets (#11834)
  • c57a4a4 Upgrade: @babel/polyfill => core-js v3 (#11833)
  • 65faa04 Docs: Clarify prefer-destructuring array/object difference (fixes #9970) (#11851)
  • 81c3823 Fix: require-atomic-updates reports parameters (fixes #11723) (#11774)

There are 134 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

An in-range update of rewire is breaking the build ๐Ÿšจ

Version 3.0.0 of rewire was just published.

Branch Build failing ๐Ÿšจ
Dependency rewire
Current Version 2.5.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

rewire is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โŒ continuous-integration/appveyor/branch Waiting for AppVeyor build to complete Details
  • โŒ continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes v3.0.0
  • Breaking: Remove support for node versions below 4
  • Add support for const #79 #95 #117 #118
Commits

The new version differs by 15 commits.

  • cce2de8 v3.0.0
  • cfb9256 Update CHANGELOG
  • 87f6469 Update mocha
  • 02c4401 Update README
  • 9cd5ea1 Remove legacy code for node < 4
  • 457955a Merge pull request #118 from jhnns/pr/origin/117
  • ec2175b Update .travis.yml
  • b6cc407 Refactor code
  • 501e4c2 Remove options from readme
  • c0e1b87 Remove opts and only use old load functionality for coffee scripts
  • d1ad67a Also run travis tests in 6.x
  • c176d02 Update README
  • bc5a74c Add test to check if __filename and __dirname is correct
  • 3960361 Added set tests
  • 1ef6104 Add optional babel const to let parser.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

shebang not working on ubuntu...

When installing on ubuntu, the shebang line is not pointing to the correct location. I think the line should be

#!/usr/bin/env node

And npm install will set the correct location for you.

An in-range update of mocha is breaking the build ๐Ÿšจ

The devDependency mocha was updated from 6.0.2 to 6.1.0.

๐Ÿšจ View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • โœ… continuous-integration/appveyor/branch: AppVeyor build succeeded (Details).
  • โŒ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v6.1.0

6.1.0 / 2019-04-07

๐Ÿ”’ Security Fixes

  • #3845: Update dependency "js-yaml" to v3.13.0 per npm security advisory (@plroebuck)

๐ŸŽ‰ Enhancements

  • #3766: Make reporter constructor support optional options parameter (@plroebuck)
  • #3760: Add support for config files with .jsonc extension (@sstephant)

๐Ÿ“  Deprecations

These are soft-deprecated, and will emit a warning upon use. Support will be removed in (likely) the next major version of Mocha:

๐Ÿ› Fixes

  • #3829: Use cwd-relative pathname to load config file (@plroebuck)
  • #3745: Fix async calls of this.skip() in "before each" hooks (@juergba)
  • #3669: Enable --allow-uncaught for uncaught exceptions thrown inside hooks (@givanse)

and some regressions:

๐Ÿ“– Documentation

๐Ÿ”ฉ Other

  • #3830: Replace dependency "findup-sync" with "find-up" for faster startup (@cspotcode)
  • #3799: Update devDependencies to fix many npm vulnerabilities (@XhmikosR)
Commits

The new version differs by 28 commits.

  • f4fc95a Release v6.1.0
  • bd29dbd update CHANGELOG for v6.1.0 [ci skip]
  • aaf2b72 Use cwd-relative pathname to load config file (#3829)
  • b079d24 upgrade deps as per npm audit fix; closes #3854
  • e87c689 Deprecate this.skip() for "after all" hooks (#3719)
  • 81cfa90 Copy Suite property "root" when cloning; closes #3847 (#3848)
  • 8aa2fc4 Fix issue 3714, hide pound icon showing on hover header on docs page (#3850)
  • 586bf78 Update JS-YAML to address security issue (#3845)
  • d1024a3 Update doc examples "tests.html" (#3811)
  • 1d570e0 Delete "/docs/example/chai.js"
  • ade8b90 runner.js: "self.test" undefined in Browser (#3835)
  • 0098147 Replace findup-sync with find-up for faster startup (#3830)
  • d5ba121 Remove "package" flag from sample config file because it can only be passes as CLI arg (#3793)
  • a3089ad update package-lock
  • 75430ec Upgrade yargs-parser dependency to avoid loading 2 copies of yargs

There are 28 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those donโ€™t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot ๐ŸŒด

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.