完成基础配置示例
This commit is contained in:
parent
a0526285d0
commit
eab8c03574
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
|
@ -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'
|
||||
```
|
|
@ -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 "安装完成好好享用把"
|
||||
|
||||
```
|
Loading…
Reference in New Issue