socks5_server_test.go 426 B

12345678910111213141516171819
  1. package socks5
  2. import (
  3. "context"
  4. "testing"
  5. )
  6. func TestNewS5Server(t *testing.T) {
  7. g := make(map[string]string)
  8. c := make(map[string]string)
  9. p := make(map[string]string)
  10. p["socks5_check_access"] = "true"
  11. p["socks5_simple_access_check"] = "true"
  12. p["socks5_simple_access_username"] = "111"
  13. p["socks5_simple_access_password"] = "222"
  14. s5 := NewS5Server(g, c, p, "", 1099)
  15. ctx := context.Background()
  16. s5.Start(ctx)
  17. }