Xray-examples icon indicating copy to clipboard operation
Xray-examples copied to clipboard

listen:0.0.0.0 这个配置项是可选的么?

Open toyo2333 opened this issue 2 years ago • 2 comments

我看example里

有的协议的inbound里有写 "listen::0.0.0.0

而有的就没有,比如ss的

{
  "inbounds": [
    {
      "port": 1234,
      "protocol": "shadowsocks",
      "settings": {
        "method": "2022-blake3-aes-128-gcm",
        "password": "{{ psk }}",
        "network": "tcp,udp"
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom"
    }
  ]
}

我想知道,这个是为啥?可选的么?

toyo2333 avatar Jul 16 '23 15:07 toyo2333

listen::0.0.0.0 不写它,它默认也是用 0.0.0.0 这个值,表示对外监听,且同时v4v6监听。

写 127.0.0.1 是监听本机,不对外。

chika0801 avatar Jul 16 '23 16:07 chika0801

listen::0.0.0.0 不写它,它默认也是用 0.0.0.0 这个值,表示对外监听,且同时v4v6监听。

写 127.0.0.1 是监听本机,不对外。

感谢!

toyo2333 avatar Jul 16 '23 16:07 toyo2333