2023-03-09更新
推荐使用Trojan-go,参考本站 Centos7安装配置Trojan-go + Nginx
2021-11-13安装v2ray
安装v2ray服务端
下载安装脚本
wget https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh --user-agent="Mozilla/5.0"
执行安装脚本
./install-release.sh
如果报错 Unable to establish SSL connection. 安装openssl
yum install openssl
修改配置文件
vi /usr/local/etc/v2ray/config.json
内容如下:
{
"inbound": {
"port": 1234, // 监听端口号,建议更改
"protocol": "vmess", // 通信协议,建议vmess
"settings": {
"clients": [
{
"id": "00000000-0000-0000-0000-000000000000", // UUID识别码,建议使用V2Ray(客户端)重新生成
"level": 1,
"alterId": 64
}
]
}
},
"streamSettings": {
"network": "tcp"
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
]
}
启动v2ray
systemctl start v2ray
安装v2ray客户端
GitHub地址:https://github.com/Cenmrev/V2RayX/releases
备用地址:http://static.imtrq.com/tools/V2RayX.app.zip
2021-05-13更新安装方法
github地址:https://github.com/shadowsocks/shadowsocks-libev
运行方式1:直接运行
ss-server -p 1234 -k 密码 -m xchacha20-ietf-poly1305 -a nobody
运行方式2:启动服务
systemctl start shadowsocks
启动失败,提示安装rng-utils/rng-tools
yum install rng-tools
rngd -r /dev/urandom
编译安装参考
https://b.awei.pub/2019/03/shadowsocks-libev/
yum install epel-release -y
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto c-ares-devel libev-devel libsodium-devel mbedtls-devel -y
yum install git
cd /tmp
git clone https://github.com/shadowsocks/shadowsocks-libev.git
cd /tmp/shadowsocks-libev
git submodule update --init --recursive
sh autogen.sh
./configure --disable-documentation
make
make install
创建配置文件
mkdir /etc/shadowsocks-libev
cp -r debian/config.json /etc/shadowsocks-libev/config.json
修改配置
vi /etc/shadowsocks-libev/config.json
内容如下:
{
"server":"0.0.0.0",
"mode":"tcp_and_udp",
"server_port":1234,
"local_port":1080,
"password":"密码",
"timeout":60,
"method":"xchacha20-ietf-poly1305"
}
配置shadowsocks-libev
cp rpm/SOURCES/systemd/shadowsocks-libev.default /etc/sysconfig/shadowsocks-libev
配置shadowsocks.service
cp rpm/SOURCES/systemd/shadowsocks-libev.service /usr/lib/systemd/system/shadowsocks.service
#修改/usr/bin/ss-server 为 /usr/local/bin/ss-server
systemctl daemon-reload
通过源安装参考
https://wp.hellonp.com/centos7%E5%AE%89%E8%A3%85shadowsocks-libev/
wget https://copr.fedorainfracloud.org/coprs/librehat/shadowsocks/repo/epel-7/librehat-shadowsocks-epel-7.repo
cp librehat-shadowsocks-epel-7.repo /etc/yum.repos.d/
yum install shadowsocks-libev
旧版:使用python安装
python -V
yum install python-setuptools
pip
#安装pip
easy_install pip
#安装shadowsocks
pip install shadowsocks
#启动shadowsocks
ssserver -p 1234 -k 密码 -m rc4-md5 --user nobody -d start
ssserver -p 1234 -k 密码 -m aes-256-cfb --user nobody -d start
文章作者:DOTATONG
发布日期:2020-11-02
评论