1
0

consts.go 765 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package consts
  2. import (
  3. "fmt"
  4. "time"
  5. "github.com/fatedier/frp/test/e2e/pkg/port"
  6. )
  7. const (
  8. TestString = "frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet."
  9. DefaultTimeout = 2 * time.Second
  10. )
  11. var (
  12. PortServerName string
  13. PortClientAdmin string
  14. DefaultServerConfig = `
  15. [common]
  16. bind_port = {{ .%s }}
  17. log_level = trace
  18. `
  19. DefaultClientConfig = `
  20. [common]
  21. server_addr = 127.0.0.1
  22. server_port = {{ .%s }}
  23. log_level = trace
  24. `
  25. )
  26. func init() {
  27. PortServerName = port.GenName("Server")
  28. PortClientAdmin = port.GenName("ClientAdmin")
  29. DefaultServerConfig = fmt.Sprintf(DefaultServerConfig, port.GenName("Server"))
  30. DefaultClientConfig = fmt.Sprintf(DefaultClientConfig, port.GenName("Server"))
  31. }