Code Monkey home page Code Monkey logo

blacklistd's Introduction

  • ๐Ÿ‘‹ Hello, my name is @paul-chambers
  • ๐Ÿข My professional background can be found at https://linkedin.com/in/paulchambers
  • ๐Ÿ‘€ Iโ€™m interested in ...
  • ๐ŸŒฑ Iโ€™m currently learning ...
  • ๐Ÿ’ž๏ธ Iโ€™m looking to collaborate on ...
  • ๐Ÿ“ซ How to reach me ...

blacklistd's People

Contributors

paul-chambers avatar zoulasc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

koollman

blacklistd's Issues

Any plans for a more friendly client/server protocol?

I recently wrote a new application which would have benefited for notifying/using blacklistd.

Unfortunately the application is not written in C, so accessing libblacklist or reimplementing the protocol in another language turns out to be a large barrier-to-entry.

This is because the message sent to blacklistd (bl_message_t) includes system-endian binary, a raw copy of the sockaddr_storage structure as well as fd-passing the client socket to blacklistd.

This is a tough ask in non-C languages such as python, php and go which abstract a lot of this low-level networking minutiae from the application.

My though is, what about a more friendly version=2 protocol that can be easily implemented in these higher-level languages? Some attributes of the protocol might be:

  • Text oriented or well-defined endian order (such as network byte order)
  • All resolution of peer addresses and local ports are determined client side - so no need to fd-pass

I'm not really suggesting something as simple as comma-delimited text, but as an example the client might send:

action,remoteIP,localIP:localPort,debug-text, e.g.:

OK,1.2.3.4,5.6.7.8:80,user=paul
FAIL,2404:6800:4006:812::200e,[2a03:2880:f119:8083:face:b00c:0:25de]:22,user=root

Apart from enabling higher-level program access, another benefit is that blacklistd could now run on a remote system, such as your firewall router as the message format survives cross-system transmissions.

A final benefit is that an application that cannot be patched to use blacklist directly might be amenable to a log watcher which sends blacklist requests on behalf of the application. This is not possible with the current message format.

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.