Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added quotes to autoheal label to make it a boolean #2903

Open
wants to merge 26 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4e09eda
Dev (#2706)
pkishino Sep 5, 2023
81277fb
Update README.md
pkishino Sep 5, 2023
7a11219
Bump actions/checkout from 3 to 4 (#2714)
dependabot[bot] Sep 11, 2023
eb06527
Bump docker/setup-buildx-action from 2 to 3 (#2718)
dependabot[bot] Nov 9, 2023
746cf46
Bump docker/login-action from 2 to 3 (#2719)
dependabot[bot] Nov 9, 2023
e6f8350
Bump docker/setup-qemu-action from 2 to 3 (#2720)
dependabot[bot] Nov 9, 2023
33bba5b
Bump docker/metadata-action from 4 to 5 (#2721)
dependabot[bot] Nov 9, 2023
99b4578
Bump docker/build-push-action from 4 to 5 (#2722)
dependabot[bot] Nov 9, 2023
40a598a
Update tips-tricks.md
pkishino Nov 13, 2023
ad0d997
fixing invalid concatenation (#2743)
jamesstorm Nov 14, 2023
69ca229
Update check-transmission-releases.yml
pkishino Dec 8, 2023
90bb802
Merging dev into master in prep for new release (#2755)
pkishino Dec 8, 2023
07f5a2b
update transmission to 4.0.5 (#2756)
pkishino Dec 8, 2023
2f4bcce
added protonvpn documentation (#2769)
deanso Dec 18, 2023
2cf661c
Update README.md (#2775)
kevincw01 Dec 22, 2023
7837a90
protonvpn.net.udp –> protonvpn.udp (#2804)
ethicnology Feb 12, 2024
d93fb5f
Update bug_report.yaml
pkishino Feb 25, 2024
43d03f2
Update bug_report.yaml
pkishino Feb 25, 2024
977f5c4
Update bug_report.yaml
pkishino Feb 25, 2024
f6fe7a9
Update bug_report.yaml
pkishino Feb 25, 2024
deebad0
Update README.md (#2809)
IlmariKu Feb 26, 2024
ebf71d3
transmission version: check with SHA & allow git push to trigger buil…
ilike2burnthing Jun 22, 2024
45c287a
Bump actions/setup-python from 4 to 5 (#2760)
dependabot[bot] Jun 22, 2024
8af4e9c
Update mkdocs.yml (#2857)
ilike2burnthing Jun 26, 2024
fd609f2
Bump docker/build-push-action from 5 to 6 (#2858)
dependabot[bot] Jun 26, 2024
a2615e3
Update Dockerfile with autoheal="true"
benyjr Dec 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ body:
- type: checkboxes
attributes:
label: Is this related to a provider?
description: Please check the <a href="https://github.com/haugene/vpn-configs-contrib/issues/">provider issues repo</a> for this. If this issue is related to a provider, please post it there.
description: Please check the <a href="https://github.com/haugene/vpn-configs-contrib/issues/">provider issues repo</a> for this. If this issue is related to a provider, please post it there. If your error is after this log output it has to do with provider script 'Transmission startup script complete. Initialization Sequence Completed'
options:
- label: I have checked the provider repo for issues
required: true
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/check-transmission-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
ref: dev

- name: Check for new version of Transmission
run: |
LATEST_VERSION=$(curl -L https://api.github.com/repos/transmission/transmission/releases/latest | grep tag_name | awk '{print $2}' | sed -e 's/"//g' -e 's/,//')
CURRENT_VERSION=$(cat upstream/transmission-version.txt)
if [ "$LATEST_VERSION" != "$CURRENT_VERSION" ]; then
LATEST_SHA=$(curl -L https://api.github.com/repos/transmission/transmission/tags | tac | tac | awk '/sha/ {print $2; exit}' | sed -e 's/[",]//g')
LATEST_VERSION=$(curl -L https://api.github.com/repos/transmission/transmission/releases/latest | awk '/tag_name/ {print $2}' | sed -e 's/[",]//g')
CURRENT_SHA=$(cat upstream/transmission-sha.txt)
if [ "$LATEST_SHA" != "$CURRENT_SHA" -a -n "$LATEST_SHA" -a -n "$LATEST_VERSION" ]; then
echo "$LATEST_SHA" > upstream/transmission-sha.txt
echo "$LATEST_VERSION" > upstream/transmission-version.txt
git config --global user.email "[email protected]"
git config --global user.name "workflow runner"
git add upstream/transmission-sha.txt
git add upstream/transmission-version.txt
git config user.email "[email protected]"
git config user.name "Transmission-Bot"
git commit -m "update transmission build version to ${LATEST_VERSION}"
git push origin dev
fi
18 changes: 7 additions & 11 deletions .github/workflows/docker-image-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,29 @@ jobs:
context: ./proxy
- image-name: haugene/transmission-rss
context: ./plugins/rss
platform:
- linux/amd64
- linux/arm
- linux/arm64
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

# QEMU emulator to build for other platforms
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

# Buildx automates creating the multi-arch manifest build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

# Authenticate so that we can push to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Generate image tags and labels
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
${{ matrix.image-name }}
Expand All @@ -63,10 +59,10 @@ jobs:

# Finally, build and push the images
- name: Build image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
platforms: ${{ matrix.platform }}
platforms: linux/amd64,linux/arm,linux/arm64
build-args: |
REVISION=${{ github.sha }}
push: ${{ github.event_name != 'pull_request' }}
Expand Down
21 changes: 7 additions & 14 deletions .github/workflows/docker-transmission-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,9 @@ on:
jobs:
build-transmission:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm
- linux/arm64
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

# Get latest version of Transmission
- name: Get Transmission version
Expand All @@ -30,33 +23,33 @@ jobs:

# QEMU emulator to build for other platforms
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

# Buildx automates creating the multi-arch manifest build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

# Authenticate so that we can push to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Generate image tag and labels
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: haugene/transmission-builder
tags: type=match,pattern=(\d+.\d+.\d+),group=1,value=${{ env.TBT_VERSION }}

# Finally, build and push the image
- name: Build image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: upstream
platforms: ${{ matrix.platform }}
platforms: linux/amd64,linux/arm,linux/arm64
build-args: |
REVISION=${{ github.sha }}
TBT_VERSION=${{ env.TBT_VERSION }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ on:
push:
branches:
- master
paths:
- docs/*

jobs:
build-and-deploy-gh-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.7

Expand Down
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ RUN set -ex; \
libminiupnpc-dev \
libnatpmp-dev \
libpsl-dev \
libssl-dev
libssl-dev \
natpmpc

FROM haugene/transmission-builder:4.0.4 as TransmissionBuilder
FROM haugene/transmission-builder:4.0.5 as TransmissionBuilder

FROM base

Expand All @@ -51,7 +52,7 @@ VOLUME /config
COPY --from=TransmissionUIs /opt/transmission-ui /opt/transmission-ui
COPY --from=TransmissionBuilder /var/tmp/*.deb /var/tmp/

ARG TBT_VERSION=4.0.4
ARG TBT_VERSION=4.0.5
ARG DEBIAN_FRONTEND=noninteractive

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
Expand Down Expand Up @@ -126,7 +127,7 @@ ARG REVISION
ENV REVISION=${REVISION:-""}

# Compatability with https://hub.docker.com/r/willfarrell/autoheal/
LABEL autoheal=true
LABEL autoheal="true"

# Expose ports and run

Expand Down
49 changes: 48 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# OpenVPN and Transmission with WebUI

[![Docker Build](https://img.shields.io/github/actions/workflow/status/haugene/docker-transmission-openvpn/docker-image-builds.yml
)](https://hub.docker.com/r/haugene/transmission-openvpn/)
[![Docker Pulls](https://img.shields.io/docker/pulls/haugene/transmission-openvpn.svg)](https://hub.docker.com/r/haugene/transmission-openvpn/)

This container contains OpenVPN and Transmission with a configuration
Expand Down Expand Up @@ -43,7 +45,26 @@ $ docker run --cap-add=NET_ADMIN -d \
haugene/transmission-openvpn
```

### Docker Compose
### Podman run

Beware: container is run as privileged, meaning it has full access to host OS.

```
$ podman run --privileged -d \
-v /your/storage/path/:/data \
-v /your/config/path/:/config \
-e OPENVPN_PROVIDER=PIA \
-e OPENVPN_CONFIG=france \
-e OPENVPN_USERNAME=user \
-e OPENVPN_PASSWORD=pass \
-e LOCAL_NETWORK=192.168.0.0/16 \
--log-driver k8s-file \
--log-opt max-size=10m \
-p 9091:9091 \
haugene/transmission-openvpn
```

### Docker version 3.x Compose
```
version: '3.3'
services:
Expand All @@ -68,6 +89,32 @@ services:
image: haugene/transmission-openvpn
```

### Docker version 2.x Compose
```
version: "2.0"
services:
transmission-openvpn:
container_name: transmission
cap_add:
- NET_ADMIN
volumes:
- '/your/storage/path/:/data'
- '/your/config/path/:/config'
environment:
- OPENVPN_PROVIDER=PIA
- OPENVPN_CONFIG=france
- OPENVPN_USERNAME=user
- OPENVPN_PASSWORD=pass
- LOCAL_NETWORK=192.168.0.0/16
logging:
driver: "json-file"
options:
max-size: 10m
ports:
- 9091:9091
image: haugene/transmission-openvpn
```

## Known issues

If you've been running a stable setup that has recently started to fail, please check your logs.
Expand Down
71 changes: 71 additions & 0 deletions docs/provider-specific.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,74 @@ services:
max-size: 10m
image: haugene/transmission-openvpn:latest
```

### PROTONVPN

[PROTONVPN](https://protonvpn.com/support/linux-openvpn/#preparation) provides `.ovpn` configuration files. Just download the one you want to connect with and which allows P2P.

### Prerequisites:
User needs to have a paid account.

1. download your ProtonVPN ovpn file from a destination which allows P2P.
2. in the directory with your docker-compose file, create a directory: `mkdir protonvpn`
3. copy your ovpn file (node-<country of choice>.protonvpn.udp.ovpn) from step 1 to the protonvpn directory
4. add the environment vars below and add +pmp to your username if you want to use port forwarding.
5. add the [update-port.sh](https://github.com/haugene/vpn-configs-contrib/blob/main/openvpn/protonvpn/update-port.sh) script for ProtonVPN from vpn-configs-contrib to the protonvpn directory of step 2.

Here is a full example of `docker-compose.yml` file, assuming configuration file named `node-<country of choice>.protonvpn.udp`
is under local `protonvpn` subdirectory.

```yaml
version: 3.7.1
services:
transmission-openvpn:
container_name: TransmissionVPN
restart: on-failure:2
cap_add:
- NET_ADMIN
volumes:
- ./protonvpn/:/etc/openvpn/custom/
- /your/config/path/:/config # where transmission-home is stored
- /your/storage/path/:/data # where transmission will store the data
environment:
- OPENVPN_PROVIDER=custom
- OPENVPN_CONFIG=node-<country of choice>.protonvpn.udp
- OPENVPN_USERNAME=<username>+pmp
- OPENVPN_PASSWORD=<password>
- LOCAL_NETWORK=192.168.0.0/16
logging:
driver: json-file
options:
max-size: 10m
ports:
- 9091:9091
image: haugene/transmission-openvpn

```


After starting your container, the `peer listening port` in Transmission should be open after a minute or so.

If not you can jump in the container and run the script manually and see which error you get, or set the debug env variable: `- DEBUG=true` and look in the logging of your container for the output of the script `update-port.sh`


To check which IP address your VPN is currently connected to, run this script:
```bash
#!/bin/bash

f_container_name()
{
docker ps --format "{{.Names}}"| grep -i transmission
}

f_find_all()
{
curl --silent ipinfo.io/$ext_ip
}

var_cont_name=$(f_container_name)
ext_ip=$(docker exec $var_cont_name curl --silent "http://ipinfo.io/ip")
echo "Transmission VPN currently connected to IP address: $ext_ip"
echo "This IP address is in the following country: "
f_find_all
```
2 changes: 1 addition & 1 deletion docs/tips-tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ $ sudo systemctl start transmission-openvpn.service
A working example of running this container behind a traefik reverse proxy can be found here:
[Config](https://github.com/haugene/docker-transmission-openvpn/issues/1763#issuecomment-844404143)

#### Running this container with Podman
# Running this container with Podman

The `podman run` command is almost identical to [the one mentioned in README.md](../README.md#docker-run) but with the following exception:

Expand Down
2 changes: 1 addition & 1 deletion openvpn/fetch-external-configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ elif [[ "${VPN_CONFIG_SOURCE_TYPE}" == "github_clone" ]]; then
git -C "${config_repo}" checkout "${GITHUB_CONFIG_SOURCE_REVISION}"
else
echo "Cloning ${GITHUB_CONFIG_REPO_URL} into ${config_repo}"
config_repo_old="${config_repo}" + "_old"
config_repo_old="${config_repo}_old"
mv "${config_repo}" "${config_repo_old}"
git clone -b "${GITHUB_CONFIG_SOURCE_REVISION}" "${GITHUB_CONFIG_REPO_URL}" "${config_repo}"
fi
Expand Down
4 changes: 2 additions & 2 deletions openvpn/nordvpn/configure-openvpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# NORDVPN_COUNTRY: code or name
# curl -s "https://api.nordvpn.com/v1/servers/countries" | jq --raw-output '.[] | [.code, .name] | @tsv'
# NORDVPN_PROTOCOL: tcp or upd, tcp if none or unknown. Many technologies are not used as only openvpn_udp and openvpn_tcp are tested.
# NORDVPN_PROTOCOL: tcp or udp, tcp if none or unknown. Many technologies are not used as only openvpn_udp and openvpn_tcp are tested.
# Will request api with openvpn_<NORDVPN_PROTOCOL>.
# curl -s "https://api.nordvpn.com/v1/technologies" | jq --raw-output '.[] | [.identifier, .name ] | @tsv' | grep openvpn
# NORDVPN_CATEGORY: default p2p. not all countries have all combination of NORDVPN_PROTOCOL(technologies) and NORDVPN_CATEGORY(groups),
Expand Down Expand Up @@ -390,4 +390,4 @@ fi

export OPENVPN_CONFIG=${selected}

cd "${0%/*}"
cd "${0%/*}"
3 changes: 1 addition & 2 deletions privoxy/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ set_port()
# Set the port for the IPv4 interface
adr=$(ip -4 a show eth0| grep -oP "(?<=inet )([^/]+)")
adr=${adr:-"0.0.0.0"}
sed -i -E "s/^listen-address\s+.*/listen-address ${adr}:$1/" "$2"

sed -i -E "s/^listen-address.*/listen-address ${adr}:$1/" "$2"
}

if [[ "${WEBPROXY_ENABLED}" = "true" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if [[ ${WEBPROXY_ENABLED} =~ [yY][eE]?[Ss]?|[tT][Rr][Uu][eE] ]]; then
if [[ ${PROXY} -eq 0 ]]; then
echo "Privoxy warning: process was stopped, restarting."
fi
proxy_ip=$(grep -oP "(?<=^listen-address )[0-9\.]+" /etc/privoxy/config)
proxy_ip=$(grep -i "^listen-address" /etc/privoxy/config | awk -F ' ' '{print $2}' | awk -F ':' '{print $1}')
cont_ip=$(ip -j a show dev eth0 | jq -r .[].addr_info[].local)
if [[ ${proxy_ip} != ${cont_ip} ]]; then
echo "Privoxy error: container ip (${cont_ip} has changed: privoxy listening to ${proxy_ip}, restarting privoxy."
Expand Down
Loading