SagerNet / sing-box

The universal proxy platform
https://sing-box.sagernet.org/
Other
18.79k stars 2.25k forks source link

出站的每个协议里面,都有个拨号字段,它的作用是什么? #1857

Closed bh7825 closed 3 months ago

bh7825 commented 3 months ago

出站的每个协议里面,都有个拨号字段,比如下面这个:

{
  "type": "shadowsocks",
  "tag": "ss-out",

  "server": "127.0.0.1",
  "server_port": 1080,
  "method": "2022-blake3-aes-128-gcm",
  "password": "8JCsPssfgS8tiRwiMlhARg==",
  "plugin": "",
  "plugin_opts": "",
  "network": "udp",
  "udp_over_tcp": false | {},
  "multiplex": {},

  ... // Dial Fields
}

拨号字段的结构是这样的:

{
  "detour": "upstream-out",
  "bind_interface": "en0",
  "inet4_bind_address": "0.0.0.0",
  "inet6_bind_address": "::",
  "routing_mark": 1234,
  "reuse_addr": false,
  "connect_timeout": "5s",
  "tcp_fast_open": false,
  "tcp_multi_path": false,
  "udp_fragment": false,
  "domain_strategy": "prefer_ipv6",
  "fallback_delay": "300ms"
}

问题: 1、拨号字段的作用是什么?什么场景下使用? 2、detour叫“上游出站的标签”,在上面这个例子中,detour应该填shadowsocks的标签ss-out是吗?

Laputa0 commented 2 months ago

detour我的理解是前置代理