Alvin9999 / new-pac

翻墙-科学上网、自由上网、免费科学上网、免费翻墙、油管youtube、fanqiang、软件、VPN、一键翻墙浏览器,vps一键搭建翻墙服务器脚本/教程,免费shadowsocks/ss/ssr/v2ray/goflyway账号/节点,翻墙梯子,电脑、手机、iOS、安卓、windows、Mac、Linux、路由器翻墙、科学上网、youtube视频下载、youtube油管镜像/免翻墙网站、美区apple id共享账号
55.52k stars 9.45k forks source link

v2ray无法上外网 #1212

Closed liu2277 closed 2 years ago

liu2277 commented 2 years ago

1、VPS系统版本是:CentOS Linux release 7.9.2009 (Core) 2、V2ray的版本:脚本版本:V2.5.52;内核版本:4.44.0;win10 v2rayN客户端:v3.18;手机客户端:kiysunebi 2.3.6 3、出现的不正常的现象:客户端可以ping通,可以tcp通,但是没有办法登陆外网地址如google。 尝试登陆google的时候win10客户端报错: [Warning] failed to handler mux client connection > v2ray.com/core/proxy/vmess/outbound: connection ends > v2ray.com/core/proxy/vmess/outbound: failed to read header > v2ray.com/core/proxy/vmess/encoding: failed to read response header > websocket: close 1000 (normal) 该问题我已经尝试搜索到的同步时区的解决方式但是无济于事 4、我希望可以正常的连接 5、我的配置 服务器:

{
  "policy": {
    "system": {
      "statsInboundUplink": true,
      "statsInboundDownlink": true
    }
  },
  "log": {
    "access": "",
    "error": "",
    "loglevel": "warning"
  },
  "inbounds": [
    {
      "tag": "proxy",
      "port": 10808,
      "listen": "127.0.0.1",
      "protocol": "socks",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      },
      "settings": {
        "auth": "noauth",
        "udp": true,
        "ip": null,
        "address": null,
        "clients": null
      },
      "streamSettings": null
    },
    {
      "tag": "api",
      "port": 4592,
      "listen": "127.0.0.1",
      "protocol": "dokodemo-door",
      "sniffing": null,
      "settings": {
        "auth": null,
        "udp": false,
        "ip": null,
        "address": "127.0.0.1",
        "clients": null
      },
      "streamSettings": null
    }
  ],
  "outbounds": [
    {
      "tag": "proxy",
      "protocol": "vmess",
      "settings": {
        "vnext": [
          {
            "address": "t1.liu2277.xyz",
            "port": 443,
            "users": [
              {
                "id": "0f4b6ee1-963b-7044-5386-af4a17a8a1a0",
                "alterId": 0,
                "email": "t@t.tt",
                "security": "auto"
              }
            ]
          }
        ],
        "servers": null,
        "response": null
      },
      "streamSettings": {
        "network": "ws",
        "security": "tls",
        "tlsSettings": {
          "allowInsecure": false,
          "serverName": "t1.liu2277.xyz"
        },
        "tcpSettings": null,
        "kcpSettings": null,
        "wsSettings": {
          "connectionReuse": true,
          "path": "/ouqjvws",
          "headers": {
            "Host": "t1.liu2277.xyz"
          }
        },
        "httpSettings": null,
        "quicSettings": null
      },
      "mux": {
        "enabled": true,
        "concurrency": 8
      }
    },
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {
        "vnext": null,
        "servers": null,
        "response": null
      },
      "streamSettings": null,
      "mux": null
    },
    {
      "tag": "block",
      "protocol": "blackhole",
      "settings": {
        "vnext": null,
        "servers": null,
        "response": {
          "type": "http"
        }
      },
      "streamSettings": null,
      "mux": null
    }
  ],
  "stats": {},
  "api": {
    "tag": "api",
    "services": [
      "StatsService"
    ]
  },
  "dns": null,
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      {
        "type": "field",
        "port": null,
        "inboundTag": [
          "api"
        ],
        "outboundTag": "api",
        "ip": null,
        "domain": null
      }
    ]
  }
}

客户端

{
  "policy": null,
  "log": {
    "access": "",
    "error": "",
    "loglevel": "warning"
  },
  "inbounds": [
    {
      "tag": null,
      "port": 443,
      "listen": null,
      "protocol": "vmess",
      "sniffing": null,
      "settings": {
        "auth": null,
        "udp": false,
        "ip": null,
        "address": null,
        "clients": [
          {
            "id": "0f4b6ee1-963b-7044-5386-af4a17a8a1a0",
            "alterId": 0,
            "email": "t@t.tt",
            "security": null
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "security": "tls",
        "tlsSettings": {
          "allowInsecure": false,
          "serverName": "t1.liu2277.xyz"
        },
        "tcpSettings": null,
        "kcpSettings": null,
        "wsSettings": {
          "connectionReuse": true,
          "path": "/ouqjvws",
          "headers": {
            "Host": "t1.liu2277.xyz"
          }
        },
        "httpSettings": null,
        "quicSettings": null
      }
    }
  ],
  "outbounds": null,
  "stats": null,
  "api": null,
  "dns": null,
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": []
  }
}

6、服务器端access日志

2022/03/04 18:47:17 185.191.231.157:60940 rejected  proxy/trojan: not trojan protocol
2022/03/04 18:47:17 185.191.231.157:61173 rejected  proxy/trojan: not trojan protocol
2022/03/04 18:56:36 123.168.113.67:22573 rejected  common/drain: common/drain: unable to drain connection > websocket: close 1006 (abnormal closure): unexpected EOF > proxy/vmess/encoding: invalid user: VMessAEAD is enforced and a non VMessAEAD connection is received. You can still disable this security feature with environment variable v2ray.vmess.aead.forced = false . You will not be able to enable legacy header workaround in the future.
2022/03/05 11:25:37 123.168.113.67:20922 rejected  common/drain: common/drain: drained connection > proxy/vmess/encoding: invalid user: VMessAEAD is enforced and a non VMessAEAD connection is received. You can still disable this security feature with environment variable v2ray.vmess.aead.forced = false . You will not be able to enable legacy header workaround in the future.
2022/03/05 11:25:39 123.168.113.67:20924 rejected  common/drain: common/drain: drained connection > proxy/vmess/encoding: invalid user: VMessAEAD is enforced and a non VMessAEAD connection is received. You can still disable this security feature with environment variable v2ray.vmess.aead.forced = false . You will not be able to enable legacy header workaround in the future.
2022/03/05 11:25:42 123.168.113.67:20939 rejected  common/drain: common/drain: drained connection > proxy/vmess/encoding: invalid user: VMessAEAD is enforced and a non VMessAEAD connection is received. You can still disable this security feature with environment variable v2ray.vmess.aead.forced = false . You will not be able to enable legacy header workaround in the future.
2022/03/05 11:25:44 123.168.113.67:20942 rejected  common/drain: common/drain: drained connection > proxy/vmess/encoding: invalid user: VMessAEAD is enforced and a non VMessAEAD connection is received. You can still disable this security feature with environment variable v2ray.vmess.aead.forced = false . You will not be able to enable legacy header workaround in the future.

7、服务器端error日志

2022/03/05 11:26:56 [Info] [1565375534] app/proxyman/inbound: connection ends > proxy/vless/inbound: fallback ends > proxy/vless/inbound: failed to fallback request payload > read tcp x.x.x.x:x(服务器地址和端口)->123.168.113.67:21055: use of closed network connection
2022/03/05 11:26:56 [Info] [1565375534] app/proxyman/inbound: failed to close connection > use of closed network connection
2022/03/05 11:26:57 [Info] [366320050] proxy/vless/inbound: firstLen = 192
2022/03/05 11:26:57 [Info] [366320050] proxy/vless/inbound: fallback starts > proxy/vless/encoding: invalid request version
2022/03/05 11:26:57 [Info] [366320050] proxy/vless/inbound: realAlpn = http/1.1
2022/03/05 11:26:57 [Info] [366320050] proxy/vless/inbound: realPath = /ouqjvws
2022/03/05 11:26:57 [Info] [621231391] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 123.168.113.67:21059 > common/drain: common/drain: drained connection > proxy/vmess/encoding: invalid user: VMessAEAD is enforced and a non VMessAEAD connection is received. You can still disable this security feature with environment variable v2ray.vmess.aead.forced = false . You will not be able to enable legacy header workaround in the future.
2022/03/05 11:26:57 [Info] [366320050] app/proxyman/inbound: connection ends > proxy/vless/inbound: fallback ends > proxy/vless/inbound: failed to fallback request payload > read tcp x.x.x.x:x(服务器地址和端口)->123.168.113.67:21059: use of closed network connection
2022/03/05 11:26:57 [Info] [366320050] app/proxyman/inbound: failed to close connection > use of closed network connection

8、nginx配置 [root@vultr log]# cat /etc/nginx/nginx.conf


user  nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}

还请各位不惜赐教

Alvin9999 commented 2 years ago

VPS服务器时间和本地时间相差90秒内

liu2277 commented 2 years ago

VPS服务器时间和本地时间相差90秒内

我需要调整到90s以内吗?我之前我的vps是用的UTC时间一直没有出这个问题

liu2277 commented 2 years ago

VPS服务器时间和本地时间相差90秒内 image 我的时间确实是在90s之内

Alvin9999 commented 2 years ago

你的v2ray传输协议是什么

liu2277 commented 2 years ago

你的v2ray传输协议是什么

image

Alvin9999 commented 2 years ago

试试TCP、websocket

liu2277 commented 2 years ago

TCP、websocket

image 是这个吗?

Alvin9999 commented 2 years ago

不是,用这个脚本source <(curl -sL https://multi.netlify.app/v2ray.sh) --zh

liu2277 commented 2 years ago

不是,用这个脚本source <(curl -sL https://multi.netlify.app/v2ray.sh) --zh

这个脚本设置了TCPping不通 客户端报错 Warning] failed to handler mux client connection > v2ray.com/core/proxy/vmess/outbound: connection ends > v2ray.com/core/proxy/vmess/outbound: failed to read header > v2ray.com/core/proxy/vmess/encoding: failed to read response header > EOF

Alvin9999 commented 2 years ago

卸载之前的v2ray,重新安装看看

liu2277 commented 2 years ago

卸载之前的v2ray,重新安装看看

image 这个v2ray的脚本无法启动,我应该继续使用这个脚本还是使用vless那个?我看到帖子里面说centos安装这个脚本有bug

Alvin9999 commented 2 years ago

这个脚本系统推荐使用Debain10。高阶篇脚本都是TLS加密的,没有单独的TCP、WebSocket等这些传输协议。而网络封锁是变化的,也许某个时间段TLS加密这种方式容易被干扰,那么就可以试试单独的TCP、WebSocket等这些传输协议。

liu2277 commented 2 years ago

明白了,我在尝试一下这些不同的协议,谢谢您今天百忙之中帮我。