initial commit

This commit is contained in:
ston1th 2020-11-22 12:59:12 +01:00
commit 7715fcf373
37 changed files with 2957 additions and 0 deletions

30
config.tpl Normal file
View file

@ -0,0 +1,30 @@
global
daemon
chroot /var/lib/haproxy
user haproxy
group haproxy
maxconn 5000
defaults
mode tcp
log global
retries 2
timeout connect 3000ms
timeout server 5000ms
timeout client 5000ms
timeout tunnel 3600s
timeout check 10s
{{ range $item := .Data -}}
frontend fr_{{ $item.Name }}
bind {{ $item.IP }}:{{ $item.Port }}
option tcplog
option splice-request
default_backend ba_{{ $item.Name }}
backend ba_{{ $item.Name }}
balance roundrobin
option splice-response
default-server inter 3s downinter 10s fall 2 rise 2 on-marked-down shutdown-sessions {{ $item.Options }}
# send-proxy-v2
{{ range $srv := $item.Servers -}}
server {{ $srv.Name }} {{ $srv.IP }}:{{ $srv.Port }} check
{{ end -}}
{{ end -}}