码迷,mamicode.com
首页 > 其他好文 > 详细

centos6 安装socket代理服务器脚本

时间:2017-01-25 15:33:38      阅读:215      评论:0      收藏:0      [点我收藏+]

标签:socket ss5 centos 代理服务器

#!/bin/sh

###Warning:Not Modified

###Author:lichdiamond

###Date:2016-06-27

VARS=$#

if [ $VARS -lt 2 ];

then

    echo "please input your \"public_ip port\" as the para"

    exit 0;

fi

P_IP=$1

P_PORT=$2

yum -y install gcc gcc-c++ automake make pam-devel openldap-devel cyrus-sasl-devel openssl openssl-devel

wget http://sourceforge.net/projects/ss5/files/ss5/3.8.9-5/ss5-3.8.9-5.tar.gz/download

tar -zxf download&&rm -rf download

cd ss5-3.8.9

./configure && make && make install

cd ../

rm -rf ss5-3.8.9

chmod +x /etc/init.d/ss5

chkconfig --add ss5

chkconfig --level 345 ss5 on

sed -i ‘1,$ s/\#auth/auth/g‘ /etc/opt/ss5/ss5.conf

sed -i ‘1,$ s/\#permit/permit/g‘ /etc/opt/ss5/ss5.conf

echo "noadmin nooneknowpass" > /etc/opt/ss5/ss5.passwd

#curl http://118.184.176.13/dyndns/getip

echo "SS5_OPTS=\"-b $P_IP:$P_PORT\"" >> /etc/sysconfig/ss5

service ss5 start

netstat -apn | grep $P_PORT


centos6 安装socket代理服务器脚本

标签:socket ss5 centos 代理服务器

原文地址:http://diamondlich.blog.51cto.com/11893809/1894177

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!