v2ray / v2ray-core

A platform for building proxies to bypass network restrictions.
https://www.v2ray.com/
MIT License
45.25k stars 8.93k forks source link

恳请各位大佬帮看下fail是什么原因导致的 #2092

Closed man2018 closed 4 years ago

man2018 commented 4 years ago

提交 Issue 之前请先阅读 Issue 指引,然后回答下面的问题,谢谢。 除非特殊情况,请完整填写所有问题。不按模板发的 issue 将直接被关闭。 如果你遇到的问题不是 V2Ray 的 bug,比如你不清楚要如何配置,请使用Discussion进行讨论。

1) 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明) 4.21.3 2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。 无论什么方式都会出现我反应的这个问题 3) 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等) 就一直提示fail这些东西 4) 你期待看到的正确表现是怎样的? 期望不再提示这些东西 5) 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置: { "log" : { "access": "/var/log/v2ray/access.log", "error": "/var/log/v2ray/error.log", "loglevel": "warning" }, "inbound": { "port": 10000, "listen": "127.0.0.1", "protocol": "vmess", "settings": { "clients": [ { "id": "19e23d80-3a4d-4277-b37b-79d5d8456f95", "alterId": 64 } ] }, "streamSettings": { "network": "ws", "security": "auto", "wsSettings": { "path": "/ray" } } }, "outbound": { "protocol": "freedom", "settings": {} } }

    // 在这里附上服务器端配置文件

客户端配置:

    // 在这里附上客户端配置

6) 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。 2019/12/08 16:32:46 [Info] [3119472940] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled 2019/12/08 16:32:46 [Info] [1533011891] v2ray.com/core/app/proxyman/inbound: failed to close connection > v2ray.com/core/transport/internet/websocket: failed to close connection > v2ray.com/core/transport/internet/websocket: websocket: close sent 2019/12/08 16:32:46 [Info] [1249020073] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: failed to transfer request > websocket: close 1000 (normal) 2019/12/08 16:32:46 [Info] [1249020073] v2ray.com/core/app/proxyman/inbound: failed to close connection > v2ray.com/core/transport/internet/websocket: failed to close connection > v2ray.com/core/transport/internet/websocket: websocket: close sent 2019/12/08 16:32:46 [Info] [1249020073] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled 2019/12/08 16:32:46 [Info] [2862342515] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: connection ends > v2ray.com/core/proxy/vmess/inbound: failed to transfer request > websocket: close 1000 (normal) 2019/12/08 16:32:46 [Info] [2862342515] v2ray.com/core/app/proxyman/inbound: failed to close connection > v2ray.com/core/transport/internet/websocket: failed to close connection > v2ray.com/core/transport/internet/websocket: websocket: close sent 2019/12/08 16:32:46 [Info] [2862342515] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled 2019/12/08 16:34:00 [Warning] v2ray.com/core/transport/internet/websocket: failed to serve http for WebSocket > accept tcp 127.0.0.1:10000: use of closed network connection 服务器端错误日志:

    // 在这里附上服务器端日志

客户端错误日志: 我用的是quantumult x,没有日志。 quantumult x是这样设置的vmess=www.xxx.com:443, method=chacha20-ietf-poly1305, password=19e23d80-3a4d-4277-b37b-79d5d8456f95, obfs=wss, obfs-uri=/ray, fast-open=false, udp-relay=false, tag=vmess-ws-tls

    // 在这里附上客户端日志

7) 请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/access.log 文件中。 root@ipv4-ipv6-test:~# tail -f /var/log/v2ray/access.log 2019/12/08 16:35:01 127.0.0.1:35292 accepted tcp:cdn.ampproject.org:443 2019/12/08 16:35:01 127.0.0.1:35294 accepted tcp:cdn.ampproject.org:443 2019/12/08 16:35:03 127.0.0.1:35300 accepted tcp:www-zdnet-com.cdn.ampproject.org:443 2019/12/08 16:35:10 127.0.0.1:35304 accepted tcp:oauthaccountmanager.googleapis.com:443 2019/12/08 16:35:17 127.0.0.1:35308 accepted tcp:play.googleapis.com:443 2019/12/08 16:35:20 127.0.0.1:35312 accepted tcp:clients4.google.com:443 2019/12/08 16:35:20 127.0.0.1:35316 accepted tcp:play.googleapis.com:443 2019/12/08 16:35:27 127.0.0.1:35322 accepted tcp:encrypted-tbn3.gstatic.com:443 2019/12/08 16:35:28 127.0.0.1:35320 accepted tcp:play.googleapis.com:443 2019/12/08 16:35:28 127.0.0.1:35326 accepted tcp:encrypted-tbn0.gstatic.com:443 2019/12/08 16:37:51 127.0.0.1:35332 accepted tcp:clients4.google.com:443 2019/12/08 16:37:53 127.0.0.1:35336 accepted tcp:www.google.com:443 2019/12/08 16:38:36 127.0.0.1:35340 accepted tcp:www.google.com:443

    // 在这里附上服务器端日志

8) 其它相关的配置文件(如 Nginx)和相关日志。 root@ipv4-ipv6-test:~# cat /usr/local/nginx/conf/vhost/www.xxx.com.conf server { listen 80; listen [::]:80; server_name www.xxx.com xxx.com; index index.html index.htm index.php default.html default.htm default.php; root /home/wwwroot/www.xxx.com;

if ($server_port = 80 ) { return 301 https://$host$request_uri; }

    include rewrite/wordpress.conf;
    #error_page   404   /404.html;

    # Deny access to PHP files in specific directory
    #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

    include enable-php-pathinfo.conf;

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires      30d;
    }

    location ~ .*\.(js|css)?$
    {
        expires      12h;
    }

    location ~ /.well-known {
        allow all;
    }

    location ~ /\.
    {
        deny all;
    }

    access_log off;
}

server {

proxy_intercept_errors on;

    error_page 400 = https://www.baidu.com;

    add_header Strict-Transport-Security "max-age=31536000";

    client_max_body_size 1024G;
    client_body_timeout 120;

    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name www.xxx.com xxx.com;
    index index.html index.htm index.php default.html default.htm default.php;
    root  /home/wwwroot/www.xxx.com;

    ssl_certificate /usr/local/nginx/conf/ssl/www.xxx.com/fullchain.cer;
    ssl_certificate_key /usr/local/nginx/conf/ssl/www.xxx.com/www.xxx.com.key;
    ssl_session_timeout 5m;
    #ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;

ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; ssl_prefer_server_ciphers on; ssl_ciphers "TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5"; ssl_session_cache builtin:1000 shared:SSL:10m;

openssl dhparam -out /usr/local/nginx/conf/ssl/dhparam.pem 2048

    ssl_dhparam /usr/local/nginx/conf/ssl/dhparam.pem;

location /ray {
    proxy_redirect off;
    proxy_pass http://127.0.0.1:10000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $http_host;
}

    include rewrite/wordpress.conf;
    #error_page   404   /404.html;

    # Deny access to PHP files in specific directory
    #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

    include enable-php-pathinfo.conf;

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires      30d;
    }

    location ~ .*\.(js|css)?$
    {
        expires      12h;
    }

    location ~ /.well-known {
        allow all;
    }

    location ~ /\.
    {
        deny all;
    }

    access_log off;
}

9) 如果 V2Ray 无法启动,请附上 --test 输出。 可以正常启动,可以正常翻墙,就是有那些fail 通常的命令为 /usr/bin/v2ray/v2ray --test --config /etc/v2ray/config.json。请按实际情况修改。

10) 如果 V2Ray 服务运行不正常,请附上 journal 日志。

通常的命令为 journalctl -u v2ray

请预览一下你填的内容再提交。

我是使用Lnmp1.6搭建的wordpress(最新版),然后进行的path分流,翻墙一切正常的,但是日志就有那种fail提示,我找不到解决方案,再来麻烦下大家

man2018 commented 4 years ago

为什么关闭呢

kslr commented 4 years ago

这是第二个issue 第一个已经要求配置和日志,第二个依旧如此,也无视其他热心人的响应,乱糟糟的代码就直接扔了上来