v2ray配置

环境: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

config.json

{
    "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"
            }
        ]
    }
}
暂无评论

发送评论 编辑评论


				
上一篇
下一篇