tebakaja's picture
feat: Crafting Load Balancer Proxy
542878f
raw
history blame
1.8 kB
global
daemon
maxconn 1024
log /dev/log local0
log /dev/log local1 notice
stats timeout 30s
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
timeout http-request 10s
timeout queue 10s
timeout connect 10s
timeout client 10s
timeout server 10s
timeout check 10s
frontend http_front
bind *:80
bind :::80
mode http
stick-table type ip size 100k expire 30s store http_req_rate(10s)
http-request track-sc0 src
http-request deny deny_status 429 if { sc_http_req_rate(0) gt 100 }
acl is_websocket hdr(Upgrade) -i websocket
acl is_websocket hdr_beg(Host) -i ws
use_backend websocket_chatting_back if is_websocket
default_backend websocket_chatting_back
frontend https_front
bind *:443 ssl crt F:\command\haproxy\certificates.pem
bind :::443 ssl crt F:\command\haproxy\certificates.pem
mode http
acl is_websocket hdr(Upgrade) -i websocket
acl is_websocket hdr_beg(Host) -i ws
stick-table type ip size 100k expire 30s store http_req_rate(10s)
http-request track-sc0 src
http-request deny deny_status 429 if { sc_http_req_rate(0) gt 100 }
use_backend websocket_chatting_back if is_websocket
default_backend websocket_chatting_back
backend websocket_chatting_back
mode http
timeout queue 10s
balance roundrobin
option forwardfor
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
server websocket_svc_1 qywok-cryptocurrency-prediction.hf.space:443/crypto/lists ssl verify required check