diff --git a/haproxy/Dockerfile b/haproxy/Dockerfile new file mode 100644 index 0000000..407372a --- /dev/null +++ b/haproxy/Dockerfile @@ -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 diff --git a/haproxy/docker-compose.yml b/haproxy/docker-compose.yml new file mode 100644 index 0000000..2e1b44b --- /dev/null +++ b/haproxy/docker-compose.yml @@ -0,0 +1,7 @@ +services: + haproxy: + restart: on-failure:3 + build: + context: . + image: haproxy + network_mode: "host" diff --git a/haproxy/haproxy.cfg b/haproxy/haproxy.cfg new file mode 100644 index 0000000..17f884f --- /dev/null +++ b/haproxy/haproxy.cfg @@ -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 diff --git a/include.conf.example b/include.conf.example index 83fc0bc..f528328 100644 --- a/include.conf.example +++ b/include.conf.example @@ -316,3 +316,4 @@ # +# diff --git a/modules.conf b/modules.conf index 9b290e4..a33669a 100644 --- a/modules.conf +++ b/modules.conf @@ -175,7 +175,6 @@ - diff --git a/tor/Dockerfile b/tor/Dockerfile new file mode 100644 index 0000000..c918cd6 --- /dev/null +++ b/tor/Dockerfile @@ -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 diff --git a/tor/docker-compose.yml b/tor/docker-compose.yml new file mode 100644 index 0000000..34d9342 --- /dev/null +++ b/tor/docker-compose.yml @@ -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 diff --git a/tor/torrc b/tor/torrc new file mode 100644 index 0000000..e0dcbec --- /dev/null +++ b/tor/torrc @@ -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