Compare commits

...

54 Commits

Author SHA1 Message Date
Fabian Peter Hammerle afcf2b4cc1 release v4.5.1 2022-02-27 16:29:08 +01:00
Fabian Peter Hammerle eb23db5412 adapt entrypoint script to fix "sed: write error" for large values of EXIT_NODES and EXCLUDE_EXIT_NODES 2022-02-27 16:27:14 +01:00
dependabot[bot] 9e41750ca9 build(deps): bump docker/build-push-action from 2.8.0 to 2.9.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2.8.0...v2.9.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-04 08:07:56 +00:00
dependabot[bot] 6a1098af3d build(deps): bump docker/build-push-action from 2.7.0 to 2.8.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2.7.0...v2.8.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 08:06:14 +00:00
Fabian Peter Hammerle 7fc341fb34 make docker-push: add image tag to suggested git tag message
https://github.com/fphammerle/docker-onion-service/commit/ef034c6f61d63a72e25309449bbc19496f4f2ad7
2021-12-28 12:59:06 +01:00
Fabian Peter Hammerle 4b287edbd4 upgrade tor package to v0.4.6.9-r0 (see below)
https://web.archive.org/web/20211228082801/https://gitweb.torproject.org/tor.git/plain/ChangeLog
https://git.alpinelinux.org/aports/commit/community/tor?h=3.15-stable&id=cacb3a44facfe85ca04ca1868ecf0f0fbaeae190

https://github.com/fphammerle/docker-tor-obfs4-bridge/commit/127af8a9b1235120bba8dc40b609dc3bf20b4566
2021-12-28 09:47:26 +01:00
Fabian Peter Hammerle 1eb9583069 upgrade tor package to v0.4.6.8-r0 (see below)
https://web.archive.org/web/20211219210312/https://gitweb.torproject.org/tor.git/plain/ChangeLog
https://git.alpinelinux.org/aports/commit/community/tor?h=3.15-stable&id=178008f6bd3a8c810e17902277ffa30bb59933a1

https://github.com/fphammerle/docker-tor-obfs4-bridge/commit/f76e89e788260385778d0692741bfa23c9ec16ac
2021-12-19 22:11:42 +01:00
Fabian Peter Hammerle 946bc9db19 upgrade alpine base image to v3.15.0 including upgrade of tor package from v0.4.5.10-r0 to v0.4.6.7-r1 and nftables package (see below)
https://web.archive.org/web/20211204112320/https://gitweb.torproject.org/tor.git/plain/ChangeLog
https://git.alpinelinux.org/aports/commit/community/tor?h=3.15-stable&id=01351ec5162a1c190361b3799c63862a4c94d935
https://git.alpinelinux.org/aports/commit/community/tor?h=3.15-stable&id=7d4f77837c3a2f1cecfbfbe9224552b3614e3664
https://git.alpinelinux.org/aports/commit/community/tor?h=3.15-stable&id=8c36ff0a65aac9960da5cfce6694eedd8d869da6
https://git.alpinelinux.org/aports/commit/community/tor?h=3.15-stable&id=82d7315dd0e5b8d8fca73c175c95c280d24707b1

https://github.com/fphammerle/docker-tor-obfs4-bridge/commit/ebf4ab28c1c9a3b481334feff9826e2f0e2b5cc1

https://web.archive.org/web/20211204163111/https://lwn.net/Articles/866923/
https://web.archive.org/web/20211204162830/https://marc.info/?l=netfilter&m=163724233607275&w=2
https://git.alpinelinux.org/aports/commit/main/nftables?h=3.15-stable&id=e6af0bc07e922da5464d954686ffa1b144147289
https://git.alpinelinux.org/aports/commit/main/nftables?h=3.15-stable&id=bff049102a3177352d3caff2aa4aecf8a2993740
https://git.alpinelinux.org/aports/commit/main/nftables?h=3.15-stable&id=d69dc1a17026ff1844636db10fa77c7b546ac45a
2021-12-04 17:25:28 +01:00
dependabot[bot] ce0fce96e0 build(deps): bump alpine from 3.14.3 to 3.15.0
Bumps alpine from 3.14.3 to 3.15.0.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-26 08:02:54 +00:00
dependabot[bot] d7d5518a21 build(deps): bump alpine from 3.14.2 to 3.14.3
Bumps alpine from 3.14.2 to 3.14.3.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-19 08:02:58 +00:00
dependabot[bot] 5db662d486 build(deps): bump docker/setup-buildx-action from 1.5.1 to 1.6.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1.5.1...v1.6.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-10 11:55:05 +00:00
Fabian Peter Hammerle 31a69d9d90 release v4.5.0 2021-09-06 14:49:37 +02:00
Fabian Peter Hammerle b26c721e60 added ability to select exit nodes explicitly via EXIT_NODES env var 2021-09-05 16:22:00 +02:00
dependabot[bot] fc3f461cdd build(deps): bump alpine from 3.14.1 to 3.14.2
Bumps alpine from 3.14.1 to 3.14.2.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-03 08:01:52 +00:00
dependabot[bot] 4bdd61e3b2 build(deps): bump docker/build-push-action from 2.6.1 to 2.7.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.6.1 to 2.7.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2.6.1...v2.7.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-27 08:05:44 +00:00
Fabian Peter Hammerle 5a9d489a1d upgrade tor package from v0.4.5.9-r0 to v0.4.5.10-r0 (see links below)
https://gitweb.torproject.org/tor.git/plain/ChangeLog
https://git.alpinelinux.org/aports/commit/community/tor?id=b2aec05acfa2bf2a191f41f24ed213f883e648e9
2021-08-21 19:51:45 +02:00
dependabot[bot] db1f87c85c build(deps): bump alpine from 3.14.0 to 3.14.1
Bumps alpine from 3.14.0 to 3.14.1.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-13 08:02:55 +00:00
dependabot[bot] 0cf3a5f284 build(deps): bump docker/setup-buildx-action from 1.5.0 to 1.5.1
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-16 08:06:36 +00:00
dependabot[bot] 2cb4dfeb05 build(deps): bump docker/setup-buildx-action from 1.4.1 to 1.5.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1.4.1...v1.5.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-09 08:03:58 +00:00
Fabian Peter Hammerle e3d69cb61c release v4.4.0 2021-07-07 18:28:12 +02:00
Fabian Peter Hammerle 58fe2f7c03 added ability to exclude exit nodes via EXCLUDE_EXIT_NODES environment variable 2021-07-07 18:15:27 +02:00
dependabot[bot] e17905a023 build(deps): bump docker/build-push-action from 2.5.0 to 2.6.1
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.5.0 to 2.6.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2.5.0...v2.6.1)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 08:27:35 +00:00
dependabot[bot] dfb3bce8c7 build(deps): bump docker/setup-buildx-action from 1.3.0 to 1.4.1
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.3.0 to 1.4.1.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1.3.0...v1.4.1)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 08:04:24 +00:00
Fabian Peter Hammerle 99b6bc5bff upgrade alpine base image from v3.13.5 to v3.14.0 including tor package upgrade from v0.4.4.9-r0 to v0.4.5.9-r0 (diff links below)
https://gitweb.torproject.org/tor.git/plain/ChangeLog

https://git.alpinelinux.org/aports/commit/community/tor?id=6fd8dd11c3e025bd7eb8946158bddebfc4c5876a
https://git.alpinelinux.org/aports/commit/community/tor?id=f5832ba01e71545659a5f3f10330d5e42bdd16f3
https://git.alpinelinux.org/aports/commit/community/tor?id=8cc62f0ffbf3e4af479c12d0a214ea7d00814413
https://git.alpinelinux.org/aports/commit/community/tor?id=7170b8d4004b2185a70d0cfeed319fe02a3baea2
https://git.alpinelinux.org/aports/commit/community/tor?id=34d381f44e156b172854b542c7fcdbe40336293f
https://git.alpinelinux.org/aports/commit/community/tor?id=3e880d50ad912dc044bab412ea2b01d3192b855a

https://github.com/fphammerle/docker-onion-service/commit/4ff78b81909c1b0cf03fd6a6cb5e4480b6e8a27f

https://git.alpinelinux.org/aports/commit/main/nftables?id=60fa97f49b77e71347d1bd8bce92a69edde0aa66
https://git.alpinelinux.org/aports/commit/main/nftables?id=7d1e2f3541d57e1a4f347743e2a6abf63f510a13
https://git.alpinelinux.org/aports/commit/main/nftables?id=461d764f6a933295f84bdc4fb1a7642ac0857505
2021-06-20 15:24:07 +02:00
dependabot[bot] a99aab74ab build(deps): bump alpine from 3.13.5 to 3.14.0
Bumps alpine from 3.13.5 to 3.14.0.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-20 13:21:13 +00:00
Fabian Peter Hammerle 3900d94aa4 configure dependabot to keep github-actions up-to-date
https://github.com/fphammerle/docker-onion-service/commit/16856af330263d1331895212ae2e6927a35159a4
https://github.com/fphammerle/ical2vdir/commit/76d3b61c128fe1cad322e52d5877cc919a533ac4
2021-06-20 15:19:46 +02:00
Fabian Peter Hammerle 958016fd7c setup github action verifying docker build succeeds (to replace docker's autobuild service)
> Docker’s Autobuild service has been targeted by the same bad actors,
> so today we are disappointed to announce that
> we will be discontinuing Autobuilds on the free tier starting from June 18, 2021.
https://www.docker.com/blog/changes-to-docker-hub-autobuilds/

https://github.com/fphammerle/docker-onion-service/commit/d774f5131cf948ed90e81f96c14f842ff72d880d
https://github.com/fphammerle/switchbot-mqtt/commit/d7b875458d6e11505fb305ecb9f1f40bb5720a21
2021-06-20 15:19:26 +02:00
Fabian Peter Hammerle 46e38ace3b upgrade tor package from v0.4.4.8-r0 to v0.4.4.9-r0 (see below)
> Tor 0.4.4.9 fixes several security issues, [...]
https://gitweb.torproject.org/tor.git/plain/ChangeLog
https://git.alpinelinux.org/aports/commit/?h=3.13-stable&id=1a4d9c72ba358ec1eba313fde97e9a512527200b
2021-06-20 15:18:23 +02:00
Fabian Peter Hammerle 0cd4a1b854 release v4.3.1 2021-05-15 22:54:38 +02:00
Fabian Peter Hammerle 55b6ed7889 entrypoint: create prerouting chain if not already created by container runtime 2021-05-15 22:52:16 +02:00
Fabian Peter Hammerle 1eba286ed7 release v4.3.0 2021-05-07 13:22:04 +02:00
Fabian Peter Hammerle a75b7aebae add nft rule forwarding udp dns requests to tor 2021-05-07 00:08:52 +02:00
Fabian Peter Hammerle 6b811fe5c6 release v4.2.0 2021-04-30 12:50:31 +02:00
Fabian Peter Hammerle db9609494e add nft rule redirecting tcp traffic to transparent proxy 2021-04-30 12:35:15 +02:00
dependabot[bot] f05b6c3765 build(deps): bump alpine from 3.13.4 to 3.13.5
Bumps alpine from 3.13.4 to 3.13.5.

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-16 05:45:24 +00:00
dependabot[bot] f301bd9968 build(deps): bump alpine from 3.13.3 to 3.13.4
Bumps alpine from 3.13.3 to 3.13.4.

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-02 06:28:41 +00:00
Fabian Peter Hammerle 76f7fcaf09 upgrade alpine base image v3.12.2->v3.13.3 including upgrade of tor v0.4.4.7-r1->v0.4.4.8-r0 (see below)
> One of these vulnerabilities (TROVE-2021-001) would allow an attacker
> who can send directory data to a Tor instance to force that Tor
> instance to consume huge amounts of CPU.
https://gitweb.torproject.org/tor.git/plain/ChangeLog

https://cve.circl.lu/cve/CVE-2021-28089

https://git.alpinelinux.org/aports/commit/community/tor?id=dc7ce7e4b63c64d11026e307ada830c33d8309a4

https://github.com/fphammerle/docker-onion-service/commit/48c53ae15c2780b3ac97ac55a91748e947a55ead
2021-03-27 15:30:34 +01:00
dependabot[bot] 4e2545483d build(deps): bump alpine from 3.13.2 to 3.13.3
Bumps alpine from 3.13.2 to 3.13.3.

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-26 06:19:03 +00:00
Fabian Peter Hammerle f9f3095cba readme: simplify control port commands (no longer invoke shell) 2021-03-03 18:57:41 +01:00
Fabian Peter Hammerle eac37ae895 readme: added instructions to disable safe logging; capitalize headlines 2021-03-03 18:54:14 +01:00
Fabian Peter Hammerle 579ec95c54 readme: added apt-get install cmd for onioncircuits 2021-03-03 17:12:48 +01:00
Fabian Peter Hammerle 63cc740dae readme: added command to launch onioncircuits 2021-03-03 17:07:44 +01:00
Fabian Peter Hammerle 71cd9e4843 release v4.1.0 2021-03-03 14:25:32 +01:00
Fabian Peter Hammerle 677e9db8e2 added image labels org.opencontainers.image.title, .source & .revision
https://github.com/fphammerle/docker-onion-service/commit/46ca6d70fb2d4570bfddac6b3f5e485183e72405
https://github.com/fphammerle/docker-onion-service/commit/aa124bde955047b2de6316ff72d6b1f76d14e3ba
2021-03-03 14:08:29 +01:00
Fabian Peter Hammerle 8ae9e9e5b7 makefile: added "podman-build" target
https://github.com/fphammerle/docker-onion-service/commit/77a062c4afcd96abe1ba7663a2914a94e01b9c24
https://github.com/fphammerle/docker-onion-service/commit/4c673eef480af3bb9498c0364a55dc3d8f8a5afc
https://github.com/fphammerle/docker-onion-service/commit/a3e89529767a7eb52c4bce52277715d388f6935a
https://github.com/fphammerle/docker-onion-service/commit/e8dfe51bb831c54d9a87be7c70f3f79e2f45d9ce
2021-03-03 13:48:47 +01:00
Fabian Peter Hammerle 1951c1f3a9 enable transparent proxy 2021-03-03 12:25:12 +01:00
Fabian Peter Hammerle edac4ed3da upgrade alpine base image v3.13.1->3.13.2 including upgrade of tor package v0.4.4.6-r1->0.4.4.7-r1 (diff links below)
https://git.alpinelinux.org/aports/commit/community/tor?id=3ff23770ebde5d5ce691e662d25ba01bd5020f3d
https://git.alpinelinux.org/aports/commit/community/tor?id=a9d54349aa5fec39e2d79c46838ce05904ca9bda
https://git.alpinelinux.org/aports/commit/community/tor?id=9ed5ece0dd0317f1976a1bb4729e911786d33af9

cherry-pick of https://github.com/fphammerle/docker-onion-service/commit/0599554fd6ae2ee3404dc63cec90730b14fa1fc2
2021-02-19 13:13:56 +01:00
dependabot[bot] 5cc893c3c3 build(deps): bump alpine from 3.13.1 to 3.13.2
Bumps alpine from 3.13.1 to 3.13.2.

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-19 06:10:22 +00:00
dependabot[bot] 4e2e1bbf4f build(deps): bump alpine from 3.13.0 to 3.13.1
Bumps alpine from 3.13.0 to 3.13.1.

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-29 05:49:05 +00:00
Fabian Peter Hammerle 40b88ec7d5 upgrade alpine base image v3.12.3->v3.13.0 including upgrade of tor v0.4.3.7-r0->v0.4.4.6-r1 (diff links below)
https://gitweb.torproject.org/tor.git/plain/ChangeLog

https://git.alpinelinux.org/aports/commit/community/tor?id=d181b0289ff7c32d371dcd976276672bbe2e7b72
https://git.alpinelinux.org/aports/commit/community/tor?id=9a0a0a5045901ab97ef455b54ffe19c91ca6993e
https://git.alpinelinux.org/aports/commit/community/tor?id=5edd132382384956e1787d4dcd5f1ffa9c520571
https://git.alpinelinux.org/aports/commit/community/tor?id=4ecb636d72d13db0f95f6e840e755bb260c91165
2021-01-15 12:46:01 +01:00
dependabot[bot] 67c5c44495 build(deps): bump alpine from 3.12.3 to 3.13.0
Bumps alpine from 3.12.3 to 3.13.0.

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-15 06:05:59 +00:00
Fabian Peter Hammerle ba4cafac27 make: add tor package version to image tag 2021-01-01 17:40:10 +01:00
Fabian Peter Hammerle fea43b11d8 make: abort docker-build if changes uncommitted; suggest git tag command
https://github.com/fphammerle/wireless-sensor-mqtt/blob/222d2e124d231b207da647c1f7a9c5ec9a37b4ac/Makefile#L34
2021-01-01 17:29:38 +01:00
Fabian Peter Hammerle 4f6950af1d make: added docker-build & docker-push target
https://github.com/fphammerle/systemctl-mqtt/commit/54a3c74eae0e85307ac5f9258c345bc133d3133a#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52
https://github.com/fphammerle/systemctl-mqtt/commit/7887079ebeed7e26cfc36bbdcbdfd6ceeb65bdee#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52
2021-01-01 17:25:40 +01:00
12 changed files with 207 additions and 19 deletions
+8
View File
@@ -1,3 +1,5 @@
# sync with https://github.com/fphammerle/docker-onion-service/blob/master/.github/dependabot.yml
version: 2
updates:
@@ -6,5 +8,11 @@ updates:
schedule:
interval: weekly
day: friday
- package-ecosystem: github-actions
directory: /
# > YAML aliases are not supported
schedule:
interval: weekly
day: friday
# https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates
+26
View File
@@ -0,0 +1,26 @@
# sync with https://github.com/fphammerle/docker-onion-service/blob/master/.github/workflows/container-image.yml
name: container image
on:
push:
pull_request:
schedule:
- cron: '0 20 * * 5'
jobs:
docker-build:
runs-on: ubuntu-20.04
steps:
- uses: docker/setup-qemu-action@v1.2.0
- uses: docker/setup-buildx-action@v1.6.0
# > By default, this action uses the Git context so you don't need to use
# > the actions/checkout action to checkout the repository because this
# > will be done directly by buildkit. [...]
# > any file mutation in the steps that precede [...] will be ignored
# https://github.com/marketplace/actions/build-and-push-docker-images
- uses: docker/build-push-action@v2.9.0
with:
platforms: |
linux/amd64
linux/arm/v7
+44 -1
View File
@@ -6,6 +6,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [4.5.1] - 2022-02-27
### Fixed
- "sed: write error" for large values of `EXIT_NODES` and `EXCLUDE_EXIT_NODES`
## [4.5.0] - 2021-09-06
### Added
- added ability to select exit nodes explicitly via `EXIT_NODES` environment variable
## [4.4.0] - 2021-07-07
### Added
- added ability to exclude exit nodes via `EXCLUDE_EXIT_NODES` environment variable
## [4.3.1] - 2021-05-15
### Fixed
- create prerouting chain if not already created by container runtime
(fixes dns proxy with direct routing & transparent proxy on some hosts)
## [4.3.0] - 2021-05-07
### Added
- when running entrypoint as `uid=0`:
add `nftables` rule forwarding udp dns requests (port 53) to tor
(alternative for less flexible `docker run --publish 53:9053 …`)
## [4.2.0] - 2021-04-30
### Added
- when running entrypoint as `uid=0`:
add `nftables` rule redirecting `tcp` traffic to transparent proxy
## [4.1.0] - 2021-03-03
### Added
- enabled transparent proxy, listening on port `9040` (requires netfilter rules)
- image labels:
- `org.opencontainers.image.revision` (git commit hash via build arg)
- `org.opencontainers.image.source` (repo url)
- `org.opencontainers.image.title`
## [4.0.0] - 2021-01-01
### Changed
- healthcheck: replace periodic http requests with probing
@@ -55,7 +91,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- tor socks5 & DNS proxy
[Unreleased]: https://github.com/fphammerle/docker-tor-proxy/compare/v4.0.0...HEAD
[Unreleased]: https://github.com/fphammerle/docker-tor-proxy/compare/v4.5.1...HEAD
[4.5.1]: https://github.com/fphammerle/docker-tor-proxy/compare/v4.5.0...v4.5.1
[4.5.0]: https://github.com/fphammerle/docker-tor-proxy/compare/v4.4.0...v4.5.0
[4.4.0]: https://github.com/fphammerle/docker-tor-proxy/compare/v4.3.1...v4.4.0
[4.3.1]: https://github.com/fphammerle/docker-tor-proxy/compare/v4.3.0...v4.3.1
[4.3.0]: https://github.com/fphammerle/docker-tor-proxy/compare/v4.2.0...v4.3.0
[4.2.0]: https://github.com/fphammerle/docker-tor-proxy/compare/v4.1.0...v4.2.0
[4.1.0]: https://github.com/fphammerle/docker-tor-proxy/compare/v4.0.0...v4.1.0
[4.0.0]: https://github.com/fphammerle/docker-tor-proxy/compare/v3.0.0...v4.0.0
[3.0.0]: https://github.com/fphammerle/docker-tor-proxy/compare/v2.1.0...v3.0.0
[2.1.0]: https://github.com/fphammerle/docker-tor-proxy/compare/v2.0.0...v2.1.0
+19 -5
View File
@@ -1,12 +1,17 @@
FROM alpine:3.12.3
FROM docker.io/alpine:3.15.0
ARG TOR_PACKAGE_VERSION=0.4.3.7-r0
RUN apk add --no-cache tor=$TOR_PACKAGE_VERSION
# nftables + dependencies add 2.3MB to image
ARG TOR_PACKAGE_VERSION=0.4.6.9-r0
ARG NFTABLES_PACKAGE_VERSION=1.0.1-r0
RUN apk add --no-cache \
nftables=$NFTABLES_PACKAGE_VERSION \
tor=$TOR_PACKAGE_VERSION
VOLUME /var/lib/tor
#RUN apk add --no-cache \
# less \
# man-db \
# strace \
# tor-doc=$TOR_PACKAGE_VERSION
#ENV PAGER=less
@@ -14,10 +19,13 @@ EXPOSE 9050/tcp
EXPOSE 9053/udp
COPY torrc.template entrypoint.sh /
RUN chmod -c a+rX /torrc.template /entrypoint.sh
ENV SOCKS_TIMEOUT_SECONDS=
ENV SOCKS_TIMEOUT_SECONDS= \
EXIT_NODES= \
EXCLUDE_EXIT_NODES=
ENTRYPOINT ["/entrypoint.sh"]
USER tor
# entrypoint.sh drops privileges after configuring nftables for transparent proxy
#USER tor
CMD ["tor", "-f", "/tmp/torrc"]
# keeping dns requests as network-liveness is too optimistic
@@ -27,3 +35,9 @@ HEALTHCHECK CMD \
| grep -q network-liveness=up \
&& nslookup -port=9053 google.com localhost | grep -v NXDOMAIN | grep -q google \
|| exit 1
# https://github.com/opencontainers/image-spec/blob/v1.0.1/annotations.md
ARG REVISION=
LABEL org.opencontainers.image.title="tor socks, dns & transparent proxy" \
org.opencontainers.image.source="https://github.com/fphammerle/docker-tor-proxy" \
org.opencontainers.image.revision="$REVISION"
+32
View File
@@ -0,0 +1,32 @@
IMAGE_NAME := docker.io/fphammerle/tor-proxy
PROJECT_VERSION = $(shell git describe --match=v* --abbrev=0 --dirty | sed -e 's/^v//')
TOR_PACKAGE_VERSION = $(shell grep -Po 'TOR_PACKAGE_VERSION=\K.+' Dockerfile | tr -d -)
ARCH = $(shell arch)
# architecture[arm_variant]
# https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md#image-index-property-descriptions
IMAGE_TAG_ARCH_aarch64 = arm64
IMAGE_TAG_ARCH_armv6l = armv6
IMAGE_TAG_ARCH_armv7l = armv7
IMAGE_TAG_ARCH_x86_64 = amd64
IMAGE_TAG_ARCH = ${IMAGE_TAG_ARCH_${ARCH}}
IMAGE_TAG = ${PROJECT_VERSION}-tor${TOR_PACKAGE_VERSION}-${IMAGE_TAG_ARCH}
BUILD_PARAMS = --tag="${IMAGE_NAME}:${IMAGE_TAG}" \
--build-arg=REVISION="$(shell git rev-parse HEAD)"
.PHONY: worktree-clean docker-build podman-build docker-push
worktree-clean:
git diff --exit-code
git diff --staged --exit-code
docker-build: worktree-clean
sudo docker build ${BUILD_PARAMS} .
podman-build: worktree-clean
# --format=oci (default) not fully supported by hub.docker.com
# https://github.com/docker/hub-feedback/issues/1871#issuecomment-748924149
podman build --format=docker ${BUILD_PARAMS} .
docker-push: docker-build
sudo docker push "${IMAGE_NAME}:${IMAGE_TAG}"
@echo git tag --sign --message '$(shell sudo docker image inspect --format '{{join .RepoDigests "\n"}}' "${IMAGE_NAME}:${IMAGE_TAG}" | sed "s/@/:${IMAGE_TAG}@/")' docker/${IMAGE_TAG} $(shell git rev-parse HEAD)
+38 -11
View File
@@ -1,8 +1,8 @@
# docker: tor socks & dns proxy 🌐 🐳
docker hub: https://hub.docker.com/r/fphammerle/tor-proxy
Docker Hub: https://hub.docker.com/r/fphammerle/tor-proxy
signed tags: https://github.com/fphammerle/docker-tor-proxy/tags
Signed image tags: https://github.com/fphammerle/docker-tor-proxy/tags
```sh
$ sudo docker run --rm --name tor_proxy \
@@ -16,7 +16,7 @@ or after cloning the repository 🐙
$ sudo docker-compose up
```
### test proxies
### Test Proxies
```sh
$ curl --proxy socks5h://localhost:9050 ipinfo.io
@@ -28,30 +28,57 @@ $ ssh -o 'ProxyCommand nc -x localhost:9050 -v %h %p' abcdefghi.onion
$ chromium-browser --proxy-server=socks5://localhost:9050 ipinfo.io
```
### read-only root filesystem
### Read-only Root Filesystem
optionally add
Optionally add
```sh
$ sudo docker run --read-only -v tor_proxy_data:/var/lib/tor --tmpfs /tmp:rw,size=4k`
```
to make the container's root filesystem read-only
to make the container's root filesystem read-only.
### isolate
### Isolate Host
```sh
sudo iptables -A OUTPUT ! -o lo -j REJECT --reject-with icmp-admin-prohibited
```
### change `SocksTimeout` option
### Change `SocksTimeout` Option
```sh
$ sudo docker run -e SOCKS_TIMEOUT_SECONDS=60
```
### show circuits
### Select Exit Nodes
```sh
$ sudo docker exec tor_proxy \
sh -c 'printf "AUTHENTICATE\nGETINFO circuit-status\nQUIT\n" | nc localhost 9051'
$ sudo docker run -e EXIT_NODES=1.2.3.4,1.2.3.5,{at}
```
### Exclude Exit Nodes
```sh
$ sudo docker run -e EXCLUDE_EXIT_NODES=1.2.3.4,1.2.3.5 …
```
### Show Circuits
```sh
$ printf 'AUTHENTICATE\nGETINFO circuit-status\nQUIT\n' \
| sudo docker exec -i tor_proxy nc localhost 9051
```
relay search: https://metrics.torproject.org/rs.html
or using [onioncircuits](https://gitlab.tails.boum.org/tails/onioncircuits) ([debian repo](https://salsa.debian.org/pkg-privacy-team/onioncircuits)):
```sh
$ sudo apt-get install --no-install-recommends onioncircuits
$ sudo nsenter --target "$(sudo docker inspect --format='{{.State.Pid}}' tor_proxy)" --net \
sudo -u $USER onioncircuits
```
### Troubleshooting
Disable `SafeLogging` (temporarily) to log IP addresses instead of `[scrubbed]`:
```
$ printf 'AUTHENTICATE\nSETCONF SafeLogging=0\nGETCONF SafeLogging\nQUIT\n' \
| sudo docker exec -i tor_proxy nc localhost 9051
```
+5 -2
View File
@@ -9,6 +9,8 @@ services:
image: fphammerle/tor-proxy
environment:
SOCKS_TIMEOUT_SECONDS: 30
#EXIT_NODES: '1.2.3.4,1.2.3.5,{at}'
#EXCLUDE_EXIT_NODES: '{xx},{yy},1.2.3.4,128.0.0.0/1'
volumes:
- type: volume
source: data
@@ -19,13 +21,14 @@ services:
tmpfs:
# nosuid,nodev,noexec added by default
mode: '1777'
size: 4k
size: 5k
read_only: yes
ports:
- '127.0.0.1:9050:9050/tcp'
- '127.0.0.1:53:9053/udp'
cap_drop: [ALL]
#cap_add: [SYS_PTRACE]
# entrypoint.sh drops privileges after configuring nftables for transparent proxy
cap_add: [NET_ADMIN, SETUID, SETGID]
security_opt: [no-new-privileges]
cpus: 0.5
mem_limit: 128m
+20
View File
@@ -2,6 +2,16 @@
set -e
if [ "$(id -u)" -eq 0 ]; then
nft add chain ip nat PREROUTING { type nat hook prerouting priority dstnat \; } || true
nft add rule ip nat PREROUTING ip protocol tcp fib daddr type != local counter redirect to :9040 \
|| echo 'warning: failed to configure nftables for transparent proxy (missing CAP_NET_ADMIN?)'
nft add rule ip nat PREROUTING fib daddr type local udp dport 53 counter redirect to :9053 \
|| echo 'warning: failed to configure nftables for DNS proxy' \
'(alternative for less flexible `docker run --publish 53:9053 ...`)'
exec su -s /bin/sh tor -- "$0" "$@"
fi
# default: 120 sec
# https://github.com/torproject/tor/blob/tor-0.4.1.7/src/core/or/connection_edge.c#L1099
if [ -z "$SOCKS_TIMEOUT_SECONDS" ]; then
@@ -10,4 +20,14 @@ else
sed -e "s/{socks_timeout_seconds}/$SOCKS_TIMEOUT_SECONDS/" /torrc.template > /tmp/torrc
fi
# > list of identity fingerprints, country codes, and address patterns
if [ ! -z "$EXIT_NODES" ]; then
echo -n 'ExitNodes ' >> /tmp/torrc
printenv EXIT_NODES >> /tmp/torrc
fi
if [ ! -z "$EXCLUDE_EXIT_NODES" ]; then
echo -n 'ExcludeExitNodes ' >> /tmp/torrc
printenv EXCLUDE_EXIT_NODES >> /tmp/torrc
fi
exec "$@"
+1
View File
@@ -0,0 +1 @@
https://git.alpinelinux.org/aports/log/main/nftables?h=3.15-stable
+1
View File
@@ -0,0 +1 @@
https://gitweb.torproject.org/tor.git/plain/ChangeLog
+1
View File
@@ -0,0 +1 @@
https://git.alpinelinux.org/aports/log/community/tor?h=3.15-stable
+12
View File
@@ -1,3 +1,5 @@
# https://www.torproject.org/docs/tor-manual.html.en
# hide healthchecks:
# > [notice] {CONTROL} New control connection opened from 127.0.0.1.
Log [~control]notice warn stdout
@@ -14,5 +16,15 @@ DNSPort 0.0.0.0:9053
SocksPort 0.0.0.0:9050
SocksTimeout {socks_timeout_seconds}
# requires netfilter rules
# socks5 with auth-based circuit isolation (tor browser, torsocks --isolate) should be preferred
# cave: IsolateDestAddr & IsolateDestPort are not enabled
# https://gitlab.torproject.org/legacy/trac/-/wikis/doc/TransparentProxy
# https://github.com/epidemics-scepticism/writing/blob/b6733379d653b30771d578ace04c262600345122/misconception.md#transparent-proxying-lacks-context
# https://lists.torproject.org/pipermail/tor-talk/2014-March/032507.html
# https://gitweb.torproject.org/tor.git/tree/src/or/connection_edge.c?id=6285d9bdcf7f210c56abd25f75133e30d05a7473#n1423
# https://github.com/mitmproxy/mitmproxy/blob/v6.0.2/mitmproxy/platform/linux.py#L27
TransPort 0.0.0.0:9040 IsolateClientAddr IsolateClientProtocol
# try to
HardwareAccel 1