CentOS 6 搭建SS

Posted by JJput on 05-18,2018

CentOS 6 搭建SS

##现有配置情况
端口8000~8010 密码统一aabbcc123

CentOS 密码远程连接密码aabbcc
root:123@admin
##教程

###使用方法:
使用root用户登录,运行以下命令:

 wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh
chmod +x shadowsocks.sh
./shadowsocks.sh 2>&1 | tee shadowsocks.log

安装完成后,脚本提示如下:

 Congratulations, shadowsocks install completed!
Your Server IP:your_server_ip
Your Server Port:8989
Your Password:your_password
Your Local IP:127.0.0.1
Your Local Port:1080
Your Encryption Method:aes-256-cfb

Welcome to visit:http://teddysun.com/342.html
Enjoy it!

###卸载方法:
使用root用户登录,运行以下命令:

 ./shadowsocks.sh uninstall

单用户配置文件sample(2015年01月21日修正):
配置文件路径:/etc/shadowsocks.json

 {
    "server":"your_server_ip",
    "server_port":8989,
    "local_address":"127.0.0.1",
    "local_port":1080,
    "password":"yourpassword",
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open": false
}

多用户多端口配置文件 sample(2015年01月21日修正):
配置文件路径:/etc/shadowsocks.json

 {
    "server":"your_server_ip",
    "local_address": "127.0.0.1",
    "local_port":1080,
    "port_password":{
         "8989":"password0",
         "9001":"password1",
         "9002":"password2",
         "9003":"password3",
         "9004":"password4"
    },
    "timeout":300,
    "method":"aes-256-cfb",
    "fast_open": false
}

使用命令(2015年01月21日修正):

  • 启动:/etc/init.d/shadowsocks start
  • 停止:/etc/init.d/shadowsocks stop
  • 重启:/etc/init.d/shadowsocks restart
  • 状态:/etc/init.d/shadowsocks status

###【一】修改文件

如果是使用普通用户登录的,需要先切换到管理员用户,打开终端,输入:su,接着按提示输入密码即可;然后使用命令进入需要修改文件的所在目录,常用的几个命令如下:

① cd + 目录名

② cd + 空格(退回上级目录)

③ cd + 空格 + /(退回最高级目录)

接着使用命令:vi + 文件名命令,打开文件,然后输入命令:/ + 要修改的关键词,查找到要修改的内容,然后使用命令进入【文本输入模式】,常用的命令如下:

① a 在光标之后开始输入文本
② A 在行尾开始输入文本
③ i 在光标之前开始输入文本
④ I 在行首第一个非空白字符前输入文本
⑤ o 在光标所在行后插入一空行
⑥ O 在光标所在行前插入一空行

###【二】保存退出

修改好文件后,如果在【文本输入模式】下,首先按“ESC” 键进入【命令模式】,然后输入“:”,进入【末行模式】,在末行模式下,可使用如下退出命令:

① q 是直接退出;

② wq 保存后退出;

③ q! 强制退出;

④ wq! 强制保存退出;