Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTTP content filtering #277

Closed
wants to merge 11 commits into from
Closed

Add HTTP content filtering #277

wants to merge 11 commits into from

Conversation

0x501D
Copy link

@0x501D 0x501D commented Aug 25, 2020

This feature adds possibility of HTTP content filtering.
It uses JSON format for configuration file. User can pass or drop URLs, methods and content-type (for response only).
Example of configuration:

{
  "rules": [
  {
    "id": "1",
    "action": "pass",
    "method": [],
    "url": ["one.examaple.com/*"],
    "content" : ["text/*"]
  },
  {
    "id": "2",
    "action": "pass",
    "method": [],
    "url": ["two.example.com/*"],
    "content" : []
  }
  ],
  "default_action": "drop",
  "http_deny_tmpl": "<h2>%s</h2>"
}

When rules blocks something sslsplit generates HTTP response with the reason of blocking.
And use for it HTML template from http_deny_tmpl parametr.

@0x501D 0x501D changed the title Add HTTP content filtering feature Add HTTP content filtering Aug 25, 2020
GNUmakefile Outdated
@@ -376,6 +404,13 @@ PKG_LDFLAGS+= -L$(LIBPCAP_FOUND)/lib
PKG_LIBS+= -lpcap
endif
endif
ifeq ($(filter -DWITH_CONTENT_FILTER,$(FEATURES)),-DWITH_CONTENT_FILTER)
ifdef LIBJSON_FOUND
PKG_CPPFLAGS+= -I$(LIBNET_FOUND)/include
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, copy-paste daemon, will fix it

@sonertari
Copy link
Collaborator

It's @droe who should review this pr, not me. Sorry.

@0x501D 0x501D closed this Aug 19, 2022
@sonertari
Copy link
Collaborator

Another reason that I couldn't review your pr is that I divert HTTP traffic to the E2Guardian web filter on my UTMFW project using SSLproxy. In fact, I have developed SSLproxy especially for HTTP/s content filtering (and for POP3/s and SMTP/s, or perhaps others).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants