v2ray / v2ray-core

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

同一局域网下的主机无法连接CentOS8主机部署的V2Ray客户端服务,配置文件IP是0.0.0.0; #3303

Closed LX3star closed 2 months ago

LX3star commented 2 months ago

1) 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明) 版本是V2Ray 5.16.1 2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。 在CentOS8主机部署并启动V2Ray客户端服务,在同一局域网下的其他主机可以不安装V2Ray客户端,通过使用CentOS8主机的客户端服务实现访问谷歌等网站。 3) 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等) 已经在CentOS8主机上成功安装并启动V2Ray客户端服务,也成功在CentOS8主机上访问到谷歌网站,但是同一局域网的window主机无法连接上CentOS8主机上的客户端;window主机可以ping得通CentOS8主机,CentOS8主机上的端口也是正常开放状态。 image 4) 你期待看到的正确表现是怎样的? 同一局域网下只需要CentOS8主机安装并启动V2Ray客户端服务,其他局域网内的主机可以不用安装客户端,只需通过CentOS8主机客户端就可以访问谷歌等网站。

5) 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

    // 无配置

客户端配置:

    {
  "policy": {
    "system": {
      "statsInboundUplink": true,
      "statsInboundDownlink": true
    }
  },
  "inbounds": [
    {
      "tag": "proxy",
      "port": 10808,
      "listen": "0.0.0.0",
      "protocol": "socks",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      },
      "settings": {
        "auth": "noauth",
        "udp": true,
        "ip": null,
        "address": null,
        "clients": null,
        "decryption": null
      },
      "streamSettings": null
    },
    {
      "tag": "api",
      "port": 2548,
      "listen": "127.0.0.1",
      "protocol": "dokodemo-door",
      "sniffing": null,
      "settings": {
        "auth": null,
        "udp": false,
        "ip": null,
        "address": "127.0.0.1",
        "clients": null,
        "decryption": null
      },
      "streamSettings": null
    }
  ],
  "outbounds": [
    {
      "tag": "proxy",
      "protocol": "vmess",
      "settings": {
        "vnext": [
          {
            "address": "???",
            "port": ???,
            "users": [
              {
                "id": "???",
                "alterId": 0,
                "email": "???",
                "security": "auto",
                "encryption": null,
                "flow": null
              }
            ]
          }
        ],
        "servers": null,
        "response": null
      },
      "streamSettings": {
        "network": "ws",
        "security": null,
        "tlsSettings": null,
        "tcpSettings": null,
        "kcpSettings": null,
        "wsSettings": {
          "connectionReuse": true,
          "path": "/freestyle",
          "headers": {
            "Host": "???"
          }
        },
        "httpSettings": null,
        "quicSettings": null,
        "xtlsSettings": null
      },
      "mux": {
        "enabled": false,
        "concurrency": -1
      }
    },
    {
      "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
      }
    ]
  }
}
LX3star commented 2 months ago

我的锅,是centos主机防火墙没有开放对应的端口。