This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
listen=`netstat -f inet -p tcp -nRa | grep 'LISTEN' | awk '{ print $4 }' | grep 10024` | |
if [ $listen ]; then | |
if [ $listen = '127.0.0.1.10024' ]; then | |
exit | |
fi | |
fi | |
nohup ssh -ntt -D 10024 user@yourdomain.com > /dev/null 2>&1 & | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
server_config=~/.ssh/server_config | |
echo 'Servers:' | |
cat -n $server_config | |
echo 'Please seletct: >' | |
read n | |
echo 'Connecting....' | |
command=`sed -n ${n}p $server_config | awk -F'#' '{ print $1; }'` | |
$command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while true ; do | |
listen=`netstat -f inet -p tcp -nRa | grep 'LISTEN' | awk '{ print $4 }' | grep 18080` | |
if [ -z $listen ]; then | |
nohup ssh -ntt -D 18080 user@domain.com > /dev/null 2>&1 & | |
fi | |
sleep 30 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
base_path=$(cd `dirname $0`;pwd) | |
daemon_pid=$base_path/daemon.pid | |
if [ -e $daemon_pid ]; then | |
pid=`cat $daemon_pid` | |
exist=`ps aux | grep $pid | grep -v grep` | |
if [ ${#exist} -gt 0 ]; then | |
exit 0 | |
else | |
echo -n '' > $daemon_pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function rel($b, $a, $lvl = 1) { | |
$first_b = retrieve_first($b); | |
$first_a = retrieve_first($a); | |
if (!$first_a) { | |
return ltrim($b, '/'); | |
} | |
if (!$first_b) { | |
return '../' . rel($b, rm_first($a), $lvl); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-A INPUT -s 104.255.67.211/32 -j DROP | |
-A INPUT -s 172.245.13.250/32 -j DROP | |
-A INPUT -s 180.97.106.0/24 -j DROP | |
-A INPUT -s 185.11.146.127/32 -j DROP | |
-A INPUT -s 185.209.52.0/24 -j DROP | |
-A INPUT -s 185.62.189.0/24 -j DROP | |
-A INPUT -s 185.62.190.0/24 -j DROP | |
-A INPUT -s 188.209.52.0/24 -j DROP | |
-A INPUT -s 192.227.171.98/32 -j DROP | |
-A INPUT -s 192.3.194.218/32 -j DROP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# shadowsocks-libev This scripts turns shadowsocks server on | |
# | |
# Author: Charles Tang <charles.tang@live.com> | |
# | |
# description: shadowsocks-libev is a proxy software. | |
# processname: ss-server | |
# config: /usr/local/etc/ss-server.conf | |
# pidfile: /var/run/ss-server.pid |