소스 검색

添加 'haproxy.cfg'

maxmind 3 주 전
부모
커밋
8fda018244
1개의 변경된 파일42개의 추가작업 그리고 0개의 파일을 삭제
  1. 42 0
      haproxy.cfg

+ 42 - 0
haproxy.cfg

@@ -0,0 +1,42 @@
+global
+    log stdout format raw local0 info
+    maxconn 4096
+    user haproxy
+    group haproxy
+    daemon
+
+defaults
+    log     global
+    mode    http
+    option  httplog
+    option  dontlognull
+    timeout connect 5000
+    timeout client  50000
+    timeout server  50000
+    option  redispatch
+    retries 3
+
+frontend http_front
+    bind *:80
+    mode http
+    
+    # 定义 ACL 规则 (如果需要 IP 限制,取消注释以下行)
+    # acl allowed_ips src 1.2.3.4 5.6.7.8
+    # http-request deny if !allowed_ips
+    
+    # 默认后端
+    default_backend ankr_rpc
+
+backend ankr_rpc
+    mode http
+    balance roundrobin
+    option forwardfor
+    
+    # 设置请求头
+    http-request set-header Host rpc.ankr.com
+    
+    # 定义服务器
+    server ankr_server rpc.ankr.com:443 ssl verify none
+    
+    # 重写请求路径
+    http-request set-path /solana/acadeb3212fbce5fa684b9e64410bdea04b416e32cc3b9a371d4073ecf30ebbb%[path]