完成基础配置示例

This commit is contained in:
lingling 2022-03-01 19:48:43 +08:00
parent a0526285d0
commit eab8c03574
3 changed files with 110 additions and 0 deletions

65
v2ray_config_ws.md Normal file
View File

@ -0,0 +1,65 @@
## v2ray ws
```
{
"inbounds": [
{
"port": 9000,
"listen": "0.0.0.0",
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "2ee57806-f6e4-482a-ef08-7360c04cd3e5",
"alterId": 64
}
]
},
"streamSettings": {
"network": "ws",
"security": "none",
"wsSettings": {
"path": "/",
"headers": {}
}
},
"tag": "",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
},
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"rules": [
{
"ip": [
"geoip:private"
],
"outboundTag": "blocked",
"type": "field"
},
{
"outboundTag": "blocked",
"protocol": [
"bittorrent"
],
"type": "field"
}
]
}
}
```

22
v2ray_install.md Normal file
View File

@ -0,0 +1,22 @@
## 二进制安装v2ray
```
apt install ufw curl net-tools -y || yum install curl -y
#安装v2
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
#下载配置文件
wget https://shagain.club/wenjian/config.json
cat config.json > /usr/local/etc/v2ray/config.json
#启动
systemctl start v2ray
systemctl enable v2ray
ufw allow ssh
wget https://shagain.club/yijian.sh
bash yijian.sh
cat /usr/local/etc/v2ray/config.json | jq '.inbounds[0].port'
```

23
v2ray_install_docker.md Normal file
View File

@ -0,0 +1,23 @@
## docker安装v2ray
```
#本脚本基于https://hub.docker.com/r/teddysun/v2ray此容器
#时间2020年10月3日
#版本1.0
#默认端口9000
#ID:2ee57806-f6e4-482a-ef08-7360c04cd3e5
#额外ID64
echo "基于docker的v2ray+ws一键安装"
echo "欢迎使用"
yum -y install docker||apt update -y&&apt install docker.io -y
service docker start
mkdir -p /etc/v2ray
cd /etc/v2ray
wget https://shagain.club/wenjian/config.json
docker run -d -p 9000:9000 --name v2ray --restart=always -v /etc/v2ray:/etc/v2ray teddysun/v2ray
firewall-cmd --permanent --add-port=9000/tcp
firewall-cmd --reload
systemctl enable docker
echo "安装完成好好享用把"
```