Compare commits

..

17 Commits

Author SHA1 Message Date
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
9 changed files with 83 additions and 6 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.5.1
# > 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.7.0
with:
platforms: |
linux/amd64
linux/arm/v7
+11 -1
View File
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [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
@@ -79,7 +87,9 @@ 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.3.1...HEAD
[Unreleased]: https://github.com/fphammerle/docker-tor-proxy/compare/v4.5.0...HEAD
[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
+7 -4
View File
@@ -1,8 +1,8 @@
FROM docker.io/alpine:3.13.5
FROM docker.io/alpine:3.14.2
# nftables + dependencies add 2.3MB to image
ARG TOR_PACKAGE_VERSION=0.4.4.8-r0
ARG NFTABLES_PACKAGE_VERSION=0.9.7-r0
ARG TOR_PACKAGE_VERSION=0.4.5.10-r0
ARG NFTABLES_PACKAGE_VERSION=0.9.9-r0
RUN apk add --no-cache \
nftables=$NFTABLES_PACKAGE_VERSION \
tor=$TOR_PACKAGE_VERSION
@@ -11,6 +11,7 @@ VOLUME /var/lib/tor
#RUN apk add --no-cache \
# less \
# man-db \
# strace \
# tor-doc=$TOR_PACKAGE_VERSION
#ENV PAGER=less
@@ -18,7 +19,9 @@ 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"]
# entrypoint.sh drops privileges after configuring nftables for transparent proxy
+12
View File
@@ -48,6 +48,18 @@ sudo iptables -A OUTPUT ! -o lo -j REJECT --reject-with icmp-admin-prohibited
$ sudo docker run -e SOCKS_TIMEOUT_SECONDS=60
```
### Select Exit Nodes
```sh
$ 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
+3 -1
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,7 +21,7 @@ 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'
+11
View File
@@ -20,4 +20,15 @@ else
sed -e "s/{socks_timeout_seconds}/$SOCKS_TIMEOUT_SECONDS/" /torrc.template > /tmp/torrc
fi
if [ -z "$EXIT_NODES" ]; then
sed --in-place -e '/{exit_nodes}/d' /tmp/torrc
else
sed --in-place -e "s#{exit_nodes}#$EXIT_NODES#" /tmp/torrc
fi
if [ -z "$EXCLUDE_EXIT_NODES" ]; then
sed --in-place -e '/{exclude_exit_nodes}/d' /tmp/torrc
else
sed --in-place -e "s#{exclude_exit_nodes}#$EXCLUDE_EXIT_NODES#" /tmp/torrc
fi
exec "$@"
+1
View File
@@ -0,0 +1 @@
https://git.alpinelinux.org/aports/log/community/tor
+4
View File
@@ -26,5 +26,9 @@ SocksTimeout {socks_timeout_seconds}
# https://github.com/mitmproxy/mitmproxy/blob/v6.0.2/mitmproxy/platform/linux.py#L27
TransPort 0.0.0.0:9040 IsolateClientAddr IsolateClientProtocol
# > list of identity fingerprints, country codes, and address patterns
ExitNodes {exit_nodes}
ExcludeExitNodes {exclude_exit_nodes}
# try to
HardwareAccel 1