github.com/inazumav/sing-box@v0.0.0-20230926072359-ab51429a14f1/docs/configuration/shared/dial.md (about)

     1  ### Structure
     2  
     3  ```json
     4  {
     5    "detour": "upstream-out",
     6    "bind_interface": "en0",
     7    "inet4_bind_address": "0.0.0.0",
     8    "inet6_bind_address": "::",
     9    "routing_mark": 1234,
    10    "reuse_addr": false,
    11    "connect_timeout": "5s",
    12    "tcp_fast_open": false,
    13    "tcp_multi_path": false,
    14    "udp_fragment": false,
    15    "domain_strategy": "prefer_ipv6",
    16    "fallback_delay": "300ms"
    17  }
    18  ```
    19  
    20  ### Fields
    21  
    22  | Field                                                                                                                                    | Available Context |
    23  |------------------------------------------------------------------------------------------------------------------------------------------|-------------------|
    24  | `bind_interface` /`*bind_address` /`routing_mark` /`reuse_addr` / `tcp_fast_open` / `tcp_multi_path` / `udp_fragment` /`connect_timeout` | `detour` not set  |
    25  
    26  #### detour
    27  
    28  The tag of the upstream outbound.
    29  
    30  #### bind_interface
    31  
    32  The network interface to bind to.
    33  
    34  #### inet4_bind_address
    35  
    36  The IPv4 address to bind to.
    37  
    38  #### inet6_bind_address
    39  
    40  The IPv6 address to bind to.
    41  
    42  #### routing_mark
    43  
    44  !!! error ""
    45  
    46      Only supported on Linux.
    47  
    48  Set netfilter routing mark.
    49  
    50  #### reuse_addr
    51  
    52  Reuse listener address.
    53  
    54  #### tcp_fast_open
    55  
    56  Enable TCP Fast Open.
    57  
    58  #### tcp_multi_path
    59  
    60  !!! warning ""
    61  
    62      Go 1.21 required.
    63  
    64  Enable TCP Multi Path.
    65  
    66  #### udp_fragment
    67  
    68  Enable UDP fragmentation.
    69  
    70  #### connect_timeout
    71  
    72  Connect timeout, in golang's Duration format.
    73  
    74  A duration string is a possibly signed sequence of
    75  decimal numbers, each with optional fraction and a unit suffix,
    76  such as "300ms", "-1.5h" or "2h45m".
    77  Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
    78  
    79  #### domain_strategy
    80  
    81  One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
    82  
    83  If set, the requested domain name will be resolved to IP before connect.
    84  
    85  | Outbound | Effected domains         | Fallback Value                            |
    86  |----------|--------------------------|-------------------------------------------|
    87  | `direct` | Domain in request        | Take `inbound.domain_strategy` if not set | 
    88  | others   | Domain in server address | /                                         |
    89  
    90  #### fallback_delay
    91  
    92  The length of time to wait before spawning a RFC 6555 Fast Fallback connection.
    93  That is, is the amount of time to wait for connection to succeed before assuming
    94  that IPv4/IPv6 is misconfigured and falling back to other type of addresses.
    95  If zero, a default delay of 300ms is used.
    96  
    97  Only take effect when `domain_strategy` is set.