npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ifconfig-server

v1.0.1

Published

Fast, scalable ip lookup service server implementation powered by fastify and maxmind

Downloads

8

Readme

Ifconfig-server

Fast, scalable ip lookup service server implementation powered by Fastify and MaxMind GeoLite2 DB

Live Servers

  • ifconfig.la (IPv4 only, no-logging, no-cloudflare, TOR friendly)

Highlights

  • Fast: Built on top of Fastify and node-maxmind library which supports faster IP query against any available libraries
  • Scalable: Supports read-only slave process support which enables horizontal scaling of the service
  • Less-IO dependent: All IP queries happen in-memory which doesn't require storage IO (Local backups are only stored and loaded to memory on startup)
  • Cross-platform: Runs on any machine where node.js is supported.

Requirements

  • For auto updates

MaxMind API key (Get one from here)

  • Running from binary release

None (Binary from the last release is the only requirement)

  • Running from npx or npm install

Node.js LTS version (See the official node.js download page)

Quickstart

Installation

  • Running via Binary Release
  $ ifconfig-server
  # For windows
  $ ifconfig-server.exe
  • Running via npx (Without source code)
  $ npx ifconfig-server
  • Running via npm global install
  $ npm i -g ifconfig-server
  $ ifconfig-server
  • Running via source code
  $ git clone https://github.com/ifconfigla/ifconfig-server
  $ cd ifconfig-server
  $ npm i
  $ ./src/start.js

Running

  • Running without Maxmind API key (Auto-update for MaxMind DB is off)
  $ ifconfig-server
  • Running with Maxmind API key (Will auto-update MaxMind db every day)
  $ ifconfig-server -k "MAXMIND_KEY_HERE"
  • Running both master and slave processes (For scaling)
  # This process will update and write DB
  $ ifconfig-server -k "MAXMIND_KEY_HERE"
  # This process will only read-only
  $ ifconfig-server -s

If you would like to change the default directory ($HOME/.ifconfig) where ifconfig-server stores updated DB,

Use the -d, --root-dir option

  $ ifconfig-server -d "customDir"

Check out -h, --help option for more command-line options

Configuration

You can either use command-line options (Checkout -h, --help for available options) or use config.json file with -c, --config-file option provided.

See config.example.json for available configuration values.

Cloudflare-Free

This server isn't resource intensive thus it could handle more than a thousand requests concurrently.

Therefore, it is advised not to host the website behind the cloudflare firewall unless required since it will block browser requests, command line requests, and especially tor users.

We recommend you set up an ifconfig-server behind the nginx proxy with basic configuration to prevent DOS abuse. See here about NGINX rate limiting.

If you still need to host this site under cloudflare, use --cloudflare option to remove Cloudflare-free notice under the website.

Contact

[email protected] (Receive-only email)

If you have issues, please use the Github issues rather than sending emails.

License

By using this source code you must follow MaxMind's GeoLite2 End User License Agreement.

The source code of Ifconfig-server implementation is distributed with MIT LICENSE.

MaxMind GeoLite2 DB is distributed with Creative Commons License 4.0 as a part of the source code & release binary.

We do not distribute the latest version of MaxMind GeoLite2 DB and the GeoLite2 DB bundled with the source code is distributed as a part of the source code assuming you are the legit user of GeoLite2 End User License Agreement.

To run with the latest, accurate IP information you will need a MaxMind API key from their homepage. See more info about the registeration.

Donations

  • BTC:
15BrvbeHtNp5PuoUBdo95j7G2wWmpmq7Dg
  • LTC:
LgK6hSbeyhE8UpsWM86z4rrCoKf38SWYH8
  • DOGE:
DKjBYVArMGKXAJae1y3V9nvjZX9TVehSRL
  • ETH:
0x34E3B113EBb270F2acbF312815c538EC1E12aec1
  • XMR:
47qyY7CYdsDWsfpLoSUZP2Q5Hnnf3LteM9w2ZJ878XHAjAsd3ZHB6AUNb2BErfgsYA4Ne2SPLM5AzboABx4n9USJAYU5ZNZ