add configuration for tor / haproxy compatibility (PROXY protocol V1 to PROXY protocol v2)
This commit is contained in:
parent
ef1f793a64
commit
e1be1dd320
23
haproxy/Dockerfile
Normal file
23
haproxy/Dockerfile
Normal file
@ -0,0 +1,23 @@
|
||||
ARG UBUNTU_VERSION="noble"
|
||||
|
||||
FROM ubuntu:${UBUNTU_VERSION}
|
||||
|
||||
RUN apt -y update
|
||||
|
||||
RUN apt -y install haproxy
|
||||
|
||||
RUN groupadd docker-haproxy
|
||||
|
||||
RUN useradd --system --shell /bin/bash docker-haproxy -g docker-haproxy
|
||||
|
||||
RUN mkdir -p /var/lib/haproxy/ -p /etc/haproxy
|
||||
|
||||
ADD haproxy.cfg /etc/haproxy
|
||||
|
||||
RUN chown -R docker-haproxy:docker-haproxy /etc/haproxy /var/lib/haproxy
|
||||
|
||||
VOLUME /var/lib/haproxy
|
||||
|
||||
USER docker-haproxy
|
||||
|
||||
CMD haproxy -f /etc/haproxy/haproxy.cfg
|
7
haproxy/docker-compose.yml
Normal file
7
haproxy/docker-compose.yml
Normal file
@ -0,0 +1,7 @@
|
||||
services:
|
||||
haproxy:
|
||||
restart: on-failure:3
|
||||
build:
|
||||
context: .
|
||||
image: haproxy
|
||||
network_mode: "host"
|
6
haproxy/haproxy.cfg
Normal file
6
haproxy/haproxy.cfg
Normal file
@ -0,0 +1,6 @@
|
||||
frontend tor-north
|
||||
bind 127.0.0.1:19818 accept-proxy
|
||||
default_backend inspircd-south
|
||||
|
||||
backend inspircd-south
|
||||
server inspircd 127.0.0.1:7001 check send-proxy-v2
|
@ -316,3 +316,4 @@
|
||||
|
||||
#<module name="antiknocker">
|
||||
|
||||
#<module name="starttls">
|
||||
|
@ -175,7 +175,6 @@
|
||||
<module name="sslinfo">
|
||||
<module name="sslmodes">
|
||||
<module name="sslrehashsignal">
|
||||
<module name="starttls">
|
||||
<module name="stats_unlinked">
|
||||
<module name="stripcolor">
|
||||
<module name="svshold">
|
||||
|
23
tor/Dockerfile
Normal file
23
tor/Dockerfile
Normal file
@ -0,0 +1,23 @@
|
||||
ARG UBUNTU_VERSION="noble"
|
||||
|
||||
FROM ubuntu:${UBUNTU_VERSION}
|
||||
|
||||
RUN apt -y update
|
||||
|
||||
RUN apt -y install tor
|
||||
|
||||
RUN groupadd docker-tor
|
||||
|
||||
RUN useradd --system --shell /bin/bash docker-tor -g docker-tor
|
||||
|
||||
RUN mkdir -p /var/lib/tor/ -p /etc/tor
|
||||
|
||||
ADD torrc /etc/tor
|
||||
|
||||
RUN chown -R docker-tor:docker-tor /etc/tor /var/lib/tor
|
||||
|
||||
VOLUME /var/lib/tor
|
||||
|
||||
USER docker-tor
|
||||
|
||||
CMD tor -f /etc/tor/torrc
|
12
tor/docker-compose.yml
Normal file
12
tor/docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
||||
services:
|
||||
tor:
|
||||
restart: on-failure:3
|
||||
build:
|
||||
context: .
|
||||
image: tor
|
||||
network_mode: "host"
|
||||
volumes:
|
||||
- data:/var/lib/inspircd
|
||||
volumes:
|
||||
data:
|
||||
name: tor_data
|
10
tor/torrc
Normal file
10
tor/torrc
Normal file
@ -0,0 +1,10 @@
|
||||
RunAsDaemon 0
|
||||
DataDirectory /var/lib/tor
|
||||
HiddenServiceDir /var/lib/tor/ircd
|
||||
HiddenServicePort 6667 127.0.0.1:19818
|
||||
HiddenServiceMaxStreams 10240
|
||||
HiddenServiceExportCircuitID haproxy
|
||||
CookieAuthentication 0
|
||||
ControlPort 127.0.0.1:9051
|
||||
HardwareAccel 1
|
||||
Log notice stderr
|
Loading…
Reference in New Issue
Block a user