Hello Fellow ruTorrent Users.
I am using a RaspberryPi with rTorrent, ruTorrent and a VPN Connection. I was always wondering whether the VPN was working correctly. Of course there are Solutions like http://torguard.net/checkmytorrentipaddress.php but all i wanted is to have the external IP of the RaspberryPi visible.
Since i am no super programmer i came to this solution (maybe someone can implement a better idea)
I uploaded a simple php script called ip.php with the following content to a webserver where i can access it. The File only contains the following lines:
Code:
$client_ip = $_SERVER['REMOTE_ADDR'];
echo $client_ip;This php script just displays the IP-Number of the computer accessing the file.
Now i modified two files of the ruTorrent Source:
index.html was renamed index.php
the line <title></title> was changed to
Code:
<title>External IP: <?php echo file_get_contents('http://YOUR_SERVER_WITH_THE_FILE/ip.php'); ?></title>
The last change is a bit of a hack since i have no clue how to get PHP into JavaScript Files...
I changed the webui.js in the js Folder so that the title won't be changed by the JavaScript:
Code:
/*newTitle+="ruTorrent v"+self.version;
if(document.title!=newTitle)
document.title = newTitle;*/(just add /* and */)
Now whenever i access my RaspberryPI ruTorrent Interface i can see the External IP in the Title.
It actually works quite nice.
What do you think?
I am using a RaspberryPi with rTorrent, ruTorrent and a VPN Connection. I was always wondering whether the VPN was working correctly. Of course there are Solutions like http://torguard.net/checkmytorrentipaddress.php but all i wanted is to have the external IP of the RaspberryPi visible.
Since i am no super programmer i came to this solution (maybe someone can implement a better idea)
I uploaded a simple php script called ip.php with the following content to a webserver where i can access it. The File only contains the following lines:
Code:
$client_ip = $_SERVER['REMOTE_ADDR'];
echo $client_ip;This php script just displays the IP-Number of the computer accessing the file.
Now i modified two files of the ruTorrent Source:
index.html was renamed index.php
the line <title></title> was changed to
Code:
<title>External IP: <?php echo file_get_contents('http://YOUR_SERVER_WITH_THE_FILE/ip.php'); ?></title>
The last change is a bit of a hack since i have no clue how to get PHP into JavaScript Files...
I changed the webui.js in the js Folder so that the title won't be changed by the JavaScript:
Code:
/*newTitle+="ruTorrent v"+self.version;
if(document.title!=newTitle)
document.title = newTitle;*/(just add /* and */)
Now whenever i access my RaspberryPI ruTorrent Interface i can see the External IP in the Title.
It actually works quite nice.
What do you think?