basic tor implementation

This commit is contained in:
b0xxer
2024-02-29 07:04:32 -06:00
parent 13517580f2
commit a4953105ee
6 changed files with 101 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
FROM docker.io/almalinux/9-init:latest
COPY tor.repo /etc/yum.repos.d/tor.repo
RUN dnf update -y \
&& dnf install -y epel-release \
&& dnf update -y \
&& dnf install -y tor privoxy \
&& systemctl enable tor \
&& systemctl enable privoxy \
&& echo "forward-socks5 / 127.0.0.1:9050 ." >> /etc/privoxy/config \
&& dnf clean all -y \
&& rm -fr /var/cache/* /tmp/*
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
buildah bud -f Containerfile -t tor:{{tor_version}}
@@ -0,0 +1,19 @@
[Unit]
Description=Tor Node
Before=bitcoin-node
[Container]
Image={{ registry_url }}/tor:{{tor_version}}
PodmanArgs=--pod bitcoin-pod
[Service]
# Restart service when sleep finishes
Restart=always
# Extend Timeout to allow time to pull the image
TimeoutStartSec=900
# ExecStartPre flag and other systemd commands can go here, see systemd.unit(5) man page.
# ExecStartPre=/usr/share/mincontainer/setup.sh
[Install]
# Start by default on boot
WantedBy=multi-user.target default.target
+7
View File
@@ -0,0 +1,7 @@
[tor]
name=Tor for Enterprise Linux $releasever - $basearch
baseurl=https://rpm.torproject.org/centos/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=https://rpm.torproject.org/centos/public_gpg.key
cost=100