Projects STRLCPY sing-box Commits e717852c
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    cmd/sing-box/cmd_run.go
    skipped 101 lines
    102 102   if err != nil {
    103 103   return option.Options{}, err
    104 104   }
     105 + if len(optionsList) == 1 {
     106 + return optionsList[0].options, nil
     107 + }
    105 108   var mergedOptions option.Options
    106 109   for _, options := range optionsList {
    107 110   mergedOptions, err = badjsonmerge.MergeOptions(options.options, mergedOptions)
    skipped 75 lines
  • ■ ■ ■ ■ ■
    inbound/default_tcp.go
    skipped 2 lines
    3 3  import (
    4 4   "context"
    5 5   "net"
    6  - "net/netip"
    7 6   
    8 7   "github.com/sagernet/sing-box/adapter"
    9 8   "github.com/sagernet/sing-box/common/proxyproto"
    skipped 6 lines
    16 15   
    17 16  func (a *myInboundAdapter) ListenTCP() (net.Listener, error) {
    18 17   var err error
    19  - bindAddr := M.SocksaddrFrom(netip.Addr(a.listenOptions.Listen), a.listenOptions.ListenPort)
     18 + bindAddr := M.SocksaddrFrom(a.listenOptions.Listen.Build(), a.listenOptions.ListenPort)
    20 19   var tcpListener net.Listener
    21 20   if !a.listenOptions.TCPFastOpen {
    22 21   tcpListener, err = net.ListenTCP(M.NetworkFromNetAddr(N.NetworkTCP, bindAddr.Addr), bindAddr.TCPAddr())
    skipped 56 lines
  • ■ ■ ■ ■ ■
    inbound/default_udp.go
    skipped 1 lines
    2 2   
    3 3  import (
    4 4   "net"
    5  - "net/netip"
    6 5   "os"
    7 6   "time"
    8 7   
    skipped 7 lines
    16 15  )
    17 16   
    18 17  func (a *myInboundAdapter) ListenUDP() (net.PacketConn, error) {
    19  - bindAddr := M.SocksaddrFrom(netip.Addr(a.listenOptions.Listen), a.listenOptions.ListenPort)
     18 + bindAddr := M.SocksaddrFrom(a.listenOptions.Listen.Build(), a.listenOptions.ListenPort)
    20 19   var lc net.ListenConfig
    21 20   var udpFragment bool
    22 21   if a.listenOptions.UDPFragment != nil {
    skipped 213 lines
  • ■ ■ ■ ■ ■ ■
    option/inbound.go
    skipped 116 lines
    117 117  }
    118 118   
    119 119  type ListenOptions struct {
    120  - Listen ListenAddress `json:"listen"`
    121  - ListenPort uint16 `json:"listen_port,omitempty"`
    122  - TCPFastOpen bool `json:"tcp_fast_open,omitempty"`
    123  - UDPFragment *bool `json:"udp_fragment,omitempty"`
    124  - UDPFragmentDefault bool `json:"-"`
    125  - UDPTimeout int64 `json:"udp_timeout,omitempty"`
    126  - ProxyProtocol bool `json:"proxy_protocol,omitempty"`
    127  - ProxyProtocolAcceptNoHeader bool `json:"proxy_protocol_accept_no_header,omitempty"`
    128  - Detour string `json:"detour,omitempty"`
     120 + Listen *ListenAddress `json:"listen,omitempty"`
     121 + ListenPort uint16 `json:"listen_port,omitempty"`
     122 + TCPFastOpen bool `json:"tcp_fast_open,omitempty"`
     123 + UDPFragment *bool `json:"udp_fragment,omitempty"`
     124 + UDPFragmentDefault bool `json:"-"`
     125 + UDPTimeout int64 `json:"udp_timeout,omitempty"`
     126 + ProxyProtocol bool `json:"proxy_protocol,omitempty"`
     127 + ProxyProtocolAcceptNoHeader bool `json:"proxy_protocol_accept_no_header,omitempty"`
     128 + Detour string `json:"detour,omitempty"`
    129 129   InboundOptions
    130 130  }
    131 131   
  • ■ ■ ■ ■ ■
    option/types.go
    skipped 15 lines
    16 16   
    17 17  type ListenAddress netip.Addr
    18 18   
     19 +func NewListenAddress(addr netip.Addr) *ListenAddress {
     20 + address := ListenAddress(addr)
     21 + return &address
     22 +}
     23 + 
    19 24  func (a ListenAddress) MarshalJSON() ([]byte, error) {
    20 25   addr := netip.Addr(a)
    21 26   if !addr.IsValid() {
    skipped 16 lines
    38 43   return nil
    39 44  }
    40 45   
    41  -func (a ListenAddress) Build() netip.Addr {
    42  - return (netip.Addr)(a)
     46 +func (a *ListenAddress) Build() netip.Addr {
     47 + if a == nil {
     48 + return netip.AddrFrom4([4]byte{127, 0, 0, 1})
     49 + }
     50 + return (netip.Addr)(*a)
    43 51  }
    44 52   
    45 53  type NetworkList string
    skipped 185 lines
  • ■ ■ ■ ■ ■ ■
    test/direct_test.go
    skipped 15 lines
    16 16   Tag: "mixed-in",
    17 17   MixedOptions: option.HTTPMixedInboundOptions{
    18 18   ListenOptions: option.ListenOptions{
    19  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     19 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    20 20   ListenPort: clientPort,
    21 21   },
    22 22   },
    skipped 2 lines
    25 25   Type: C.TypeDirect,
    26 26   DirectOptions: option.DirectInboundOptions{
    27 27   ListenOptions: option.ListenOptions{
    28  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     28 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    29 29   ListenPort: serverPort,
    30 30   ProxyProtocol: true,
    31 31   },
    skipped 31 lines
  • ■ ■ ■ ■
    test/go.mod
    skipped 9 lines
    10 10   github.com/docker/docker v20.10.18+incompatible
    11 11   github.com/docker/go-connections v0.4.0
    12 12   github.com/gofrs/uuid v4.4.0+incompatible
    13  - github.com/sagernet/sing v0.2.1-0.20230318083058-18cd006d266e
     13 + github.com/sagernet/sing v0.2.1-0.20230318094614-4bbf5f2c3046
    14 14   github.com/sagernet/sing-shadowsocks v0.1.2-0.20230221080503-769c01d6bba9
    15 15   github.com/spyzhov/ajson v0.7.1
    16 16   github.com/stretchr/testify v1.8.2
    skipped 91 lines
  • ■ ■ ■ ■ ■ ■
    test/go.sum
    skipped 125 lines
    126 126  github.com/sagernet/reality v0.0.0-20230312150606-35ea9af0e0b8/go.mod h1:B8lp4WkQ1PwNnrVMM6KyuFR20pU8jYBD+A4EhJovEXU=
    127 127  github.com/sagernet/sing v0.0.0-20220817130738-ce854cda8522/go.mod h1:QVsS5L/ZA2Q5UhQwLrn0Trw+msNd/NPGEhBKR/ioWiY=
    128 128  github.com/sagernet/sing v0.1.8/go.mod h1:jt1w2u7lJQFFSGLiRrRIs5YWmx4kAPfWuOejuDW9qMk=
    129  -github.com/sagernet/sing v0.2.1-0.20230318083058-18cd006d266e h1:KDaZ0GIlpdhCVn2vf7YL2r/8E5kSZiMMeMgn5CF7eJU=
    130  -github.com/sagernet/sing v0.2.1-0.20230318083058-18cd006d266e/go.mod h1:9uHswk2hITw8leDbiLS/xn0t9nzBcbePxzm9PJhwdlw=
     129 +github.com/sagernet/sing v0.2.1-0.20230318094614-4bbf5f2c3046 h1:/+ZWbxRvQmco9ES2qT5Eh/x/IiQRjAcUyRG/vQ4dpxc=
     130 +github.com/sagernet/sing v0.2.1-0.20230318094614-4bbf5f2c3046/go.mod h1:9uHswk2hITw8leDbiLS/xn0t9nzBcbePxzm9PJhwdlw=
    131 131  github.com/sagernet/sing-dns v0.1.4 h1:7VxgeoSCiiazDSaXXQVcvrTBxFpOePPq/4XdgnUDN+0=
    132 132  github.com/sagernet/sing-dns v0.1.4/go.mod h1:1+6pCa48B1AI78lD+/i/dLgpw4MwfnsSpZo0Ds8wzzk=
    133 133  github.com/sagernet/sing-shadowsocks v0.1.2-0.20230221080503-769c01d6bba9 h1:qS39eA4C7x+zhEkySbASrtmb6ebdy5v0y2M6mgkmSO0=
    skipped 145 lines
  • ■ ■ ■ ■ ■ ■
    test/http_test.go
    skipped 15 lines
    16 16   Tag: "mixed-in",
    17 17   MixedOptions: option.HTTPMixedInboundOptions{
    18 18   ListenOptions: option.ListenOptions{
    19  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     19 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    20 20   ListenPort: clientPort,
    21 21   },
    22 22   },
    skipped 2 lines
    25 25   Type: C.TypeMixed,
    26 26   MixedOptions: option.HTTPMixedInboundOptions{
    27 27   ListenOptions: option.ListenOptions{
    28  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     28 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    29 29   ListenPort: serverPort,
    30 30   },
    31 31   },
    skipped 31 lines
  • ■ ■ ■ ■ ■ ■
    test/hysteria_test.go
    skipped 16 lines
    17 17   Tag: "mixed-in",
    18 18   MixedOptions: option.HTTPMixedInboundOptions{
    19 19   ListenOptions: option.ListenOptions{
    20  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     20 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    21 21   ListenPort: clientPort,
    22 22   },
    23 23   },
    skipped 2 lines
    26 26   Type: C.TypeHysteria,
    27 27   HysteriaOptions: option.HysteriaInboundOptions{
    28 28   ListenOptions: option.ListenOptions{
    29  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     29 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    30 30   ListenPort: serverPort,
    31 31   },
    32 32   UpMbps: 100,
    skipped 57 lines
    90 90   Type: C.TypeHysteria,
    91 91   HysteriaOptions: option.HysteriaInboundOptions{
    92 92   ListenOptions: option.ListenOptions{
    93  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     93 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    94 94   ListenPort: serverPort,
    95 95   },
    96 96   UpMbps: 100,
    skipped 42 lines
    139 139   Type: C.TypeMixed,
    140 140   MixedOptions: option.HTTPMixedInboundOptions{
    141 141   ListenOptions: option.ListenOptions{
    142  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     142 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    143 143   ListenPort: clientPort,
    144 144   },
    145 145   },
    skipped 26 lines
  • ■ ■ ■ ■ ■ ■
    test/inbound_detour_test.go
    skipped 18 lines
    19 19   Tag: "mixed-in",
    20 20   MixedOptions: option.HTTPMixedInboundOptions{
    21 21   ListenOptions: option.ListenOptions{
    22  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     22 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    23 23   ListenPort: clientPort,
    24 24   },
    25 25   },
    skipped 2 lines
    28 28   Type: C.TypeShadowsocks,
    29 29   ShadowsocksOptions: option.ShadowsocksInboundOptions{
    30 30   ListenOptions: option.ListenOptions{
    31  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     31 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    32 32   ListenPort: serverPort,
    33 33   Detour: "detour",
    34 34   },
    skipped 6 lines
    41 41   Tag: "detour",
    42 42   ShadowsocksOptions: option.ShadowsocksInboundOptions{
    43 43   ListenOptions: option.ListenOptions{
    44  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     44 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    45 45   ListenPort: otherPort,
    46 46   },
    47 47   Method: method,
    skipped 46 lines
  • ■ ■ ■ ■ ■ ■
    test/mux_cool_test.go
    skipped 40 lines
    41 41   Type: C.TypeVMess,
    42 42   VMessOptions: option.VMessInboundOptions{
    43 43   ListenOptions: option.ListenOptions{
    44  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     44 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    45 45   ListenPort: serverPort,
    46 46   },
    47 47   Users: []option.VMessUser{
    skipped 37 lines
    85 85   Type: C.TypeMixed,
    86 86   MixedOptions: option.HTTPMixedInboundOptions{
    87 87   ListenOptions: option.ListenOptions{
    88  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     88 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    89 89   ListenPort: clientPort,
    90 90   },
    91 91   },
    skipped 25 lines
    117 117   Tag: "mixed-in",
    118 118   MixedOptions: option.HTTPMixedInboundOptions{
    119 119   ListenOptions: option.ListenOptions{
    120  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     120 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    121 121   ListenPort: clientPort,
    122 122   },
    123 123   },
    skipped 2 lines
    126 126   Type: C.TypeVMess,
    127 127   VMessOptions: option.VMessInboundOptions{
    128 128   ListenOptions: option.ListenOptions{
    129  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     129 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    130 130   ListenPort: serverPort,
    131 131   },
    132 132   Users: []option.VMessUser{
    skipped 39 lines
  • ■ ■ ■ ■ ■ ■
    test/mux_test.go
    skipped 38 lines
    39 39   Tag: "mixed-in",
    40 40   MixedOptions: option.HTTPMixedInboundOptions{
    41 41   ListenOptions: option.ListenOptions{
    42  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     42 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    43 43   ListenPort: clientPort,
    44 44   },
    45 45   },
    skipped 2 lines
    48 48   Type: C.TypeShadowsocks,
    49 49   ShadowsocksOptions: option.ShadowsocksInboundOptions{
    50 50   ListenOptions: option.ListenOptions{
    51  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     51 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    52 52   ListenPort: serverPort,
    53 53   },
    54 54   Method: method,
    skipped 45 lines
    100 100   Tag: "mixed-in",
    101 101   MixedOptions: option.HTTPMixedInboundOptions{
    102 102   ListenOptions: option.ListenOptions{
    103  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     103 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    104 104   ListenPort: clientPort,
    105 105   },
    106 106   },
    skipped 2 lines
    109 109   Type: C.TypeVMess,
    110 110   VMessOptions: option.VMessInboundOptions{
    111 111   ListenOptions: option.ListenOptions{
    112  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     112 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    113 113   ListenPort: serverPort,
    114 114   },
    115 115   Users: []option.VMessUser{
    skipped 42 lines
  • ■ ■ ■ ■ ■ ■
    test/naive_test.go
    skipped 17 lines
    18 18   Type: C.TypeNaive,
    19 19   NaiveOptions: option.NaiveInboundOptions{
    20 20   ListenOptions: option.ListenOptions{
    21  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     21 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    22 22   ListenPort: otherPort,
    23 23   },
    24 24   Users: []auth.User{
    skipped 39 lines
    64 64   Type: C.TypeNaive,
    65 65   NaiveOptions: option.NaiveInboundOptions{
    66 66   ListenOptions: option.ListenOptions{
    67  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     67 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    68 68   ListenPort: serverPort,
    69 69   },
    70 70   Users: []auth.User{
    skipped 35 lines
    106 106   Type: C.TypeNaive,
    107 107   NaiveOptions: option.NaiveInboundOptions{
    108 108   ListenOptions: option.ListenOptions{
    109  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     109 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    110 110   ListenPort: serverPort,
    111 111   },
    112 112   Users: []auth.User{
    skipped 30 lines
  • ■ ■ ■ ■ ■ ■
    test/reality_test.go
    skipped 19 lines
    20 20   Tag: "mixed-in",
    21 21   MixedOptions: option.HTTPMixedInboundOptions{
    22 22   ListenOptions: option.ListenOptions{
    23  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     23 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    24 24   ListenPort: clientPort,
    25 25   },
    26 26   },
    skipped 2 lines
    29 29   Type: C.TypeVLESS,
    30 30   VLESSOptions: option.VLESSInboundOptions{
    31 31   ListenOptions: option.ListenOptions{
    32  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     32 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    33 33   ListenPort: serverPort,
    34 34   },
    35 35   Users: []option.VLESSUser{
    skipped 25 lines
    61 61   Tag: "trojan",
    62 62   TrojanOptions: option.TrojanInboundOptions{
    63 63   ListenOptions: option.ListenOptions{
    64  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     64 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    65 65   ListenPort: otherPort,
    66 66   },
    67 67   Users: []option.TrojanUser{
    skipped 102 lines
    170 170   Tag: "mixed-in",
    171 171   MixedOptions: option.HTTPMixedInboundOptions{
    172 172   ListenOptions: option.ListenOptions{
    173  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     173 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    174 174   ListenPort: clientPort,
    175 175   },
    176 176   },
    skipped 2 lines
    179 179   Type: C.TypeVLESS,
    180 180   VLESSOptions: option.VLESSInboundOptions{
    181 181   ListenOptions: option.ListenOptions{
    182  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     182 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    183 183   ListenPort: serverPort,
    184 184   },
    185 185   Users: []option.VLESSUser{
    skipped 25 lines
    211 211   Tag: "trojan",
    212 212   TrojanOptions: option.TrojanInboundOptions{
    213 213   ListenOptions: option.ListenOptions{
    214  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     214 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    215 215   ListenPort: otherPort,
    216 216   },
    217 217   Users: []option.TrojanUser{
    skipped 76 lines
  • ■ ■ ■ ■ ■ ■
    test/shadowsocks_test.go
    skipped 82 lines
    83 83   Type: C.TypeShadowsocks,
    84 84   ShadowsocksOptions: option.ShadowsocksInboundOptions{
    85 85   ListenOptions: option.ListenOptions{
    86  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     86 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    87 87   ListenPort: serverPort,
    88 88   },
    89 89   Method: method,
    skipped 18 lines
    108 108   Type: C.TypeMixed,
    109 109   MixedOptions: option.HTTPMixedInboundOptions{
    110 110   ListenOptions: option.ListenOptions{
    111  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     111 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    112 112   ListenPort: clientPort,
    113 113   },
    114 114   },
    skipped 24 lines
    139 139   Tag: "mixed-in",
    140 140   MixedOptions: option.HTTPMixedInboundOptions{
    141 141   ListenOptions: option.ListenOptions{
    142  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     142 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    143 143   ListenPort: clientPort,
    144 144   },
    145 145   },
    skipped 2 lines
    148 148   Type: C.TypeShadowsocks,
    149 149   ShadowsocksOptions: option.ShadowsocksInboundOptions{
    150 150   ListenOptions: option.ListenOptions{
    151  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     151 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    152 152   ListenPort: serverPort,
    153 153   },
    154 154   Method: method,
    skipped 42 lines
    197 197   Tag: "mixed-in",
    198 198   MixedOptions: option.HTTPMixedInboundOptions{
    199 199   ListenOptions: option.ListenOptions{
    200  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     200 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    201 201   ListenPort: clientPort,
    202 202   },
    203 203   },
    skipped 2 lines
    206 206   Type: C.TypeShadowsocks,
    207 207   ShadowsocksOptions: option.ShadowsocksInboundOptions{
    208 208   ListenOptions: option.ListenOptions{
    209  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     209 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    210 210   ListenPort: serverPort,
    211 211   },
    212 212   Method: method,
    skipped 45 lines
  • ■ ■ ■ ■
    test/shadowsocksr_test.go
    skipped 21 lines
    22 22   Type: C.TypeMixed,
    23 23   MixedOptions: option.HTTPMixedInboundOptions{
    24 24   ListenOptions: option.ListenOptions{
    25  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     25 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    26 26   ListenPort: clientPort,
    27 27   },
    28 28   },
    skipped 21 lines
  • ■ ■ ■ ■ ■ ■
    test/shadowtls_test.go
    skipped 41 lines
    42 42   Type: C.TypeMixed,
    43 43   MixedOptions: option.HTTPMixedInboundOptions{
    44 44   ListenOptions: option.ListenOptions{
    45  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     45 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    46 46   ListenPort: clientPort,
    47 47   },
    48 48   },
    skipped 3 lines
    52 52   Tag: "in",
    53 53   ShadowTLSOptions: option.ShadowTLSInboundOptions{
    54 54   ListenOptions: option.ListenOptions{
    55  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     55 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    56 56   ListenPort: serverPort,
    57 57   Detour: "detour",
    58 58   },
    skipped 13 lines
    72 72   Tag: "detour",
    73 73   ShadowsocksOptions: option.ShadowsocksInboundOptions{
    74 74   ListenOptions: option.ListenOptions{
    75  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     75 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    76 76   ListenPort: otherPort,
    77 77   },
    78 78   Method: method,
    skipped 55 lines
    134 134   Type: C.TypeShadowTLS,
    135 135   ShadowTLSOptions: option.ShadowTLSInboundOptions{
    136 136   ListenOptions: option.ListenOptions{
    137  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     137 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    138 138   ListenPort: serverPort,
    139 139   },
    140 140   Handshake: option.ShadowTLSHandshakeOptions{
    skipped 39 lines
    180 180   Tag: "in",
    181 181   MixedOptions: option.HTTPMixedInboundOptions{
    182 182   ListenOptions: option.ListenOptions{
    183  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     183 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    184 184   ListenPort: clientPort,
    185 185   },
    186 186   },
    skipped 2 lines
    189 189   Type: C.TypeShadowTLS,
    190 190   ShadowTLSOptions: option.ShadowTLSInboundOptions{
    191 191   ListenOptions: option.ListenOptions{
    192  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     192 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    193 193   ListenPort: serverPort,
    194 194   Detour: "detour",
    195 195   },
    skipped 12 lines
    208 208   Tag: "detour",
    209 209   ShadowsocksOptions: option.ShadowsocksInboundOptions{
    210 210   ListenOptions: option.ListenOptions{
    211  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     211 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    212 212   },
    213 213   Method: method,
    214 214   Password: password,
    skipped 45 lines
    260 260   Type: C.TypeMixed,
    261 261   MixedOptions: option.HTTPMixedInboundOptions{
    262 262   ListenOptions: option.ListenOptions{
    263  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     263 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    264 264   ListenPort: clientPort,
    265 265   },
    266 266   },
    skipped 3 lines
    270 270   Tag: "detour",
    271 271   ShadowsocksOptions: option.ShadowsocksInboundOptions{
    272 272   ListenOptions: option.ListenOptions{
    273  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     273 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    274 274   ListenPort: otherPort,
    275 275   },
    276 276   Method: method,
    skipped 48 lines
  • ■ ■ ■ ■
    test/ss_plugin_test.go
    skipped 36 lines
    37 37   Type: C.TypeMixed,
    38 38   MixedOptions: option.HTTPMixedInboundOptions{
    39 39   ListenOptions: option.ListenOptions{
    40  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     40 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    41 41   ListenPort: clientPort,
    42 42   },
    43 43   },
    skipped 21 lines
  • ■ ■ ■ ■ ■ ■
    test/tfo_test.go
    skipped 18 lines
    19 19   Tag: "mixed-in",
    20 20   MixedOptions: option.HTTPMixedInboundOptions{
    21 21   ListenOptions: option.ListenOptions{
    22  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     22 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    23 23   ListenPort: clientPort,
    24 24   },
    25 25   },
    skipped 2 lines
    28 28   Type: C.TypeShadowsocks,
    29 29   ShadowsocksOptions: option.ShadowsocksInboundOptions{
    30 30   ListenOptions: option.ListenOptions{
    31  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     31 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    32 32   ListenPort: serverPort,
    33 33   TCPFastOpen: true,
    34 34   },
    skipped 39 lines
  • ■ ■ ■ ■ ■ ■
    test/tls_test.go
    skipped 16 lines
    17 17   Tag: "mixed-in",
    18 18   MixedOptions: option.HTTPMixedInboundOptions{
    19 19   ListenOptions: option.ListenOptions{
    20  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     20 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    21 21   ListenPort: clientPort,
    22 22   },
    23 23   },
    skipped 2 lines
    26 26   Type: C.TypeTrojan,
    27 27   TrojanOptions: option.TrojanInboundOptions{
    28 28   ListenOptions: option.ListenOptions{
    29  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     29 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    30 30   ListenPort: serverPort,
    31 31   },
    32 32   Users: []option.TrojanUser{
    skipped 53 lines
  • ■ ■ ■ ■ ■ ■
    test/trojan_test.go
    skipped 24 lines
    25 25   Type: C.TypeMixed,
    26 26   MixedOptions: option.HTTPMixedInboundOptions{
    27 27   ListenOptions: option.ListenOptions{
    28  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     28 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    29 29   ListenPort: clientPort,
    30 30   },
    31 31   },
    skipped 29 lines
    61 61   Tag: "mixed-in",
    62 62   MixedOptions: option.HTTPMixedInboundOptions{
    63 63   ListenOptions: option.ListenOptions{
    64  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     64 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    65 65   ListenPort: clientPort,
    66 66   },
    67 67   },
    skipped 2 lines
    70 70   Type: C.TypeTrojan,
    71 71   TrojanOptions: option.TrojanInboundOptions{
    72 72   ListenOptions: option.ListenOptions{
    73  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     73 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    74 74   ListenPort: serverPort,
    75 75   },
    76 76   Users: []option.TrojanUser{
    skipped 54 lines
    131 131   Tag: "mixed-in",
    132 132   MixedOptions: option.HTTPMixedInboundOptions{
    133 133   ListenOptions: option.ListenOptions{
    134  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     134 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    135 135   ListenPort: clientPort,
    136 136   },
    137 137   },
    skipped 2 lines
    140 140   Type: C.TypeTrojan,
    141 141   TrojanOptions: option.TrojanInboundOptions{
    142 142   ListenOptions: option.ListenOptions{
    143  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     143 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    144 144   ListenPort: serverPort,
    145 145   },
    146 146   Users: []option.TrojanUser{
    skipped 38 lines
  • ■ ■ ■ ■
    test/v2ray_api_test.go
    skipped 19 lines
    20 20   Tag: "in",
    21 21   MixedOptions: option.HTTPMixedInboundOptions{
    22 22   ListenOptions: option.ListenOptions{
    23  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     23 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    24 24   ListenPort: clientPort,
    25 25   },
    26 26   },
    skipped 31 lines
  • ■ ■ ■ ■ ■ ■
    test/v2ray_grpc_test.go
    skipped 31 lines
    32 32   Type: C.TypeVMess,
    33 33   VMessOptions: option.VMessInboundOptions{
    34 34   ListenOptions: option.ListenOptions{
    35  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     35 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    36 36   ListenPort: serverPort,
    37 37   },
    38 38   Users: []option.VMessUser{
    skipped 89 lines
    128 128   Tag: "mixed-in",
    129 129   MixedOptions: option.HTTPMixedInboundOptions{
    130 130   ListenOptions: option.ListenOptions{
    131  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     131 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    132 132   ListenPort: clientPort,
    133 133   },
    134 134   },
    skipped 78 lines
  • ■ ■ ■ ■ ■ ■
    test/v2ray_transport_test.go
    skipped 49 lines
    50 50   Tag: "mixed-in",
    51 51   MixedOptions: option.HTTPMixedInboundOptions{
    52 52   ListenOptions: option.ListenOptions{
    53  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     53 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    54 54   ListenPort: clientPort,
    55 55   },
    56 56   },
    skipped 2 lines
    59 59   Type: C.TypeVMess,
    60 60   VMessOptions: option.VMessInboundOptions{
    61 61   ListenOptions: option.ListenOptions{
    62  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     62 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    63 63   ListenPort: serverPort,
    64 64   },
    65 65   Users: []option.VMessUser{
    skipped 60 lines
    126 126   Tag: "mixed-in",
    127 127   MixedOptions: option.HTTPMixedInboundOptions{
    128 128   ListenOptions: option.ListenOptions{
    129  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     129 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    130 130   ListenPort: clientPort,
    131 131   },
    132 132   },
    skipped 2 lines
    135 135   Type: C.TypeTrojan,
    136 136   TrojanOptions: option.TrojanInboundOptions{
    137 137   ListenOptions: option.ListenOptions{
    138  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     138 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    139 139   ListenPort: serverPort,
    140 140   },
    141 141   Users: []option.TrojanUser{
    skipped 62 lines
    204 204   Tag: "mixed-in",
    205 205   MixedOptions: option.HTTPMixedInboundOptions{
    206 206   ListenOptions: option.ListenOptions{
    207  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     207 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    208 208   ListenPort: clientPort,
    209 209   },
    210 210   },
    skipped 2 lines
    213 213   Type: C.TypeVMess,
    214 214   VMessOptions: option.VMessInboundOptions{
    215 215   ListenOptions: option.ListenOptions{
    216  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     216 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    217 217   ListenPort: serverPort,
    218 218   },
    219 219   Users: []option.VMessUser{
    skipped 59 lines
    279 279   Tag: "mixed-in",
    280 280   MixedOptions: option.HTTPMixedInboundOptions{
    281 281   ListenOptions: option.ListenOptions{
    282  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     282 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    283 283   ListenPort: clientPort,
    284 284   },
    285 285   },
    skipped 2 lines
    288 288   Type: C.TypeVMess,
    289 289   VMessOptions: option.VMessInboundOptions{
    290 290   ListenOptions: option.ListenOptions{
    291  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     291 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    292 292   ListenPort: serverPort,
    293 293   },
    294 294   Users: []option.VMessUser{
    skipped 41 lines
  • ■ ■ ■ ■ ■ ■
    test/v2ray_ws_test.go
    skipped 65 lines
    66 66   Type: C.TypeVMess,
    67 67   VMessOptions: option.VMessInboundOptions{
    68 68   ListenOptions: option.ListenOptions{
    69  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     69 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    70 70   ListenPort: serverPort,
    71 71   },
    72 72   Users: []option.VMessUser{
    skipped 87 lines
    160 160   Tag: "mixed-in",
    161 161   MixedOptions: option.HTTPMixedInboundOptions{
    162 162   ListenOptions: option.ListenOptions{
    163  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     163 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    164 164   ListenPort: clientPort,
    165 165   },
    166 166   },
    skipped 32 lines
  • ■ ■ ■ ■ ■ ■
    test/vless_test.go
    skipped 41 lines
    42 42   Type: C.TypeMixed,
    43 43   MixedOptions: option.HTTPMixedInboundOptions{
    44 44   ListenOptions: option.ListenOptions{
    45  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     45 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    46 46   ListenPort: clientPort,
    47 47   },
    48 48   },
    skipped 62 lines
    111 111   Type: C.TypeMixed,
    112 112   MixedOptions: option.HTTPMixedInboundOptions{
    113 113   ListenOptions: option.ListenOptions{
    114  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     114 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    115 115   ListenPort: clientPort,
    116 116   },
    117 117   },
    skipped 3 lines
    121 121   Tag: "trojan",
    122 122   TrojanOptions: option.TrojanInboundOptions{
    123 123   ListenOptions: option.ListenOptions{
    124  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     124 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    125 125   ListenPort: otherPort,
    126 126   },
    127 127   Users: []option.TrojanUser{
    skipped 91 lines
    219 219   Tag: "mixed-in",
    220 220   MixedOptions: option.HTTPMixedInboundOptions{
    221 221   ListenOptions: option.ListenOptions{
    222  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     222 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    223 223   ListenPort: clientPort,
    224 224   },
    225 225   },
    skipped 2 lines
    228 228   Type: C.TypeVLESS,
    229 229   VLESSOptions: option.VLESSInboundOptions{
    230 230   ListenOptions: option.ListenOptions{
    231  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     231 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    232 232   ListenPort: serverPort,
    233 233   },
    234 234   Users: []option.VLESSUser{
    skipped 59 lines
    294 294   Tag: "mixed-in",
    295 295   MixedOptions: option.HTTPMixedInboundOptions{
    296 296   ListenOptions: option.ListenOptions{
    297  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     297 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    298 298   ListenPort: clientPort,
    299 299   },
    300 300   },
    skipped 2 lines
    303 303   Type: C.TypeVLESS,
    304 304   VLESSOptions: option.VLESSInboundOptions{
    305 305   ListenOptions: option.ListenOptions{
    306  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     306 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    307 307   ListenPort: serverPort,
    308 308   },
    309 309   Users: []option.VLESSUser{
    skipped 16 lines
    326 326   Tag: "trojan",
    327 327   TrojanOptions: option.TrojanInboundOptions{
    328 328   ListenOptions: option.ListenOptions{
    329  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     329 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    330 330   ListenPort: otherPort,
    331 331   },
    332 332   Users: []option.TrojanUser{
    skipped 81 lines
    414 414   Type: C.TypeVLESS,
    415 415   VLESSOptions: option.VLESSInboundOptions{
    416 416   ListenOptions: option.ListenOptions{
    417  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     417 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    418 418   ListenPort: serverPort,
    419 419   },
    420 420   Users: []option.VLESSUser{
    skipped 16 lines
    437 437   Tag: "trojan",
    438 438   TrojanOptions: option.TrojanInboundOptions{
    439 439   ListenOptions: option.ListenOptions{
    440  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     440 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    441 441   ListenPort: otherPort,
    442 442   },
    443 443   Users: []option.TrojanUser{
    skipped 20 lines
    464 464   Tag: "mixed-in",
    465 465   MixedOptions: option.HTTPMixedInboundOptions{
    466 466   ListenOptions: option.ListenOptions{
    467  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     467 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    468 468   ListenPort: otherClientPort,
    469 469   },
    470 470   },
    skipped 66 lines
  • ■ ■ ■ ■ ■ ■
    test/vmess_test.go
    skipped 184 lines
    185 185   Type: C.TypeVMess,
    186 186   VMessOptions: option.VMessInboundOptions{
    187 187   ListenOptions: option.ListenOptions{
    188  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     188 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    189 189   ListenPort: serverPort,
    190 190   },
    191 191   Users: []option.VMessUser{
    skipped 40 lines
    232 232   Type: C.TypeMixed,
    233 233   MixedOptions: option.HTTPMixedInboundOptions{
    234 234   ListenOptions: option.ListenOptions{
    235  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     235 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    236 236   ListenPort: clientPort,
    237 237   },
    238 238   },
    skipped 28 lines
    267 267   Tag: "mixed-in",
    268 268   MixedOptions: option.HTTPMixedInboundOptions{
    269 269   ListenOptions: option.ListenOptions{
    270  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     270 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    271 271   ListenPort: clientPort,
    272 272   },
    273 273   },
    skipped 2 lines
    276 276   Type: C.TypeVMess,
    277 277   VMessOptions: option.VMessInboundOptions{
    278 278   ListenOptions: option.ListenOptions{
    279  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     279 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    280 280   ListenPort: serverPort,
    281 281   },
    282 282   Users: []option.VMessUser{
    skipped 44 lines
  • ■ ■ ■ ■
    test/wireguard_test.go
    skipped 25 lines
    26 26   Type: C.TypeMixed,
    27 27   MixedOptions: option.HTTPMixedInboundOptions{
    28 28   ListenOptions: option.ListenOptions{
    29  - Listen: option.ListenAddress(netip.IPv4Unspecified()),
     29 + Listen: option.NewListenAddress(netip.IPv4Unspecified()),
    30 30   ListenPort: clientPort,
    31 31   },
    32 32   },
    skipped 20 lines
Please wait...
Page is in error, reload to recover