Fix tests

This commit is contained in:
世界
2024-11-18 18:59:19 +08:00
parent a525f139dc
commit cd2cf2450e
29 changed files with 453 additions and 391 deletions

View File

@@ -1,5 +1,6 @@
package main
/*
import (
"context"
"net/netip"
@@ -8,25 +9,27 @@ import (
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/experimental/v2rayapi"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common"
"github.com/sagernet/sing/common/json/badoption"
"github.com/stretchr/testify/require"
)
func TestV2RayAPI(t *testing.T) {
i := startInstance(t, option.Options{
Inbounds: []option.LegacyInbound{
Inbounds: []option.Inbound{
{
Type: C.TypeMixed,
Tag: "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.TypeDirect,
Tag: "out",
@@ -54,3 +57,4 @@ func TestV2RayAPI(t *testing.T) {
require.Equal(t, count, stat.Value)
}
}
*/