mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-04 17:27:23 -05:00
fuzzing test for socks protocol
This commit is contained in:
parent
da1b428bb4
commit
d34678d9a6
28
proxy/socks/protocol/socks_fuzz_test.go
Normal file
28
proxy/socks/protocol/socks_fuzz_test.go
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
package protocol
|
||||||
|
|
||||||
|
import (
|
||||||
|
"crypto/rand"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
Iterations = int(500000)
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestReadAuthentication(t *testing.T) {
|
||||||
|
for i := 0; i < Iterations; i++ {
|
||||||
|
ReadAuthentication(rand.Reader)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestReadUserPassRequest(t *testing.T) {
|
||||||
|
for i := 0; i < Iterations; i++ {
|
||||||
|
ReadUserPassRequest(rand.Reader)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestReadRequest(t *testing.T) {
|
||||||
|
for i := 0; i < Iterations; i++ {
|
||||||
|
ReadRequest(rand.Reader)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user