Skip to content

Commit

Permalink
Merge branch 'master' into bemasc-blocksalt
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Schwartz committed Aug 21, 2020
2 parents 463afb0 + 20a6cc7 commit 8495c76
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions shadowsocks/udp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var dnsAddr = net.UDPAddr{IP: []byte{192, 0, 2, 3}, Port: 53}
var natCipher shadowaead.Cipher

func init() {
logging.SetLevel(logging.INFO, "")
coreCipher, _ := core.PickCipher(testCipher, nil, "test password")
natCipher = coreCipher.(shadowaead.Cipher)
}
Expand Down Expand Up @@ -287,8 +288,6 @@ func TestNATTimeout(t *testing.T) {

// Simulates receiving invalid UDP packets on a server with 100 ciphers.
func BenchmarkUDPUnpackFail(b *testing.B) {
logging.SetLevel(logging.INFO, "")

cipherList, err := MakeTestCiphers(MakeTestSecrets(100))
if err != nil {
b.Fatal(err)
Expand All @@ -305,8 +304,6 @@ func BenchmarkUDPUnpackFail(b *testing.B) {
// Simulates receiving valid UDP packets from 100 different users, each with
// their own cipher and IP address.
func BenchmarkUDPUnpackRepeat(b *testing.B) {
logging.SetLevel(logging.INFO, "")

const numCiphers = 100 // Must be <256
cipherList, err := MakeTestCiphers(MakeTestSecrets(numCiphers))
if err != nil {
Expand Down Expand Up @@ -340,8 +337,6 @@ func BenchmarkUDPUnpackRepeat(b *testing.B) {
// Simulates receiving valid UDP packets from 100 different IP addresses,
// all using the same cipher.
func BenchmarkUDPUnpackSharedKey(b *testing.B) {
logging.SetLevel(logging.INFO, "")

cipherList, err := MakeTestCiphers(MakeTestSecrets(1)) // One widely shared key
if err != nil {
b.Fatal(err)
Expand Down

0 comments on commit 8495c76

Please sign in to comment.