@@ -120,17 +120,46 @@ func TestInboundVless_Encryption(t *testing.T) {
120120 for i := range paddings {
121121 padding := paddings [i ].data
122122 t .Run (paddings [i ].name , func (t * testing.T ) {
123+ t .Parallel ()
123124 inboundOptions := inbound.VlessOption {
124125 Decryption : "mlkem768x25519plus." + mode + ".600s." + padding + privateKeyBase64 + "." + seedBase64 ,
125126 }
126127 outboundOptions := outbound.VlessOption {
127128 Encryption : "mlkem768x25519plus." + mode + ".0rtt." + padding + passwordBase64 + "." + clientBase64 ,
128129 }
129- testInboundVless (t , inboundOptions , outboundOptions )
130- t .Run ("xtls-rprx-vision" , func (t * testing.T ) {
130+ t .Run ("raw" , func (t * testing.T ) {
131+ testInboundVless (t , inboundOptions , outboundOptions )
132+ t .Run ("xtls-rprx-vision" , func (t * testing.T ) {
133+ outboundOptions := outboundOptions
134+ outboundOptions .Flow = "xtls-rprx-vision"
135+ testInboundVless (t , inboundOptions , outboundOptions )
136+ })
137+ })
138+ t .Run ("ws" , func (t * testing.T ) {
139+ inboundOptions := inboundOptions
140+ inboundOptions .WsPath = "/ws"
131141 outboundOptions := outboundOptions
132- outboundOptions .Flow = "xtls-rprx-vision"
142+ outboundOptions .Network = "ws"
143+ outboundOptions .WSOpts = outbound.WSOptions {Path : "/ws" }
133144 testInboundVless (t , inboundOptions , outboundOptions )
145+ t .Run ("xtls-rprx-vision" , func (t * testing.T ) {
146+ outboundOptions := outboundOptions
147+ outboundOptions .Flow = "xtls-rprx-vision"
148+ testInboundVless (t , inboundOptions , outboundOptions )
149+ })
150+ })
151+ t .Run ("grpc" , func (t * testing.T ) {
152+ inboundOptions := inboundOptions
153+ inboundOptions .GrpcServiceName = "GunService"
154+ outboundOptions := outboundOptions
155+ outboundOptions .Network = "grpc"
156+ outboundOptions .GrpcOpts = outbound.GrpcOptions {GrpcServiceName : "GunService" }
157+ testInboundVless (t , inboundOptions , outboundOptions )
158+ t .Run ("xtls-rprx-vision" , func (t * testing.T ) {
159+ outboundOptions := outboundOptions
160+ outboundOptions .Flow = "xtls-rprx-vision"
161+ testInboundVless (t , inboundOptions , outboundOptions )
162+ })
134163 })
135164 })
136165 }
@@ -149,16 +178,9 @@ func TestInboundVless_Wss1(t *testing.T) {
149178 TLS : true ,
150179 Fingerprint : tlsFingerprint ,
151180 Network : "ws" ,
152- WSOpts : outbound.WSOptions {
153- Path : "/ws" ,
154- },
181+ WSOpts : outbound.WSOptions {Path : "/ws" },
155182 }
156183 testInboundVless (t , inboundOptions , outboundOptions )
157- t .Run ("xtls-rprx-vision" , func (t * testing.T ) {
158- outboundOptions := outboundOptions
159- outboundOptions .Flow = "xtls-rprx-vision"
160- testInboundVless (t , inboundOptions , outboundOptions )
161- })
162184 t .Run ("ECH" , func (t * testing.T ) {
163185 inboundOptions := inboundOptions
164186 outboundOptions := outboundOptions
@@ -168,11 +190,6 @@ func TestInboundVless_Wss1(t *testing.T) {
168190 Config : echConfigBase64 ,
169191 }
170192 testInboundVless (t , inboundOptions , outboundOptions )
171- t .Run ("xtls-rprx-vision" , func (t * testing.T ) {
172- outboundOptions := outboundOptions
173- outboundOptions .Flow = "xtls-rprx-vision"
174- testInboundVless (t , inboundOptions , outboundOptions )
175- })
176193 })
177194}
178195
@@ -187,16 +204,9 @@ func TestInboundVless_Wss2(t *testing.T) {
187204 TLS : true ,
188205 Fingerprint : tlsFingerprint ,
189206 Network : "ws" ,
190- WSOpts : outbound.WSOptions {
191- Path : "/ws" ,
192- },
207+ WSOpts : outbound.WSOptions {Path : "/ws" },
193208 }
194209 testInboundVless (t , inboundOptions , outboundOptions )
195- t .Run ("xtls-rprx-vision" , func (t * testing.T ) {
196- outboundOptions := outboundOptions
197- outboundOptions .Flow = "xtls-rprx-vision"
198- testInboundVless (t , inboundOptions , outboundOptions )
199- })
200210 t .Run ("ECH" , func (t * testing.T ) {
201211 inboundOptions := inboundOptions
202212 outboundOptions := outboundOptions
@@ -206,11 +216,6 @@ func TestInboundVless_Wss2(t *testing.T) {
206216 Config : echConfigBase64 ,
207217 }
208218 testInboundVless (t , inboundOptions , outboundOptions )
209- t .Run ("xtls-rprx-vision" , func (t * testing.T ) {
210- outboundOptions := outboundOptions
211- outboundOptions .Flow = "xtls-rprx-vision"
212- testInboundVless (t , inboundOptions , outboundOptions )
213- })
214219 })
215220}
216221
0 commit comments