Fix tests
This commit is contained in:
@@ -7,6 +7,8 @@ import (
|
||||
|
||||
C "github.com/sagernet/sing-box/constant"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
"github.com/sagernet/sing/common"
|
||||
"github.com/sagernet/sing/common/json/badoption"
|
||||
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/spyzhov/ajson"
|
||||
@@ -27,12 +29,12 @@ func testV2RayGRPCInbound(t *testing.T, forceLite bool) {
|
||||
require.NoError(t, err)
|
||||
_, certPem, keyPem := createSelfSignedCertificate(t, "example.org")
|
||||
startInstance(t, option.Options{
|
||||
Inbounds: []option.LegacyInbound{
|
||||
Inbounds: []option.Inbound{
|
||||
{
|
||||
Type: C.TypeVMess,
|
||||
VMessOptions: option.VMessInboundOptions{
|
||||
Options: &option.VMessInboundOptions{
|
||||
ListenOptions: option.ListenOptions{
|
||||
Listen: option.NewListenAddress(netip.IPv4Unspecified()),
|
||||
Listen: common.Ptr(badoption.Addr(netip.IPv4Unspecified())),
|
||||
ListenPort: serverPort,
|
||||
},
|
||||
Users: []option.VMessUser{
|
||||
@@ -126,23 +128,23 @@ func testV2RayGRPCOutbound(t *testing.T, forceLite bool) {
|
||||
},
|
||||
})
|
||||
startInstance(t, option.Options{
|
||||
Inbounds: []option.LegacyInbound{
|
||||
Inbounds: []option.Inbound{
|
||||
{
|
||||
Type: C.TypeMixed,
|
||||
Tag: "mixed-in",
|
||||
MixedOptions: option.HTTPMixedInboundOptions{
|
||||
Options: &option.HTTPMixedInboundOptions{
|
||||
ListenOptions: option.ListenOptions{
|
||||
Listen: option.NewListenAddress(netip.IPv4Unspecified()),
|
||||
Listen: common.Ptr(badoption.Addr(netip.IPv4Unspecified())),
|
||||
ListenPort: clientPort,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
LegacyOutbounds: []option.LegacyOutbound{
|
||||
Outbounds: []option.Outbound{
|
||||
{
|
||||
Type: C.TypeVMess,
|
||||
Tag: "vmess-out",
|
||||
VMessOptions: option.VMessOutboundOptions{
|
||||
Options: &option.VMessOutboundOptions{
|
||||
ServerOptions: option.ServerOptions{
|
||||
Server: "127.0.0.1",
|
||||
ServerPort: serverPort,
|
||||
|
||||
Reference in New Issue
Block a user