Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuzhen6 committed May 16, 2019
0 parents commit 87031ad
Show file tree
Hide file tree
Showing 5 changed files with 746 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
一键脚本安装shadowsocks/shadowsocksR/V2Ray + 开启bbr
---

一键脚本搭建shadowsocks/shadowsocksR/V2Ray + 设置开启自启动 + 升级内核&开启bbr加速。

## 教程如何访问
[Suniceman小站](http://suniceman.com)

## 支持系统
CentOS 6+

Debian 7+

Ubuntu 12+

## 使用教程
一键搭建ss/ssr:[一键脚本搭建shadowsocks+开启bbr](http://suniceman.com/2019/04/10/install-shadowsocks-in-one-command/)

## 推荐的VPS
### 国外VPS
[Vultr优惠网](https://www.vultryhw.cn/)

[搬瓦工优惠网](https://www.bwgyhw.cn/)

### 国内VPS
[阿里云优惠网](https://www.aliyunyhw.com)

[腾讯云优惠网](https://www.tengxunyunyhw.com)

### VPS信息汇总
[VPS GO](https://www.vpsgo.com)
88 changes: 88 additions & 0 deletions ss-fly
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
#!/bin/bash

### BEGIN INIT INFO
# Provides: suniceman.com
# Required-Start: $network $syslog
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: shadowsocks control
# Description: shadowsocks control
### END INIT INFO
NAME=Shadowsocks
if [ -f /usr/bin/ssserver ]; then
DAEMON=/usr/bin/ssserver
elif [ -f /usr/local/bin/ssserver ]; then
DAEMON=/usr/local/bin/ssserver
fi
CONF=/etc/shadowsocks.json
RETVAL=0

check_running(){
PID=$(ps -ef | grep -v grep | grep -i "${DAEMON}" | awk '{print $2}')
if [ -n "$PID" ]; then
return 0
else
return 1
fi
}

do_start(){
check_running
if [ $? -eq 0 ]; then
echo "$NAME (pid $PID)正在运行"
exit 0
else
$DAEMON -c $CONF -d start
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo "$NAME启动成功"
else
echo "$NAME启动失败,请检查日志信息定位问题"
fi
fi
}

do_stop(){
check_running
if [ $? -eq 0 ]; then
$DAEMON -c $CONF -d stop
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo "$NAME停止成功"
else
echo "$NAME停止失败,请检查日志信息定位问题"
fi
else
echo "$NAME已经停止了"
RETVAL=1
fi
}

do_status(){
check_running
if [ $? -eq 0 ]; then
echo "$NAME (pid $PID)正在运行"
else
echo "$NAME未运行。可以执行/etc/init.d/ss-fly start启动ss"
RETVAL=1
fi
}

do_restart(){
do_stop
sleep 0.5
do_start
}

case "$1" in
start|stop|restart|status)
do_$1
;;
*)
echo "使用方法: $0 { start | stop | restart | status }"
RETVAL=1
;;
esac

exit $RETVAL
Loading

0 comments on commit 87031ad

Please sign in to comment.