Add tor service
All checks were successful
ci/woodpecker/push/rsync Pipeline was successful
ci/woodpecker/push/rust Pipeline was successful
ci/woodpecker/push/tor Pipeline was successful

This commit is contained in:
Kaan Barmore-Genç 2023-03-05 15:04:45 -05:00
parent 1c253be351
commit 3bde2a0743
Signed by: kaan
GPG key ID: B2E280771CD62FCF
5 changed files with 46 additions and 0 deletions

16
.woodpecker/tor.yml Normal file
View file

@ -0,0 +1,16 @@
pipeline:
build:
image: woodpeckerci/plugin-docker-buildx
secrets: [docker_username, docker_password]
settings:
repo: seriousbug/tor
dockerfile: tor/Dockerfile
platforms: linux/amd64
tag: latest
when:
event:
- manual
- push
- cron
branch: main
path: tor/*

View file

@ -24,6 +24,14 @@ Rust stable toolchain, with `rustup`, `binstall`, `fmt`, `clippy`, `llvm-cov`, `
This is a pretty heavy package as it contains a lot of libraries and other This is a pretty heavy package as it contains a lot of libraries and other
things I found useful for my work. things I found useful for my work.
### tor
[![Docker Pulls](https://img.shields.io/docker/pulls/seriousbug/tor) ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/seriousbug/tor/latest)](https://hub.docker.com/r/seriousbug/tor)
An alpine container with Tor installed. Set up so you can easily mount your own config directory.
Check the [tor folder](/tor/) in this repository for an example of how to run it.
--- ---
## Adding a new container ## Adding a new container

9
tor/Dockerfile Normal file
View file

@ -0,0 +1,9 @@
FROM alpine:latest
LABEL org.opencontainers.image.authors="kaan@bgenc.net"
RUN apk add --no-cache tor && mkdir -p /etc/tor
VOLUME /etc/tor/
CMD [ "/usr/bin/tor", "-f", "/etc/tor/torrc" ]

11
tor/Readme.md Normal file
View file

@ -0,0 +1,11 @@
# Running
```
docker run -p 9050:9050 --rm -it -v (pwd)/tor:/etc/tor:ro seriousbug/tor:latest
```
To test:
```
curl --socks5 localhost:9050 --socks5-hostname localhost:9050 https://check.torproject.org/api/ip
```

2
tor/tor/torrc Normal file
View file

@ -0,0 +1,2 @@
Log notice stdout
SocksPort 0.0.0.0:9050