consts.go 740 B

1234567891011121314151617181920212223242526272829303132333435363738
  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_port = {{ .%s }}
  22. log_level = trace
  23. `
  24. )
  25. func init() {
  26. PortServerName = port.GenName("Server")
  27. PortClientAdmin = port.GenName("ClientAdmin")
  28. DefaultServerConfig = fmt.Sprintf(DefaultServerConfig, port.GenName("Server"))
  29. DefaultClientConfig = fmt.Sprintf(DefaultClientConfig, port.GenName("Server"))
  30. }