BrutalProxy [master]

Initial push

=> f1d7e7176719f4bd8956dfacc9ab4a13540e9936

diff --git a/INSTALL.md b/INSTALL.md
new file mode 100644
index 0000000..8872eba
--- /dev/null
+++ b/INSTALL.md
@@ -0,0 +1,56 @@
+# Installation
+
+## Install ImageMagick
+
+Make sure ImageMagick is installed.
+
+However this works on whatever distribution of whatever operating system you use.
+
+If you do not have access to the command `convert` then this will not work.
+
+## Add a webserver
+
+Copy brutalproxy to a directory and create a webserver to point to that directory.
+
+Make sure brutalproxy is owned by the same user as the webserver. If you use Nginx on a Debian-like linux, this is probaby www-data. If you need a server block because you don't understand how Nginx works, it should look something like this:
+
+```
+server {
+  listen        80;
+  server_name   proxy.brutal.url;
+
+  root          /var/www/brutalproxy;
+  index         index.php;
+
+  location ~ \.php$ {
+    try_files $uri =404;
+    fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
+    fastcgi_index index.php;
+    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+    include fastcgi_params;
+  }
+}
+```
+
+You might want to add some kind of password control too so people don't casually hijack this to download bad things.
+
+## Add a cron job
+
+Edit cleanup.sh to point to where you installed brutalproxy.
+
+Create a cron job to run cleanup.sh once a day. This will sweep out any old files from the cache so you don't burn up your disk space.
+
+```
+0    12  * * *   root    /var/www/brutalproxy/cleanup.sh
+```
+
+## Patch Brutaldon
+
+Open brutaldon.patch with your favorite text editor and replace "http://proxy.brutal.url" with the actual URL where you are running brutalproxy.
+
+Save.
+
+Apply the patch to your Brutaldon installation.
+
+Restart Brutaldon.
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d168027
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,7 @@
+This work is released to the Public Domain.
+
+The author, Anonymous, has dedicated the work to the public domain by waiving all copyright and related or neighboring rights to this work worldwide under copyright law including all related and neighboring rights.
+
+Even beyond the extent allowed by law: if your law does not allow a creator to give his work to the public domain then your law is fake and gay and retarded.
+
+You can copy, modify, distribute and create derivative work, even for commercial purposes, all without asking permission.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..621f4b0
--- /dev/null
+++ b/README.md
@@ -0,0 +1,21 @@
+# brutalproxy
+
+## Why make this?
+
+Google and browser developers broke the World Wide Web.
+
+The cancer of SSL everywhere, enforced by browsers redirecting to HTTPS and Google downranking pages that don't use HTTPS.
+
+This affects almost every server in 2024, and the Fediverse is not immune.
+
+Brutaldon gets halfway to a solution since you can run it on port 80 and let your server negotiate communication with all the HTTPS-only Fediverse servers. Unfortunately, images still won't load.
+
+Even if you can get an image pulled down to your computer, there is a good chance of it being Googleshit WEBP that isn't supported.
+
+## How does it work?
+
+This is a dead simple caching proxy that downloads images over HTTPS, processes it with ImageMagick to remove malicious payloads and reduce the size, and sends it over port 80 to your legacy browser.
+
+It includes a simple template patch for Brutaldon to alter its image links so that they go yo your proxy instead of the actual server.
+
+Images are downloaded and stored using an sha1 hash of the full URL.
diff --git a/brutaldon.patch b/brutaldon.patch
new file mode 100644
index 0000000..b9eb0ce
--- /dev/null
+++ b/brutaldon.patch
@@ -0,0 +1,191 @@
+diff --color -Naur brutaldon/brutaldon/templates/accounts/account_partial.html ../brutaldon/brutaldon/templates/accounts/account_partial.html
+--- brutaldon/brutaldon/templates/accounts/account_partial.html 2025-01-12 07:16:02.990452094 -0500
++++ ../brutaldon/brutaldon/templates/accounts/account_partial.html      2025-01-11 12:26:07.630934344 -0500
+@@ -1,7 +1,7 @@
+ 
 +
 +

 +- {{ account.user.acct }} +

 +diff --color -Naur brutaldon/brutaldon/templates/base.html ../brutaldon/brutaldon/templates/base.html +--- brutaldon/brutaldon/templates/base.html 2025-01-12 07:16:02.990452094 -0500 ++++ ../brutaldon/brutaldon/templates/base.html 2025-01-11 12:25:55.401743609 -0500 +@@ -82,7 +82,7 @@ +
Proxy Information
Original URL
gemini://git.brainsocks.xyz/brutalproxy/master/cdiff/f1d7e7176719f4bd8956dfacc9ab4a13540e9936
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
914.390677 milliseconds
Gemini-to-HTML Time
1.404344 milliseconds

This content has been proxied by September (ba2dc).