2020-06-02 16:48:55 +02:00
|
|
|
package consts
|
|
|
|
|
2021-03-31 10:57:39 +02:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/fatedier/frp/test/e2e/pkg/port"
|
2020-06-02 16:48:55 +02:00
|
|
|
)
|
2020-09-07 08:57:23 +02:00
|
|
|
|
|
|
|
const (
|
2021-03-31 10:57:39 +02:00
|
|
|
TestString = "frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet."
|
|
|
|
|
|
|
|
DefaultTimeout = 2 * time.Second
|
2020-09-07 08:57:23 +02:00
|
|
|
)
|
|
|
|
|
2021-03-31 10:57:39 +02:00
|
|
|
var (
|
|
|
|
PortServerName string
|
|
|
|
PortClientAdmin string
|
|
|
|
|
2020-09-07 08:57:23 +02:00
|
|
|
DefaultServerConfig = `
|
|
|
|
[common]
|
2021-03-31 10:57:39 +02:00
|
|
|
bind_port = {{ .%s }}
|
|
|
|
log_level = trace
|
2020-09-07 08:57:23 +02:00
|
|
|
`
|
|
|
|
|
|
|
|
DefaultClientConfig = `
|
|
|
|
[common]
|
2021-03-31 10:57:39 +02:00
|
|
|
server_port = {{ .%s }}
|
|
|
|
log_level = trace
|
2020-09-07 08:57:23 +02:00
|
|
|
`
|
|
|
|
)
|
2021-03-31 10:57:39 +02:00
|
|
|
|
|
|
|
func init() {
|
|
|
|
PortServerName = port.GenName("Server")
|
|
|
|
PortClientAdmin = port.GenName("ClientAdmin")
|
|
|
|
DefaultServerConfig = fmt.Sprintf(DefaultServerConfig, port.GenName("Server"))
|
|
|
|
DefaultClientConfig = fmt.Sprintf(DefaultClientConfig, port.GenName("Server"))
|
|
|
|
}
|