location / {
        set $flagv2 0;
        if ($http_sec_websocket_version = 13){
            set $flagv2 "${flagv2}1";  
        } 
        if ($http_sec_websocket_key != ""){
            set $flagv2 "${flagv2}1";  
        }
        if ($flagv2 = "011"){
            proxy_pass http://yourvv2;
        }
        if ($flagv2 != "011"){
            proxy_pass https://www.qq.com;
        }
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
        proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;  
    }

标签: none

添加新评论