Skip to main content

ICAP Server for OpenTC (A text classification engine using machine learning)

Project description

The Internet Content Adaptation Protocol (ICAP) is a lightweight HTTP-like protocol specified in RFC 3507 which is used to extend transparent proxy servers. It is used generally for a virus scanner or content filtering.

The purpose of this icap-server-opentc is to demonstrate one of the usages of the OpenTC server. In this case, the icap server is used as Data Leak Prevention (DLP). It is listening on the icap server’s default port 1344. The squid-cache is used as the http/s proxy (it can be also any other proxy servers). It is configured to connect to the icap server for the content filtering. Any out going http traffics through the squid proxy will be sent to the icap server, which will then forward it to the OpenTC server. OpenTC server analyses the data and classify it based on the pre-trained data. The result of the text classification is sent back to the icap server, which will decide if the outgoing traffic should be blocked or allowed.

Requirements

  • Python 3.x

  • opentc

  • PyYAML

  • pyicap 1.0b1

  • python-magic

  • python-multipart

TODO

  • the icap server should monitor the availability of the OpenTC server. In case it is not up or running, this icap server should try to reconnect it again several times in difference interval (i.e: the interval of the first 3 reconnection could be 10 seconds, and after 3 unsuccessful attempts to reconnect, the interval connection time should be changed to 300 seconds). Currently, the icap server has to be restarted manually after the OpenTC server is died or restarted.

  • Currently the decision to take, either the traffic is blocked or allowed, is implemented using manual “for_loop-if-elif” sequences, which maybe not easy to understand or error prone. In the future, the software would use a rule engine (if there is any) to simplify the creation of complex rules.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opentc-icap-0.1.15.tar.gz (7.1 kB view details)

Uploaded Source

File details

Details for the file opentc-icap-0.1.15.tar.gz.

File metadata

  • Download URL: opentc-icap-0.1.15.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for opentc-icap-0.1.15.tar.gz
Algorithm Hash digest
SHA256 fbbb3dd95b58b88f0331c6c619c0bf76612582e67f464ea1015fb0937d54c360
MD5 cf4fa7af1cc4c821bf6685bddaf385f1
BLAKE2b-256 552148594adaac968572e66d65365e9b95d62d240e81f0e6b4deeafbf75d5ab0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page