Migrate bad options to library

This commit is contained in:
世界
2024-11-07 21:44:04 +08:00
parent 85f634d0cb
commit 1a230bda5d
58 changed files with 579 additions and 877 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,12 +35,12 @@ func testShadowsocksPlugin(t *testing.T, name string, opts string, args string)
},
})
startInstance(t, option.Options{
Inbounds: []option.LegacyInbound{
LegacyInbounds: []option.LegacyInbound{
{
Type: C.TypeMixed,
MixedOptions: option.HTTPMixedInboundOptions{
ListenOptions: option.ListenOptions{
Listen: option.NewListenAddress(netip.IPv4Unspecified()),
Listen: common.Ptr(badoption.Addr(netip.IPv4Unspecified())),
ListenPort: clientPort,
},
},