Merge pull request #968 from fatedier/health

support health check and code refactor
This commit is contained in:
fatedier
2018-11-09 10:06:47 +08:00
committed by GitHub
33 changed files with 1981 additions and 1063 deletions

View File

@@ -25,7 +25,7 @@ token = 12345678
admin_addr = 127.0.0.1
admin_port = 7400
admin_user = admin
admin_passwd = admin
admin_pwd = admin
# connections will be established in advance, default value is zero
pool_count = 5
@@ -73,6 +73,10 @@ remote_port = 6001
group = test_group
# group should have same group key
group_key = 123456
# enable health check for the backend service, it support 'tcp' and 'http' now
# frpc will connect local service's port to detect it's healthy status
health_check_type = tcp
health_check_interval_s = 10
[ssh_random]
type = tcp
@@ -126,6 +130,11 @@ locations = /,/pic
host_header_rewrite = example.com
# params with prefix "header_" will be used to update http request headers
header_X-From-Where = frp
health_check_type = http
# frpc will send a GET http request '/status' to local http service
# http service is alive when it return 2xx http response code
health_check_url = /status
health_check_interval_s = 10
[web02]
type = https