环境:centos-8-x86_64
| bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) |
| sudo systemctl start v2ray |
| sudo systemctl stop v2ray |
| sudo systemctl restart v2ray |
/usr/local/etc/v2ray
| { |
| "log": { |
| "access": "/var/log/v2ray/access.log", |
| "error": "/var/log/v2ray/error.log", |
| "loglevel": "warning" |
| }, |
| "inbounds": [ |
| { |
| "port": 自定义端口, |
| "protocol": "vmess", |
| "settings": { |
| "clients": [ |
| { |
| "id": "自定义id", |
| "level": 1, |
| "alterId": 100 |
| } |
| ] |
| }, |
| "streamSettings": { |
| "network": "ws", |
| "security": "auto", |
| "wsSettings": { |
| "path": "/自定义path", |
| "headers": { |
| "Host": "url路径" |
| } |
| } |
| } |
| } |
| ], |
| "outbounds": [ |
| { |
| "protocol": "freedom", |
| "settings": {} |
| }, |
| { |
| "protocol": "blackhole", |
| "settings": {}, |
| "tag": "blocked" |
| } |
| ], |
| "routing": { |
| "rules": [ |
| { |
| "type": "field", |
| "ip": [ |
| "geoip:private" |
| ], |
| "outboundTag": "blocked" |
| } |
| ] |
| } |
| } |