v2ray / discussion

For general discussion over Project V development and usage.
299 stars 34 forks source link

[大神求救] Cloudflare中转无效 ws+tls #811

Closed sooxt98 closed 3 years ago

sooxt98 commented 4 years ago

Cloudflare上云朵已开,FULL SSL已经设置好了,而且游览器能正常访问;我用的也是一级域名; 客户端就是连不上;

如果直接用 IP 就能连上

image

image

sooxt98 commented 4 years ago

config

{
  "log": {
    "loglevel": "info",
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log"
  },
  "inbounds": [
    {
      "port": 13373,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "xx",
            "level": 0,
            "alterId": 4
          },
          {
            "id": "xx",
            "level": 0,
            "alterId": 4
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "wsSettings": {
          "path": "/xxxxx"
        }
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "routing": {
    "rules": [
      {
        "type": "field",
        "ip": [
          "geoip:private"
        ],
        "outboundTag": "blocked"
      }
    ]
  }
}

error.log

2020/08/14 20:22:22 [Info] [815965928] v2ray.com/core/common/mux: session 25 ends. > io: read/write on closed pipe
2020/08/14 20:22:23 [Info] [294808431] v2ray.com/core/common/mux: received request for udp:127.0.0.53:53
2020/08/14 20:22:23 [Info] [294808431] v2ray.com/core/app/dispatcher: taking detour [blocked] for [udp:127.0.0.53:53]
2020/08/14 20:22:23 [Info] [294808431] v2ray.com/core/common/mux: session 36 ends. > io: read/write on closed pipe
2020/08/14 20:22:24 [Info] [815965928] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled
2020/08/14 20:22:24 [Info] [815965928] v2ray.com/core/common/mux: session 66 ends. > io: read/write on closed pipe
2020/08/14 20:22:26 [Info] [294808431] v2ray.com/core/common/mux: received request for tcp:91.108.56.121:443
2020/08/14 20:22:26 [Info] [294808431] v2ray.com/core/app/dispatcher: default route for tcp:91.108.56.121:443
2020/08/14 20:22:26 [Info] [294808431] v2ray.com/core/proxy/freedom: opening connection to tcp:91.108.56.121:443
2020/08/14 20:22:26 [Info] [294808431] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:91.108.56.121:443
2020/08/14 20:22:26 [Info] [294808431] v2ray.com/core/common/mux: received request for tcp:91.108.56.121:80
2020/08/14 20:22:26 [Info] [294808431] v2ray.com/core/app/dispatcher: default route for tcp:91.108.56.121:80
2020/08/14 20:22:26 [Info] [294808431] v2ray.com/core/proxy/freedom: opening connection to tcp:91.108.56.121:80
2020/08/14 20:22:26 [Info] [294808431] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:91.108.56.121:80
2020/08/14 20:22:27 [Info] [294808431] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled
2020/08/14 20:22:27 [Info] [294808431] v2ray.com/core/common/mux: session 38 ends. > io: read/write on closed pipe
2020/08/14 20:22:28 [Info] [294808431] v2ray.com/core/common/mux: received request for udp:127.0.0.53:53
2020/08/14 20:22:28 [Info] [294808431] v2ray.com/core/app/dispatcher: taking detour [blocked] for [udp:127.0.0.53:53]
2020/08/14 20:22:28 [Info] [294808431] v2ray.com/core/common/mux: session 39 ends. > io: read/write on closed pipe
2020/08/14 20:22:33 [Info] [294808431] v2ray.com/core/common/mux: received request for udp:127.0.0.53:53
2020/08/14 20:22:33 [Info] [294808431] v2ray.com/core/app/dispatcher: taking detour [blocked] for [udp:127.0.0.53:53]
2020/08/14 20:22:33 [Info] [294808431] v2ray.com/core/common/mux: session 40 ends. > io: read/write on closed pipe
2020/08/14 20:22:38 [Info] [294808431] v2ray.com/core/common/mux: received request for udp:127.0.0.53:53
2020/08/14 20:22:38 [Info] [294808431] v2ray.com/core/app/dispatcher: taking detour [blocked] for [udp:127.0.0.53:53]
2020/08/14 20:22:38 [Info] [294808431] v2ray.com/core/common/mux: session 41 ends. > io: read/write on closed pipe
2020/08/14 20:22:42 [Info] [294808431] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled
2020/08/14 20:22:42 [Info] [294808431] v2ray.com/core/common/mux: session 37 ends. > io: read/write on closed pipe
2020/08/14 20:22:43 [Info] [294808431] v2ray.com/core/common/mux: received request for udp:127.0.0.53:53
2020/08/14 20:22:43 [Info] [294808431] v2ray.com/core/app/dispatcher: taking detour [blocked] for [udp:127.0.0.53:53]
2020/08/14 20:22:43 [Info] [294808431] v2ray.com/core/common/mux: session 42 ends. > io: read/write on closed pipe
2020/08/14 20:22:48 [Info] [294808431] v2ray.com/core/common/mux: received request for udp:127.0.0.53:53
2020/08/14 20:22:48 [Info] [294808431] v2ray.com/core/app/dispatcher: taking detour [blocked] for [udp:127.0.0.53:53]
2020/08/14 20:22:48 [Info] [294808431] v2ray.com/core/common/mux: session 43 ends. > io: read/write on closed pipe
2020/08/14 20:22:51 [Info] [294808431] v2ray.com/core/common/mux: received request for udp:8.8.8.8:443
2020/08/14 20:22:51 [Info] [294808431] v2ray.com/core/app/dispatcher: default route for udp:8.8.8.8:443
2020/08/14 20:22:51 [Info] [294808431] v2ray.com/core/proxy/freedom: opening connection to udp:8.8.8.8:443
2020/08/14 20:22:51 [Info] [294808431] v2ray.com/core/common/mux: received request for udp:8.8.8.8:53
2020/08/14 20:22:51 [Info] [294808431] v2ray.com/core/app/dispatcher: default route for udp:8.8.8.8:53
2020/08/14 20:22:51 [Info] [294808431] v2ray.com/core/proxy/freedom: opening connection to udp:8.8.8.8:53
2020/08/14 20:22:51 [Info] [294808431] v2ray.com/core/common/mux: received request for tcp:news-headlines.tradingview.com:443
2020/08/14 20:22:51 [Info] [294808431] v2ray.com/core/app/dispatcher: default route for tcp:news-headlines.tradingview.com:443
2020/08/14 20:22:51 [Info] [294808431] v2ray.com/core/proxy/freedom: opening connection to tcp:news-headlines.tradingview.com:443
2020/08/14 20:22:51 [Info] [294808431] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:news-headlines.tradingview.com:443
2020/08/14 20:22:53 [Info] [294808431] v2ray.com/core/common/mux: received request for udp:127.0.0.53:53
2020/08/14 20:22:53 [Info] [294808431] v2ray.com/core/app/dispatcher: taking detour [blocked] for [udp:127.0.0.53:53]
2020/08/14 20:22:53 [Info] [294808431] v2ray.com/core/common/mux: session 47 ends. > io: read/write on closed pipe
2020/08/14 20:22:55 [Info] [294808431] v2ray.com/core/common/mux: received request for udp:1.1.1.1:53
2020/08/14 20:22:55 [Info] [294808431] v2ray.com/core/app/dispatcher: default route for udp:1.1.1.1:53
2020/08/14 20:22:55 [Info] [294808431] v2ray.com/core/proxy/freedom: opening connection to udp:1.1.1.1:53
2020/08/14 20:22:58 [Info] [294808431] v2ray.com/core/common/mux: received request for udp:127.0.0.53:53
2020/08/14 20:22:58 [Info] [294808431] v2ray.com/core/app/dispatcher: taking detour [blocked] for [udp:127.0.0.53:53]
2020/08/14 20:22:58 [Info] [294808431] v2ray.com/core/common/mux: session 49 ends. > io: read/write on closed pipe
2020/08/14 20:23:00 [Info] [294808431] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: connection ends > context canceled
2020/08/14 20:23:00 [Info] [294808431] v2ray.com/core/common/mux: session 45 ends. > io: read/write on closed pipe
2020/08/14 20:23:01 [Info] [294808431] v2ray.com/core/common/mux: received request for udp:8.8.8.8:53
2020/08/14 20:23:01 [Info] [294808431] v2ray.com/core/app/dispatcher: default route for udp:8.8.8.8:53
2020/08/14 20:23:01 [Info] [294808431] v2ray.com/core/proxy/freedom: opening connection to udp:8.8.8.8:53
2020/08/14 20:23:01 [Info] [294808431] v2ray.com/core/common/mux: received request for tcp:ss-prod-ue1-notif-70.aws.adobess.com:443
2020/08/14 20:23:01 [Info] [294808431] v2ray.com/core/app/dispatcher: default route for tcp:ss-prod-ue1-notif-70.aws.adobess.com:443
2020/08/14 20:23:01 [Info] [294808431] v2ray.com/core/proxy/freedom: opening connection to tcp:ss-prod-ue1-notif-70.aws.adobess.com:443
2020/08/14 20:23:01 [Info] [294808431] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:ss-prod-ue1-notif-70.aws.adobess.com:443
2020/08/14 20:23:03 [Info] [294808431] v2ray.com/core/common/mux: received request for udp:127.0.0.53:53
2020/08/14 20:23:03 [Info] [294808431] v2ray.com/core/app/dispatcher: taking detour [blocked] for [udp:127.0.0.53:53]
2020/08/14 20:23:03 [Info] [294808431] v2ray.com/core/common/mux: session 52 ends. > io: read/write on closed pipe
kslr commented 4 years ago

2020/08/14 20:22:23 [Info] [294808431] v2ray.com/core/app/dispatcher: taking detour [blocked] for [udp:127.0.0.53:53]

你的配置是最新的吗,为什么DNS会被屏蔽掉

sooxt98 commented 4 years ago

不知道唉,我怀疑是domain或ssl有问题,ip直连都没事;

genufish commented 4 years ago

你说的ip是服务器ip还是cloudflare ip。如果服务器ip可上,cloudflare ip上不了,去cloudflare的防火墙设置里看看。

sooxt98 commented 4 years ago

@genufish 服务器的ip,v2ray经过cf就废了,虽然web可以访问,但是就是连接不到

genufish commented 4 years ago

@genufish 服务器的ip,v2ray经过cf就废了,虽然web可以访问,但是就是连接不到

你开websocket转发了吗?然后去cf的防火墙检查一下,有时cf会有验证码页面影响v2ray连接

sooxt98 commented 4 years ago

@genufish websocket 转发默认开启的

genufish commented 4 years ago

@genufish websocket 转发默认开启的

那你到http://www.websocket-test.com/ 测试一下wss协议连接?

Janet-Baker commented 3 years ago

0. 你的服务器的v2ray监听了443端口了吗?是直接开放ws端口还是由nginx做反向代理? cloudflare 只允许对指定端口做转发 如果确定 由nginx监听443端口并转发ws到v2ray,或者由v2ray监听443端口并配置好了证书,再看下面。

  1. 检查一下你的客户端配置,哪个客户端设置的请求127.0.0.53:53 ,干掉它。
  2. 然后给path后面加一个 / 试试?例如:"path" : "/api/"
  3. 记得要在cf控制台Firewall界面添加规则允许(Allow) ,v2ray的ws流量可能会被干掉,最好加IP规则(在Tools里面)
github-actions[bot] commented 3 years ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days