From 7bb29d0d35c55553794d6a3e8272e45eb69fbc5c Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Wed, 22 May 2024 14:20:25 +0200 Subject: [PATCH 01/18] Update Dockerfile Update to alpine 3.20.0 https://www.alpinelinux.org/posts/Alpine-3.20.0-released.html --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ccdaded..8025218 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ -FROM alpine:3.19.1 - +FROM alpine:3.30.0 # Build-time variables ARG TOR_VERSION=0.4.8.11 ARG TZ=Europe/Berlin From 643638efffa2084f6409b35c561702a07fc71e54 Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Wed, 22 May 2024 14:21:46 +0200 Subject: [PATCH 02/18] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 8025218..a032e41 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ FROM alpine:3.30.0 + # Build-time variables ARG TOR_VERSION=0.4.8.11 ARG TZ=Europe/Berlin From 18a81c170efcc4db263bd055dfb5c12b0ab3069c Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Wed, 22 May 2024 14:22:50 +0200 Subject: [PATCH 03/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f891be..5cdc9ab 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Simple docker container for running a tor node. # Supported tags and respective `Dockerfile` links -* [`latest`, `0.4.8.11`](https://github.com/svengo/docker-tor/raw/663a1916ff88e7e29d075c67ca95d5a94f203eb4/Dockerfile) +* [`latest`, `0.4.8.11`](https://github.com/svengo/docker-tor/raw/643638efffa2084f6409b35c561702a07fc71e54/Dockerfile) I will be rebuilding the image on a regular basis to include updated alpine packages with important security fixes. From 025abed5929d69e35e646dac81d32795ab2c6dce Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Wed, 22 May 2024 17:02:39 +0200 Subject: [PATCH 04/18] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a032e41..c9455c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.30.0 +FROM alpine:3.20.0 # Build-time variables ARG TOR_VERSION=0.4.8.11 From 95123030a0bbbd71b6f4d0a2789a5062d15a80fb Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Wed, 22 May 2024 17:07:39 +0200 Subject: [PATCH 05/18] Update README.md --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 5cdc9ab..0e81548 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # docker-tor -[![Build and Publish Docker Image](https://github.com/svengo/docker-tor/actions/workflows/publish-docker.yml/badge.svg)](https://github.com/svengo/docker-tor/actions/workflows/publish-docker.yml) -![GitHub release (with filter)](https://img.shields.io/github/v/release/svengo/docker-tor) -![GitHub Repo stars](https://img.shields.io/github/stars/svengo/docker-tor?label=repo%20stars) -[![GitHub License](https://img.shields.io/github/license/svengo/docker-tor.svg)](https://github.com/svengo/docker-tor/blob/master/LICENSE) +[![Build and publish a Docker image](https://github.com/svengo/docker-tor/actions/workflows/publish-docker.yml/badge.svg)](https://github.com/svengo/docker-tor/actions/workflows/publish-docker.yml) +![GitHub publish (with filter)](https://img.shields.io/github/v/release/svengo/docker-tor) +![GitHub repo stars](https://img.shields.io/github/stars/svengo/docker-tor?label=repo%20stars) +[![GitHub licence](https://img.shields.io/github/license/svengo/docker-tor.svg)](https://github.com/svengo/docker-tor/blob/master/LICENSE) ![Docker Image Size (tag)](https://img.shields.io/docker/image-size/svengo/tor/latest) [![Docker Stars](https://img.shields.io/docker/stars/svengo/tor)](https://hub.docker.com/r/svengo/tor) [![Docker Pulls](https://img.shields.io/docker/pulls/svengo/tor)](https://hub.docker.com/r/svengo/tor) -Simple docker container for running a tor node. +Simple Docker container to run a Tor node. # Quick reference @@ -16,22 +16,22 @@ Simple docker container for running a tor node. [Sven Gottwald](https://github.com/svengo/) - **Where to get help**: - [svengo/docker-tor Issues](https://github.com/svengo/docker-tor/issues) + [svengo/docker-tor issues](https://github.com/svengo/docker-tor/issues) - **Docker Hub**: [svengo/tor](https://hub.docker.com/r/svengo/tor) -# Supported tags and respective `Dockerfile` links -* [`latest`, `0.4.8.11`](https://github.com/svengo/docker-tor/raw/643638efffa2084f6409b35c561702a07fc71e54/Dockerfile) +# Supported tags and corresponding `Dockerfile` links +* [`latest`, `0.4.8.11`](https://github.com/svengo/docker-tor/blob/025abed5929d69e35e646dac81d32795ab2c6dce/Dockerfile) -I will be rebuilding the image on a regular basis to include updated alpine packages with important security fixes. +I will be rebuilding this image on a regular basis to include updated alpine packages with important security fixes. # How to use this image -## Start a simple tor node +## Start a simple Tor node -The command starts a tor node and open ports 9001 and 9030: +This command will start a Tor node and open ports 9001 and 9030: ``` console docker run -d -p 9001:9001 -p 9030:9030 --name tor svengo/tor @@ -41,15 +41,15 @@ docker run -d -p 9001:9001 -p 9030:9030 --name tor svengo/tor Data is stored in an anonymous volume that is mounted on ``/data`` (see docker inspect for more information). You can use a host volume to store the data in a specific directory on the host. The directory could exist, the permissions are handled by the container. -Start container: +Start the container: ``` console docker run -d -p 9001:9001 -p 9030:9030 --name tor -v /data/tor:/data svengo/tor ``` -## Basic config +## Basic configuration -Use environment variables for basic configuration. The content of the environment variables are used to build `/etc/tor/torrc-defaults`. For a more advanced configuration you can edit the configuration file `/data/torrc` directly. +Use environment variables for basic configuration. The contents of the environment variables are used to build `/etc/tor/torrc-defaults'. For more advanced configuration you can edit the `/data/torrc` configuration file directly. ``` console docker run -d -p 9001:9001 -p 9030:9030 --name tor -v /data/tor:/data -e "NICKNAME=MyDockerTorNode" -e "CONTACTINFO=foo@example.com" svengo/tor`` @@ -140,7 +140,7 @@ When listing a node, it’s better to list it by fingerprint than by nickname: f The IPv4 address of this server, or a fully qualified domain name of this server that resolves to an IPv4 address. You can leave this unset, and Tor will try to guess your IPv4 address. This IPv4 address is the one used to tell clients and other servers where to find your Tor server; it doesn't affect the address that your server binds to. It also seems to work with an IPv6 address. # Feedback -Please report any problems as issue on github: https://github.com/svengo/docker-tor/issues +Please report any problems as issues on github: https://github.com/svengo/docker-tor/issues # Thanks Thanks to [Natanael Copa](https://github.com/ncopa) for [su-exec](https://github.com/ncopa/su-exec) and the [Tor Project](https://www.torproject.org/). From 7b016abdbc2899876679933b74fab49ae03c34f0 Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Wed, 22 May 2024 17:09:47 +0200 Subject: [PATCH 06/18] Update publish-docker.yml --- .github/workflows/publish-docker.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index d822528..845f606 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -1,7 +1,6 @@ name: Build and Publish Docker Image on: - workflow_dispatch: push: branches: - main From 78b506e3a4585f73cc6b089ec1a0a1c2801d4c4e Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Wed, 22 May 2024 17:15:36 +0200 Subject: [PATCH 07/18] Update publish-docker.yml --- .github/workflows/publish-docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 845f606..d822528 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -1,6 +1,7 @@ name: Build and Publish Docker Image on: + workflow_dispatch: push: branches: - main From 8cac37e95f8ce5eaddddb65602242dd38257cefa Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Thu, 23 May 2024 09:57:19 +0200 Subject: [PATCH 08/18] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0e81548..41590c5 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ Simple Docker container to run a Tor node. - **Docker Hub**: [svengo/tor](https://hub.docker.com/r/svengo/tor) +- **Tor project**: + [Tor Project](https://www.torproject.org/) + # Supported tags and corresponding `Dockerfile` links * [`latest`, `0.4.8.11`](https://github.com/svengo/docker-tor/blob/025abed5929d69e35e646dac81d32795ab2c6dce/Dockerfile) @@ -141,6 +144,3 @@ The IPv4 address of this server, or a fully qualified domain name of this server # Feedback Please report any problems as issues on github: https://github.com/svengo/docker-tor/issues - -# Thanks -Thanks to [Natanael Copa](https://github.com/ncopa) for [su-exec](https://github.com/ncopa/su-exec) and the [Tor Project](https://www.torproject.org/). From cf6d4755d952d2cd7a8ff01c705eb2ac12a1ce4f Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Thu, 23 May 2024 09:58:01 +0200 Subject: [PATCH 09/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 41590c5..8a2e2ea 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Simple Docker container to run a Tor node. - **Docker Hub**: [svengo/tor](https://hub.docker.com/r/svengo/tor) -- **Tor project**: +- **Tor project**: [Tor Project](https://www.torproject.org/) From ece0863e1351d5af63dd017400ddeae73fc1c2fb Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Thu, 23 May 2024 10:12:26 +0200 Subject: [PATCH 10/18] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a2e2ea..abda239 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Simple Docker container to run a Tor node. + # Quick reference - **Maintained by**: @@ -28,7 +29,8 @@ Simple Docker container to run a Tor node. # Supported tags and corresponding `Dockerfile` links * [`latest`, `0.4.8.11`](https://github.com/svengo/docker-tor/blob/025abed5929d69e35e646dac81d32795ab2c6dce/Dockerfile) -I will be rebuilding this image on a regular basis to include updated alpine packages with important security fixes. +I will regularly rebuild the image to include updated Alpine packages with important security fixes. + # How to use this image @@ -142,5 +144,6 @@ When listing a node, it’s better to list it by fingerprint than by nickname: f The IPv4 address of this server, or a fully qualified domain name of this server that resolves to an IPv4 address. You can leave this unset, and Tor will try to guess your IPv4 address. This IPv4 address is the one used to tell clients and other servers where to find your Tor server; it doesn't affect the address that your server binds to. It also seems to work with an IPv6 address. + # Feedback Please report any problems as issues on github: https://github.com/svengo/docker-tor/issues From ff6c73ee9148b54553b731c6aef82c3144b973fa Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Thu, 23 May 2024 10:14:23 +0200 Subject: [PATCH 11/18] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index abda239..e48ab55 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Simple Docker container to run a Tor node. # Supported tags and corresponding `Dockerfile` links -* [`latest`, `0.4.8.11`](https://github.com/svengo/docker-tor/blob/025abed5929d69e35e646dac81d32795ab2c6dce/Dockerfile) +- [`latest`, `0.4.8.11`](https://github.com/svengo/docker-tor/blob/025abed5929d69e35e646dac81d32795ab2c6dce/Dockerfile) I will regularly rebuild the image to include updated Alpine packages with important security fixes. @@ -54,7 +54,7 @@ docker run -d -p 9001:9001 -p 9030:9030 --name tor -v /data/tor:/data svengo/tor ## Basic configuration -Use environment variables for basic configuration. The contents of the environment variables are used to build `/etc/tor/torrc-defaults'. For more advanced configuration you can edit the `/data/torrc` configuration file directly. +Use environment variables for basic configuration. The contents of the environment variables are used to build `/etc/tor/torrc-defaults`. For more advanced configuration you can edit the `/data/torrc` configuration file directly. ``` console docker run -d -p 9001:9001 -p 9030:9030 --name tor -v /data/tor:/data -e "NICKNAME=MyDockerTorNode" -e "CONTACTINFO=foo@example.com" svengo/tor`` From d69f876fa327b5d1e0a93d5eebb54d9ee5cc81ca Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Thu, 23 May 2024 11:57:35 +0200 Subject: [PATCH 12/18] Update README.md --- README.md | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index e48ab55..b360fa4 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,7 @@ Simple Docker container to run a Tor node. - -# Quick reference +### Quick reference - **Maintained by**: [Sven Gottwald](https://github.com/svengo/) @@ -26,15 +25,15 @@ Simple Docker container to run a Tor node. [Tor Project](https://www.torproject.org/) -# Supported tags and corresponding `Dockerfile` links +### Supported tags and corresponding `Dockerfile` links + - [`latest`, `0.4.8.11`](https://github.com/svengo/docker-tor/blob/025abed5929d69e35e646dac81d32795ab2c6dce/Dockerfile) I will regularly rebuild the image to include updated Alpine packages with important security fixes. +## How to use this image -# How to use this image - -## Start a simple Tor node +### Start a simple Tor node This command will start a Tor node and open ports 9001 and 9030: @@ -42,7 +41,7 @@ This command will start a Tor node and open ports 9001 and 9030: docker run -d -p 9001:9001 -p 9030:9030 --name tor svengo/tor ``` -## Data storage +### Data storage Data is stored in an anonymous volume that is mounted on ``/data`` (see docker inspect for more information). You can use a host volume to store the data in a specific directory on the host. The directory could exist, the permissions are handled by the container. @@ -52,7 +51,7 @@ Start the container: docker run -d -p 9001:9001 -p 9030:9030 --name tor -v /data/tor:/data svengo/tor ``` -## Basic configuration +### Basic configuration Use environment variables for basic configuration. The contents of the environment variables are used to build `/etc/tor/torrc-defaults`. For more advanced configuration you can edit the `/data/torrc` configuration file directly. @@ -60,31 +59,31 @@ Use environment variables for basic configuration. The contents of the environme docker run -d -p 9001:9001 -p 9030:9030 --name tor -v /data/tor:/data -e "NICKNAME=MyDockerTorNode" -e "CONTACTINFO=foo@example.com" svengo/tor`` ``` -### Docker Compose +#### Docker Compose You can use [docker-compose.yml](https://github.com/svengo/docker-tor/blob/main/docker-compose.yml). Don't forget to edit the file to suit your needs. -### Environment Variables +#### Environment Variables svengo/tor uses several environment variables to generate the ``torrc-defaults``-file, the variables are set to reasonable defaults (see below). You can edit ``/data/torrc`` to your needs after the first run. -#### ORPORT +##### ORPORT `ORPORT=[address:]PORT|auto [flags]` -Advertise this port to listen for connections from Tor clients and servers. This option is required to be a Tor server. Set it to "auto" to have Tor pick a port for you. Set it to 0 to not run an ORPORT at all. +Advertise this port to listen for connections from Tor clients and servers. This option is required to be a Tor server. Set it to "auto" to have Tor pick a port for you. Set it to 0 to not run an ORPORT at all. (Default: ``9001``) -#### DIRPORT +##### DIRPORT `DIRPORT=[address:]PORT|auto [flags]` -If this option is nonzero, advertise the directory service on this port. Set it to "auto" to have Tor pick a port for you. +If this option is nonzero, advertise the directory service on this port. Set it to "auto" to have Tor pick a port for you. (Default: ``9030``) -#### EXITPOLICY +##### EXITPOLICY `EXITPOLICY=policy,policy,…` @@ -92,7 +91,7 @@ Set an exit policy for this server. Each policy is of the form "accept[6]|reject (Default: ``reject *:* # no exits allowed``) -#### CONTROLPORT +##### CONTROLPORT `CONTROLPORT=PORT|unix:path|auto [flags]` @@ -102,7 +101,7 @@ se Tor to allow any process on the local host to control it. (Default: ``9051``) -#### HASHEDCONTROLPASSWORD +##### HASHEDCONTROLPASSWORD `HASHEDCONTROLPASSWORD=hashed_password` @@ -110,7 +109,7 @@ Allow connections on the control port if they present the password whose one-way (Default: ``16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C``) -#### NICKNAME +##### NICKNAME `NICKNAME=name` @@ -118,7 +117,7 @@ Set the server’s nickname to 'name'. Nicknames must be between 1 and 19 charac (Default: ``ididnteditheconfig``) -#### CONTACTINFO +##### CONTACTINFO `CONTACTINFO=email_address` @@ -128,7 +127,7 @@ You can use [Tor ContactInfo Generator](https://torcontactinfogenerator.netlify. (Default: ``Random Person ``) -#### MYFAMILY +##### MYFAMILY `MYFAMILY=node,node,...` @@ -138,12 +137,12 @@ When listing a node, it’s better to list it by fingerprint than by nickname: f (Default: *empty*) -#### ADDRESS +##### ADDRESS `ADDRESS=tor-node01.example.com` The IPv4 address of this server, or a fully qualified domain name of this server that resolves to an IPv4 address. You can leave this unset, and Tor will try to guess your IPv4 address. This IPv4 address is the one used to tell clients and other servers where to find your Tor server; it doesn't affect the address that your server binds to. It also seems to work with an IPv6 address. +## Feedback -# Feedback -Please report any problems as issues on github: https://github.com/svengo/docker-tor/issues +Please report any problems as issues on [github](https://github.com/svengo/docker-tor/issues). From 37a84810043323cfab3b93fc32088df013affc1e Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Thu, 23 May 2024 13:36:44 +0200 Subject: [PATCH 13/18] Delete docker-compose.staging.yml --- docker-compose.staging.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 docker-compose.staging.yml diff --git a/docker-compose.staging.yml b/docker-compose.staging.yml deleted file mode 100644 index 3dedf44..0000000 --- a/docker-compose.staging.yml +++ /dev/null @@ -1,32 +0,0 @@ -version: '2.3' -services: - daemon: - image: svengo/tor:staging - environment: - - ORPORT=9001 - - DIRPORT=9030 - - CONTROLPORT=9051 - - HASHEDCONTROLPASSWORD=16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C - - NICKNAME=ididnteditheconfig - - CONTACTINFO=Random Person -# - MYFAMILY= -# - ADDRESS= - ports: - - 9001:9001 - - 9030:9030 - volumes: - - tor:/data - restart: no - -volumes: - tor: - -# networks: -# default: -# driver: bridge -# enable_ipv6: true -# ipam: -# driver: default -# config: -# - subnet: fd4d:1111:2222:3333::/64 -# - subnet: 172.26.1.0/24 From 30727a66e30e58b0d1187a35a6c40a0fe6491df1 Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Thu, 23 May 2024 13:41:32 +0200 Subject: [PATCH 14/18] Update README.md --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b360fa4..94c55ae 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Simple Docker container to run a Tor node. -### Quick reference +## Quick reference - **Maintained by**: [Sven Gottwald](https://github.com/svengo/) @@ -24,8 +24,7 @@ Simple Docker container to run a Tor node. - **Tor project**: [Tor Project](https://www.torproject.org/) - -### Supported tags and corresponding `Dockerfile` links +## Supported tags and corresponding `Dockerfile` links - [`latest`, `0.4.8.11`](https://github.com/svengo/docker-tor/blob/025abed5929d69e35e646dac81d32795ab2c6dce/Dockerfile) @@ -53,7 +52,7 @@ docker run -d -p 9001:9001 -p 9030:9030 --name tor -v /data/tor:/data svengo/tor ### Basic configuration -Use environment variables for basic configuration. The contents of the environment variables are used to build `/etc/tor/torrc-defaults`. For more advanced configuration you can edit the `/data/torrc` configuration file directly. +Use environment variables for basic configuration. The contents of the environment variables are used to build `/etc/tor/torrc-defaults`, for more advanced configuration you can edit the `/data/torrc` configuration file directly. ``` console docker run -d -p 9001:9001 -p 9030:9030 --name tor -v /data/tor:/data -e "NICKNAME=MyDockerTorNode" -e "CONTACTINFO=foo@example.com" svengo/tor`` @@ -87,7 +86,7 @@ If this option is nonzero, advertise the directory service on this port. Set it `EXITPOLICY=policy,policy,…` -Set an exit policy for this server. Each policy is of the form "accept[6]|reject[6] ADDR[/MASK][:PORT]". If /MASK is omitted then this policy just applies to the host given. Instead of giving a host or network you can also use "*" to denote the universe (0.0.0.0/0 and ::/128), or *4 to denote all IPv4 addresses, and *6 to denote all IPv6 addresses. PORT can be a single port number, an interval of ports "FROM_PORT-TO_PORT", or "*". If PORT is omitted, that means "*". +Set an exit policy for this server. Each policy is of the form "accept[6]|reject[6] ADDR[/MASK][:PORT]". If /MASK is omitted, then this policy just applies to the host given. Instead of giving a host or network you can also use "*" to denote the universe (0.0.0.0/0 and ::/128), or *4 to denote all IPv4 addresses, and *6 to denote all IPv6 addresses. PORT can be a single port number, an interval of ports "FROM_PORT-TO_PORT", or "*". If PORT is omitted, that means "*". (Default: ``reject *:* # no exits allowed``) From fb8ba174ecb08419babdf58c06a9cab295c58a3d Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Thu, 23 May 2024 13:45:10 +0200 Subject: [PATCH 15/18] Update docker-compose.yml Remove version --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 67c3411..581fefb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: '2.3' services: daemon: image: svengo/tor:latest From 28634aa318506d8b76484d3e8fc1cf1f278bff8f Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Thu, 23 May 2024 13:46:35 +0200 Subject: [PATCH 16/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 94c55ae..30174f7 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Simple Docker container to run a Tor node. ## Supported tags and corresponding `Dockerfile` links -- [`latest`, `0.4.8.11`](https://github.com/svengo/docker-tor/blob/025abed5929d69e35e646dac81d32795ab2c6dce/Dockerfile) +- [`latest`, `0.4.8.11`](https://github.com/svengo/docker-tor/blob/fb8ba174ecb08419babdf58c06a9cab295c58a3d/Dockerfile) I will regularly rebuild the image to include updated Alpine packages with important security fixes. From 3e0b6d881fb1c58db6dceae346c72850e166c1f9 Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Thu, 23 May 2024 14:03:58 +0200 Subject: [PATCH 17/18] Create codacy.yml --- .github/workflows/codacy.yml | 61 ++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/codacy.yml diff --git a/.github/workflows/codacy.yml b/.github/workflows/codacy.yml new file mode 100644 index 0000000..dc9f858 --- /dev/null +++ b/.github/workflows/codacy.yml @@ -0,0 +1,61 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# This workflow checks out code, performs a Codacy security scan +# and integrates the results with the +# GitHub Advanced Security code scanning feature. For more information on +# the Codacy security scan action usage and parameters, see +# https://github.com/codacy/codacy-analysis-cli-action. +# For more information on Codacy Analysis CLI in general, see +# https://github.com/codacy/codacy-analysis-cli. + +name: Codacy Security Scan + +on: + push: + branches: [ "main" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "main" ] + schedule: + - cron: '37 14 * * 5' + +permissions: + contents: read + +jobs: + codacy-security-scan: + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + name: Codacy Security Scan + runs-on: ubuntu-latest + steps: + # Checkout the repository to the GitHub Actions runner + - name: Checkout code + uses: actions/checkout@v4 + + # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis + - name: Run Codacy Analysis CLI + uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b + with: + # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository + # You can also omit the token and run the tools that support default configurations + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + verbose: true + output: results.sarif + format: sarif + # Adjust severity of non-security issues + gh-code-scanning-compat: true + # Force 0 exit code to allow SARIF file generation + # This will handover control about PR rejection to the GitHub side + max-allowed-issues: 2147483647 + + # Upload the SARIF file generated in the previous step + - name: Upload SARIF results file + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: results.sarif From 27a0755b14c0414e60f75749e54a3681aee445da Mon Sep 17 00:00:00 2001 From: Sven Gottwald <2502366+svengo@users.noreply.github.com> Date: Thu, 23 May 2024 14:09:38 +0200 Subject: [PATCH 18/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 30174f7..0308ed6 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ If this option is nonzero, advertise the directory service on this port. Set it `EXITPOLICY=policy,policy,…` -Set an exit policy for this server. Each policy is of the form "accept[6]|reject[6] ADDR[/MASK][:PORT]". If /MASK is omitted, then this policy just applies to the host given. Instead of giving a host or network you can also use "*" to denote the universe (0.0.0.0/0 and ::/128), or *4 to denote all IPv4 addresses, and *6 to denote all IPv6 addresses. PORT can be a single port number, an interval of ports "FROM_PORT-TO_PORT", or "*". If PORT is omitted, that means "*". +Set an exit policy for this server. Each policy is of the form `accept[6]|reject[6] ADDR[/MASK][:PORT]`. If `/MASK` is omitted, then this policy just applies to the host given. Instead of giving a host or network you can also use `*` to denote the universe (0.0.0.0/0 and ::/128), or `*4` to denote all IPv4 addresses, and `*6` to denote all IPv6 addresses. `PORT` can be a single port number, an interval of ports `FROM_PORT-TO_PORT`, or `*` . If PORT is omitted, that means `*`. (Default: ``reject *:* # no exits allowed``)