Fix tests

This commit is contained in:
世界 2024-11-18 18:59:19 +08:00
parent f2ec319fe1
commit e65926fd08
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
29 changed files with 492 additions and 457 deletions

View file

@ -6,6 +6,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"
)
func TestShadowsocksObfs(t *testing.T) {
@ -33,21 +35,21 @@ func testShadowsocksPlugin(t *testing.T, name string, opts string, args string)
},
})
startInstance(t, option.Options{
Inbounds: []option.LegacyInbound{
Inbounds: []option.Inbound{
{
Type: C.TypeMixed,
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.TypeShadowsocks,
ShadowsocksOptions: option.ShadowsocksOutboundOptions{
Options: &option.ShadowsocksOutboundOptions{
ServerOptions: option.ServerOptions{
Server: "127.0.0.1",
ServerPort: serverPort,