Skip to content

Instantly share code, notes, and snippets.

View sancome's full-sized avatar

Evan Chau sancome

View GitHub Profile
@sancome
sancome / install-ss-tproxy.sh
Last active September 12, 2018 03:11
Auto install SS-TProxy on CentOS 7.3 Minimal
#!/bin/sh
#
# Script for automatic setup of an SS-TPROXY server on CentOS 7.3 Minimal.
#
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
exiterr() { echo "Error: $1" >&2; exit 1; }
exiterr2() { exiterr "'yum install' failed."; }
bigecho() { echo; echo -e "\033[36m $1 \033[0m"; }
use strict;
use warnings;
use Time::gmtime;
use Time::localtime;
sub gcd {
my ($a, $b) = @_;
return ( $b ? gcd($b ,$a % $b) : $a);
}
__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__| ** LOADER **
#!/bin/bash
if [ $(id -u) != "0" ]; then
printf "Error: You must be root to run this tool!\n"
exit 1
fi
clear
printf "
##################################################
# #