(r *rand.Rand)
| 118 | } |
| 119 | |
| 120 | func randomProtocol(r *rand.Rand) string { |
| 121 | protocols := []string{ |
| 122 | "http", |
| 123 | "https", |
| 124 | "tcp", |
| 125 | "udp", |
| 126 | } |
| 127 | return protocols[r.Intn(len(protocols))] |
| 128 | } |
| 129 | |
| 130 | func randomBytes(r *rand.Rand, n int) []byte { |
| 131 | buf := make([]byte, n) |