haproxy.cfg 943 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. global
  2. log stdout format raw local0 info
  3. maxconn 4096
  4. user haproxy
  5. group haproxy
  6. daemon
  7. defaults
  8. log global
  9. mode http
  10. option httplog
  11. option dontlognull
  12. timeout connect 5000
  13. timeout client 50000
  14. timeout server 50000
  15. option redispatch
  16. retries 3
  17. frontend http_front
  18. bind *:80
  19. mode http
  20. # 定义 ACL 规则 (如果需要 IP 限制,取消注释以下行)
  21. # acl allowed_ips src 1.2.3.4 5.6.7.8
  22. # http-request deny if !allowed_ips
  23. # 默认后端
  24. default_backend ankr_rpc
  25. backend ankr_rpc
  26. mode http
  27. balance roundrobin
  28. option forwardfor
  29. # 设置请求头
  30. http-request set-header Host rpc.ankr.com
  31. # 定义服务器
  32. server ankr_server rpc.ankr.com:443 ssl verify none
  33. # 重写请求路径
  34. http-request set-path /solana/acadeb3212fbce5fa684b9e64410bdea04b416e32cc3b9a371d4073ecf30ebbb%[path]