Giter Site home page Giter Site logo

15d23 / ip-filtering-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from networkactiv/ip-filtering-plugin

0.0 0.0 0.0 61.33 MB

Provides an efficient IP-address-filtering interface for use with Web-based information services, such as for geolocation.

License: MIT License

C++ 99.43% C 0.57%

ip-filtering-plugin's Introduction

NetworkActiv IP Filtering Plugin

This project creates a Windows DLL file that enables programs such as NetworkActiv AUTAPF to filter clients by IP address using an external server. Currently both HTTP and HTTPS are supported using Microsoft's open-source cpprestsdk. Because AUTAPF is static-built, this plugin has been designed to be built static as well. Static-compiled binaries of the cpprestsdk are included in the Zip file found in packages/cpprestsdk-master.

Features

  • Exports a simple IsIPAllowed() function that takes an IP address as a string and returns a boolean indicating whether the response from the server for the given IP address matches those filters as specified in this plugin's JSON-based settings file.
  • Supports HTTP and HTTPS.
  • Supports HTTP Basic Authentication (preferably over HTTPS).
  • Uses JSON for plugin settings; accepts JSON from server.
  • Written in C++ for maximum performance. Both 32-bit and 64-bit builds are supported.
  • Statically-built for minimal post-build dependency.
  • Uses an open and extensible filtering method that can essentially filter based on any value at any depth of the JSON returned from the server, regardless of whether contained in an Object or an Array. This allows support for pretty much any Web server that provides a JSON response for an IP address (or hostname).
  • Can filter on any number of fields using any number of servers.
  • Defaults to blocking (disallowing) an IP address if anything goes wrong, such as running out of memory or failing to establish a connection to one of the servers.
  • Exports *Cmd versions of the functions for troubleshooting via rundll32. For example: rundll32 NA_Plugin_IPFiltering_x64.dll,IsIPAllowedCmd 1.2.3.4

Licence

This plugin is distributed under the standard MIT licence. See LICENCE.TXT for details. As a result of this licence, you may use this plugin in your own projects for which a Web-interfacing, IP-filtering plugin is needed.

The linked packages have their own respective licences, so be sure to look into these licences as appropriate.

The initial commit of this plugin (minus dependencies) was designed and written entirely by Michael J. Kowalski of NetworkActiv Software.

Dependencies

  • cpprestsdk -- used to provide HTTP and HTTPS communication with servers.
  • rapidjson -- used to parse JSON loaded from local settings file or as returned from servers.

Building the DLL

This project was designed to be opened and built using Microsoft Visual Studio 2015. You will need to make sure that rapidjson is added to the project, such as through NuGet. This project must be built statically if it will be used with NetworkActiv AUTAPF or PortImport. Because cpprestsdk does not provide static builds in its standard NuGet package (as of 2015-12-29), you will need to link manually to the cpprestsdk LIBs and Headers. These headers have been included in the packages/cpprestsdk-master/Release/include folder. Static builds of cpprestsdk have been included in packages/cpprestsdk-master/Binaries_(extract_my_contents_here).zip. These builds were too large to include uncompressed in this repo.

Contributions

Additions are welcome as long as they are well-coded, not too specific to a particular product or service, and appropriately licensed. Any contributions must be made under the MIT licence or in Public Domain. Copy-left contributions cannot be accepted. No guarantee is given as to whether a particular contribution will be accepted.

ip-filtering-plugin's People

Contributors

networkactiv avatar

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.