Skip to content

Commit

Permalink
Updated Miscellaneous Code
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjackyliang committed Feb 5, 2016
1 parent 60366db commit c1b98b9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ These are the descriptions of the variables that may be changed depending on you
3. __VPN_RETRY__ - How many retries (times) if VPN fails to connect (default is __10__)
4. __VPN_INTERVAL__ - The time (in seconds) to wait between each retry (default is __30__)

##### Other Settings
##### VPN Features
1. __PORT_FWD__ - Carries an additional port forwarding check (default is empty, 51413 for Transmission)
2. __IP_CHECK__ - Which URL to use to check your external IP address (default is http://ipinfo.io/ip)

Expand Down
7 changes: 4 additions & 3 deletions transmissionVPN/portforward.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

<?php /* Port Forwarding Check for transmissionVPN
------------------------------------------------------- */

$host = $argv[1];
$port = $argv[2];

$connection = @fsockopen($host, $port, $errno, $errstr, 10);

if(is_resource($connection)) {
Expand Down
6 changes: 3 additions & 3 deletions transmissionVPN/transmissionvpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ VPN_INTERFACE=ppp0
VPN_RETRY=5
VPN_INTERVAL=10

# Other Settings
# VPN Features
PORT_FWD=
IP_CHECK=http://ipinfo.io/ip

Expand Down Expand Up @@ -134,7 +134,7 @@ repair)
echo "ipinfo.io IP is "$VPN_RESP
echo "Network Port is "$VPN_PORT

# If IP Address does not match
# If IP Address does not match or port is closed
if [ "$VPN_ADDR" != "$VPN_RESP" ] || [ "$VPN_PORT" == "closed" ]; then

# Show Message
Expand Down Expand Up @@ -269,7 +269,7 @@ uninstall)
*)
echo "Welcome to transmissionVPN!"
echo "Usage: start|stop|repair|install|uninstall"
echo "Example: transmissionvpn.sh start"
echo "Example: sh transmissionvpn.sh start"
;;
esac

Expand Down

0 comments on commit c1b98b9

Please sign in to comment.