From e4b58975b4c7b59db58f84ba911c4214cc6b3060 Mon Sep 17 00:00:00 2001 From: Jonas Leder Date: Sat, 2 Jan 2021 00:45:10 +0100 Subject: [PATCH] route banners through proxy when using tor --- public/index.php | 12 ++++++++++-- public/internal/getImage.php | 24 ++++++++++++++++++++++++ public/internal/header.php | 5 +++-- 3 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 public/internal/getImage.php diff --git a/public/index.php b/public/index.php index 49cd129..9b3d65d 100644 --- a/public/index.php +++ b/public/index.php @@ -3,6 +3,14 @@ include "internal/header.php"; include "internal/footer.php"; include "internal/mysql.php"; +if (strpos($_SERVER['HTTP_HOST'], '.onion') !== false) { + $heIMG = "/internal/getImage.php?imgID=1"; + $abuseIPIMG = "/internal/getImage.php?imgID=2"; +} else { + $abuseIPIMG = "https://www.abuseipdb.com/contributor/45130.svg"; + $heIMG = "https://ipv6.he.net/certification/create_badge.php?pass_name=jonasled&badge=3"; +} + getHeader("Jonas Leder", "home"); ?>
@@ -45,8 +53,8 @@ getHeader("Jonas Leder", "home");
\ No newline at end of file diff --git a/public/internal/header.php b/public/internal/header.php index 1964a8f..b7192cc 100644 --- a/public/internal/header.php +++ b/public/internal/header.php @@ -1,9 +1,10 @@