refactor: Modular inbounds

This commit is contained in:
世界
2024-11-03 19:46:20 +08:00
parent 0b2c7ec35c
commit 47736b27ba
90 changed files with 2353 additions and 1919 deletions

View File

@@ -37,7 +37,7 @@ func testShadowTLS(t *testing.T, version int, password string, utlsEanbled bool)
method := shadowaead_2022.List[0]
ssPassword := mkBase64(t, 16)
startInstance(t, option.Options{
Inbounds: []option.Inbound{
Inbounds: []option.LegacyInbound{
{
Type: C.TypeMixed,
MixedOptions: option.HTTPMixedInboundOptions{
@@ -142,7 +142,7 @@ func testShadowTLS(t *testing.T, version int, password string, utlsEanbled bool)
func TestShadowTLSFallback(t *testing.T) {
startInstance(t, option.Options{
Inbounds: []option.Inbound{
Inbounds: []option.LegacyInbound{
{
Type: C.TypeShadowTLS,
ShadowTLSOptions: option.ShadowTLSInboundOptions{
@@ -189,7 +189,7 @@ func TestShadowTLSInbound(t *testing.T) {
Cmd: []string{"--v3", "--threads", "1", "client", "--listen", "0.0.0.0:" + F.ToString(otherPort), "--server", "127.0.0.1:" + F.ToString(serverPort), "--sni", "google.com", "--password", password},
})
startInstance(t, option.Options{
Inbounds: []option.Inbound{
Inbounds: []option.LegacyInbound{
{
Type: C.TypeMixed,
Tag: "in",
@@ -283,7 +283,7 @@ func TestShadowTLSOutbound(t *testing.T) {
Env: []string{"RUST_LOG=trace"},
})
startInstance(t, option.Options{
Inbounds: []option.Inbound{
Inbounds: []option.LegacyInbound{
{
Type: C.TypeMixed,
MixedOptions: option.HTTPMixedInboundOptions{