mirror of
https://github.com/fatedier/frp.git
synced 2025-07-27 07:35:07 +00:00
refactor ci test
This commit is contained in:
193
tests/config/auto_test_frpc.ini
Normal file
193
tests/config/auto_test_frpc.ini
Normal file
@@ -0,0 +1,193 @@
|
||||
[common]
|
||||
server_addr = 127.0.0.1
|
||||
server_port = 10700
|
||||
log_file = console
|
||||
# debug, info, warn, error
|
||||
log_level = debug
|
||||
token = 123456
|
||||
admin_port = 10600
|
||||
admin_user = abc
|
||||
admin_pwd = abc
|
||||
|
||||
[tcp_normal]
|
||||
type = tcp
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10701
|
||||
remote_port = 10801
|
||||
|
||||
[tcp_ec]
|
||||
type = tcp
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10701
|
||||
remote_port = 10901
|
||||
use_encryption = true
|
||||
use_compression = true
|
||||
|
||||
[tcp_group1]
|
||||
type = tcp
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10701
|
||||
remote_port = 10802
|
||||
group = test1
|
||||
group_key = 123
|
||||
|
||||
[tcp_group2]
|
||||
type = tcp
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10702
|
||||
remote_port = 10802
|
||||
group = test1
|
||||
group_key = 123
|
||||
|
||||
[udp_normal]
|
||||
type = udp
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10702
|
||||
remote_port = 10802
|
||||
|
||||
[udp_ec]
|
||||
type = udp
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10702
|
||||
remote_port = 10902
|
||||
use_encryption = true
|
||||
use_compression = true
|
||||
|
||||
[unix_domain]
|
||||
type = tcp
|
||||
remote_port = 10803
|
||||
plugin = unix_domain_socket
|
||||
plugin_unix_path = /tmp/frp_echo_server.sock
|
||||
|
||||
[stcp]
|
||||
type = stcp
|
||||
sk = abcdefg
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10701
|
||||
|
||||
[stcp_ec]
|
||||
type = stcp
|
||||
sk = abc
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10701
|
||||
use_encryption = true
|
||||
use_compression = true
|
||||
|
||||
[web01]
|
||||
type = http
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10704
|
||||
custom_domains = 127.0.0.1
|
||||
|
||||
[web02]
|
||||
type = http
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10704
|
||||
custom_domains = test2.frp.com
|
||||
host_header_rewrite = test2.frp.com
|
||||
use_encryption = true
|
||||
use_compression = true
|
||||
|
||||
[web03]
|
||||
type = http
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10704
|
||||
custom_domains = test3.frp.com
|
||||
use_encryption = true
|
||||
use_compression = true
|
||||
host_header_rewrite = test3.frp.com
|
||||
locations = /,/foo
|
||||
|
||||
[web04]
|
||||
type = http
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10704
|
||||
custom_domains = test3.frp.com
|
||||
use_encryption = true
|
||||
use_compression = true
|
||||
host_header_rewrite = test3.frp.com
|
||||
locations = /bar
|
||||
|
||||
[web05]
|
||||
type = http
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10704
|
||||
custom_domains = test5.frp.com
|
||||
host_header_rewrite = test5.frp.com
|
||||
use_encryption = true
|
||||
use_compression = true
|
||||
http_user = test
|
||||
http_user = test
|
||||
|
||||
[web06]
|
||||
type = http
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10704
|
||||
custom_domains = test6.frp.com
|
||||
host_header_rewrite = test6.frp.com
|
||||
header_X-From-Where = frp
|
||||
|
||||
[subhost01]
|
||||
type = http
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10704
|
||||
subdomain = test01
|
||||
|
||||
[subhost02]
|
||||
type = http
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10704
|
||||
subdomain = test02
|
||||
|
||||
[tcp_port_not_allowed]
|
||||
type = tcp
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10701
|
||||
remote_port = 20001
|
||||
|
||||
[tcp_port_unavailable]
|
||||
type =tcp
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10701
|
||||
remote_port = 10700
|
||||
|
||||
[tcp_port_normal]
|
||||
type = tcp
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10701
|
||||
remote_port = 20002
|
||||
|
||||
[tcp_random_port]
|
||||
type = tcp
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10701
|
||||
remote_port = 0
|
||||
|
||||
[udp_port_not_allowed]
|
||||
type = udp
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10702
|
||||
remote_port = 20001
|
||||
|
||||
[udp_port_normal]
|
||||
type = udp
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10702
|
||||
remote_port = 20002
|
||||
|
||||
[udp_random_port]
|
||||
type = udp
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10702
|
||||
remote_port = 0
|
||||
|
||||
[http_proxy]
|
||||
type = tcp
|
||||
plugin = http_proxy
|
||||
remote_port = 0
|
||||
|
||||
[range:range_tcp]
|
||||
type = tcp
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 30000-30001,30003
|
||||
remote_port = 30000-30001,30003
|
25
tests/config/auto_test_frpc_visitor.ini
Normal file
25
tests/config/auto_test_frpc_visitor.ini
Normal file
@@ -0,0 +1,25 @@
|
||||
[common]
|
||||
server_addr = 0.0.0.0
|
||||
server_port = 10700
|
||||
log_file = console
|
||||
# debug, info, warn, error
|
||||
log_level = debug
|
||||
token = 123456
|
||||
|
||||
[stcp_visitor]
|
||||
type = stcp
|
||||
role = visitor
|
||||
server_name = stcp
|
||||
sk = abcdefg
|
||||
bind_addr = 127.0.0.1
|
||||
bind_port = 10805
|
||||
|
||||
[stcp_ec_visitor]
|
||||
type = stcp
|
||||
role = visitor
|
||||
server_name = stcp_ec
|
||||
sk = abc
|
||||
bind_addr = 127.0.0.1
|
||||
bind_port = 10905
|
||||
use_encryption = true
|
||||
use_compression = true
|
9
tests/config/auto_test_frps.ini
Normal file
9
tests/config/auto_test_frps.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
[common]
|
||||
bind_addr = 0.0.0.0
|
||||
bind_port = 10700
|
||||
vhost_http_port = 10804
|
||||
log_file = console
|
||||
log_level = debug
|
||||
token = 123456
|
||||
allow_ports = 10000-20000,20002,30000-50000
|
||||
subdomain_host = sub.com
|
9
tests/config/config.go
Normal file
9
tests/config/config.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
func GenerateConfigFile(path string, content string) error {
|
||||
return ioutil.WriteFile(path, []byte(content), 0666)
|
||||
}
|
Reference in New Issue
Block a user