Refactor inbound/outbound options struct

This commit is contained in:
世界
2023-12-11 18:36:06 +08:00
parent 36b0f2e91a
commit 6ddcd3954d
31 changed files with 844 additions and 697 deletions

View File

@@ -35,11 +35,13 @@ func TestHysteriaSelf(t *testing.T) {
AuthString: "password",
}},
Obfs: "fuck me till the daylight",
TLS: &option.InboundTLSOptions{
Enabled: true,
ServerName: "example.org",
CertificatePath: certPem,
KeyPath: keyPem,
InboundTLSOptionsContainer: option.InboundTLSOptionsContainer{
TLS: &option.InboundTLSOptions{
Enabled: true,
ServerName: "example.org",
CertificatePath: certPem,
KeyPath: keyPem,
},
},
},
},
@@ -60,10 +62,12 @@ func TestHysteriaSelf(t *testing.T) {
DownMbps: 100,
AuthString: "password",
Obfs: "fuck me till the daylight",
TLS: &option.OutboundTLSOptions{
Enabled: true,
ServerName: "example.org",
CertificatePath: certPem,
OutboundTLSOptionsContainer: option.OutboundTLSOptionsContainer{
TLS: &option.OutboundTLSOptions{
Enabled: true,
ServerName: "example.org",
CertificatePath: certPem,
},
},
},
},
@@ -99,11 +103,13 @@ func TestHysteriaInbound(t *testing.T) {
AuthString: "password",
}},
Obfs: "fuck me till the daylight",
TLS: &option.InboundTLSOptions{
Enabled: true,
ServerName: "example.org",
CertificatePath: certPem,
KeyPath: keyPem,
InboundTLSOptionsContainer: option.InboundTLSOptionsContainer{
TLS: &option.InboundTLSOptions{
Enabled: true,
ServerName: "example.org",
CertificatePath: certPem,
KeyPath: keyPem,
},
},
},
},
@@ -157,10 +163,12 @@ func TestHysteriaOutbound(t *testing.T) {
DownMbps: 100,
AuthString: "password",
Obfs: "fuck me till the daylight",
TLS: &option.OutboundTLSOptions{
Enabled: true,
ServerName: "example.org",
CertificatePath: certPem,
OutboundTLSOptionsContainer: option.OutboundTLSOptionsContainer{
TLS: &option.OutboundTLSOptions{
Enabled: true,
ServerName: "example.org",
CertificatePath: certPem,
},
},
},
},