mirror of
https://codeberg.org/Freedium-cfd/web.git
synced 2026-03-11 09:04:37 +00:00
proxy: haproxy SOCKS5 proxy balancer
This commit is contained in:
parent
e8e6441c88
commit
229d5f0d90
5 changed files with 41 additions and 4 deletions
|
|
@ -33,12 +33,11 @@ services:
|
|||
context: ../
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
- "PROXY_LIST=socks5://wgcf1:1080,socks5://wgcf2:1080"
|
||||
- "PROXY_LIST=socks5://haproxy-pb:1080"
|
||||
depends_on:
|
||||
- dante_1
|
||||
- dante_2
|
||||
- haproxy-proxy-balancer
|
||||
# volumes:
|
||||
# - ../web:/app/web
|
||||
# - ../user_data:/tmp/user_data
|
||||
# - ./core/medium_parser/:/app/medium_parser
|
||||
# - ./core/rl_string_helper/:/app/rl_string_helper
|
||||
ports:
|
||||
|
|
|
|||
21
docker-compose/docker-compose.proxy.yml
Normal file
21
docker-compose/docker-compose.proxy.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
version: '3.7'
|
||||
|
||||
services:
|
||||
haproxy-proxy-balancer:
|
||||
build:
|
||||
context: ../proxy-balancer
|
||||
dockerfile: Dockerfile
|
||||
container_name: haproxy-proxy-balancer
|
||||
hostname: haproxy-pb
|
||||
ports:
|
||||
- "1080:1080"
|
||||
volumes:
|
||||
- ../proxy-balancer/haproxy:/usr/local/etc/haproxy/
|
||||
restart: always
|
||||
depends_on:
|
||||
wgcf1:
|
||||
condition: service_healthy
|
||||
wgcf2:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- freedium_net
|
||||
|
|
@ -5,3 +5,4 @@ include:
|
|||
- docker-compose.wgcf.yml
|
||||
- docker-compose.db.yml
|
||||
- docker-compose.utility.yml
|
||||
- docker-compose.proxy.yml
|
||||
|
|
|
|||
2
proxy-balancer/Dockerfile
Normal file
2
proxy-balancer/Dockerfile
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
FROM haproxy:3.0
|
||||
COPY haproxy/haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
|
||||
14
proxy-balancer/haproxy/haproxy.cfg
Normal file
14
proxy-balancer/haproxy/haproxy.cfg
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
global
|
||||
log stdout format raw local0 debug
|
||||
|
||||
defaults
|
||||
timeout connect 5000
|
||||
timeout client 50000
|
||||
timeout server 50000
|
||||
|
||||
listen socks5
|
||||
bind *:1080
|
||||
mode tcp
|
||||
balance roundrobin
|
||||
server server0 wgcf1:1080
|
||||
server server1 wgcf2:1080
|
||||
Loading…
Reference in a new issue