]> Devi Nivas Git - simplescripts.git/commitdiff
Update IP script
authorAdvaith Menon <noreply-git@bp4k.net>
Sun, 18 Jan 2026 14:03:38 +0000 (09:03 -0500)
committerAdvaith Menon <noreply-git@bp4k.net>
Sun, 18 Jan 2026 14:03:38 +0000 (09:03 -0500)
* Remove partially incorrect explanation on leaking IP address
  (it is still possible for hackers to DDOS given an IP with
  an extremely secure router)
* Add useful links to Intranet PIA

unix/cgi/pia/ip.php

index 8e4302296fe67328c9e0de12e2a56fea209f4f0d..cf0b0dd49d7c0f6b69fb32b2a44acdb3df576295 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 define('DEVI_NIVAS_IP', '202.88.236.20');
 $ip = $_SERVER['REMOTE_ADDR'];
+$in_devinet = $ip === DEVI_NIVAS_IP
+    || !filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE);
 ?>
 <!DOCTYPE html>
 <html>
@@ -13,16 +15,18 @@ $ip = $_SERVER['REMOTE_ADDR'];
 <h1><?php echo htmlentities($ip); ?> is your IP Address</h1>
 <h3><i>...as visible to Devi Nivas servers.</i></h3>
 <?php
-if ($ip === DEVI_NIVAS_IP
-    || !filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE))
-    :
+if ($in_devinet):
 ?>
 <hr>
 <h2>You are successfully connected to Devinet.</h2>
 <?php endif; ?>
 <hr>
-<p><b>And a small rant:</b> NO, people can't steal your idenitity just because they have your IP address, assuming you use reasonably modern hardware, software and devices from your ISP. Also, your IP doesn't give out your exact address, which is anyway just a click away on WhitePages.
-Stop paying for a VPN service to "hide your IP" or "protect your address", you're just wasting your time and money and getting a bad connection in the process.</p>
-<p>With regards to streaming services, they figure out usage of VPNs via a curated blocklist. You can set up a VPN to a residential IP yourself to get a consistent and undetectable VPN that should also work on banking/government/streaming websites.</p>
+<p>Additional useful links:<br>
+<?php if ($in_devinet): ?>
+<a href="https://pia.devinivas.org/ip.php">Split-tunnel Devinet Connection Test (External)</a><br>
+<?php else: ?>
+<a href="https://pia.intranet.devinivas.org/ip.php">Split-tunnel Devinet Connection Test (Internal)</a><br>
+<?php endif; ?>
+</p>
 </body>
 </html>