Skip to content

Commit d3d17fc

Browse files
committed
See the CHANGELOG.md for details.
1 parent 51fa5f2 commit d3d17fc

24 files changed

+33
-617
lines changed

.github/workflows/publish.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,29 @@ on:
66
- 'v[0-9]+.[0-9]+.[0-9]+'
77

88
env:
9-
IMAGE_NAME: openvpn-client
9+
IMAGE_NAME: # set explictly in build-variables
1010

1111
jobs:
1212
publish:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4.1.7
1717

1818
- run: cat build-variables >> $GITHUB_ENV
1919

20-
- uses: docker/setup-qemu-action@v2
20+
- uses: docker/setup-qemu-action@v3.2.0
2121

22-
- uses: docker/setup-buildx-action@v2
22+
- uses: docker/setup-buildx-action@v3.6.1
2323

24-
- uses: docker/login-action@v2
24+
- uses: docker/login-action@v3.3.0
2525
with:
2626
registry: ghcr.io
2727
username: ${{ github.repository_owner }}
2828
password: ${{ secrets.GITHUB_TOKEN }}
2929

3030
- id: tags
31-
uses: docker/metadata-action@v4
31+
uses: docker/metadata-action@v5.5.1
3232
with:
3333
images: ${{ env.IMAGE_NAME }}
3434
tags: |
@@ -41,10 +41,10 @@ jobs:
4141
ref=${{ github.ref }}
4242
vpatch=${ref##refs/*/}
4343
patch=${vpatch#v}
44-
echo "::set-output name=date::$(date --utc --iso-8601=seconds)"
45-
echo "::set-output name=version::$patch"
44+
echo "date=$(date --utc --iso-8601=seconds)" >> $GITHUB_OUTPUT
45+
echo "version=$patch" >> $GITHUB_OUTPUT
4646
47-
- uses: docker/build-push-action@v3
47+
- uses: docker/build-push-action@v6.7.0
4848
with:
4949
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
5050
tags: ${{ steps.tags.outputs.tags }}

.pre-commit-config.yaml

-9
This file was deleted.

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## Version 4.0.0 - 2024-09-19
4+
- Removed Helm chart
5+
- Removed Socks-proxy and HTTP-proxy
6+
- Cleaned up files and rebased on latest upstream Alpine
7+
38
## Version 3.1.0 - 2022-06-30
49
### Changed
510
- `KILL_SWITCH` now requires `iptables` or `nftables` to be enabled. It defaults to `iptables`. See documentation for more information.

Dockerfile

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
FROM alpine:3.16
1+
FROM alpine:3.20.3
22

33
RUN apk add --no-cache \
44
bash \
55
bind-tools \
6-
dante-server \
76
iptables \
87
openvpn \
98
nftables \
10-
shadow \
11-
tinyproxy
9+
shadow
1210

1311
COPY data/ /data/
1412

LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
MIT License
22

3+
Copyright (c) 2024 Roseman Labs
34
Copyright (c) 2021 Wyatt Gill
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy

README.md

+9-33
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# OpenVPN Client for Docker
22
## What is this and what does it do?
3-
[`ghcr.io/wfg/openvpn-client`](https://github.com/users/wfg/packages/container/package/openvpn-client) is a containerized OpenVPN client.
3+
This is a containerized OpenVPN client.
44
It has a kill switch built with `nftables` that kills Internet connectivity to the container if the VPN tunnel goes down for any reason.
5-
It also includes an HTTP proxy server ([Tinyproxy](https://tinyproxy.github.io/)) and a SOCKS proxy server ([Dante](https://www.inet.no/dante/index.html)).
65
This allows hosts and non-containerized applications to use the VPN without having to run VPN clients on those hosts.
76

87
This image requires you to supply the necessary OpenVPN configuration file(s).
98
Because of this, any VPN provider should work.
109

11-
If you find something that doesn't work or have an idea for a new feature, issues and **pull requests are welcome**.
10+
*Contributions will not automatically be accepted for this fork. This fork is based on v3.1.0 of upstream.*
1211

1312
## Why?
1413
Having a containerized VPN client lets you use container networking to easily choose which applications you want using the VPN instead of having to set up split tunnelling.
@@ -20,18 +19,18 @@ You can either pull it from GitHub Container Registry or build it yourself.
2019

2120
To pull it from GitHub Container Registry, run
2221
```bash
23-
docker pull ghcr.io/wfg/openvpn-client
22+
docker pull ghcr.io/RosemanLabs/openvpn-client
2423
```
2524

2625
To build it yourself, run
2726
```bash
28-
docker build -t ghcr.io/wfg/openvpn-client https://github.com/wfg/docker-openvpn-client.git
27+
docker build -t ghcr.io/RosemanLabs/openvpn-client https://github.com/RosemanLabs/docker-openvpn-client.git
2928
```
3029

3130
### Creating and running a container
3231
The image requires the container be created with the `NET_ADMIN` capability and `/dev/net/tun` accessible.
3332
Below are bare-bones examples for `docker run` and Compose; however, you'll probably want to do more than just run the VPN client.
34-
See the sections below to learn how to use the [proxies](#http_proxy-and-socks_proxy) and have [other containers use `openvpn-client`'s network stack](#using-with-other-containers).
33+
See the sections below to learn how to have [other containers use `openvpn-client`'s network stack](#using-with-other-containers).
3534

3635
#### `docker run`
3736
```bash
@@ -40,14 +39,14 @@ docker run --detach \
4039
--cap-add=NET_ADMIN \
4140
--device=/dev/net/tun \
4241
--volume <path/to/config/dir>:/data/vpn \
43-
ghcr.io/wfg/openvpn-client
42+
ghcr.io/RosemanLabs/openvpn-client
4443
```
4544

4645
#### `docker-compose`
4746
```yaml
4847
services:
4948
openvpn-client:
50-
image: ghcr.io/wfg/openvpn-client
49+
image: ghcr.io/RosemanLabs/openvpn-client
5150
container_name: openvpn-client
5251
cap_add:
5352
- NET_ADMIN
@@ -68,31 +67,8 @@ services:
6867
| `VPN_LOG_LEVEL` | `3` | OpenVPN logging verbosity (`1`-`11`) |
6968
| `SUBNETS` | | A list of one or more comma-separated subnets (e.g. `192.168.0.0/24,192.168.1.0/24`) to allow outside of the VPN tunnel. |
7069
| `KILL_SWITCH` | `iptables` | Which packet filterer to use for the kill switch. This value likely depends on your underlying host. Recommended to leave default unless you have problems. Acceptable values are `iptables` and `nftables`. To disable the kill switch, set to any other value. |
71-
| `HTTP_PROXY` | | Whether or not to enable the built-in HTTP proxy server. To enable, set to any "truthy" value (see below the table). Any other value (including unset) will cause the proxy server to not run. It listens on port 8080. |
72-
| `HTTP_PROXY_USERNAME` | | Credentials for accessing the HTTP proxy. If `HTTP_PROXY_USERNAME` is specified, you should also specify `HTTP_PROXY_PASSWORD`. |
73-
| `HTTP_PROXY_PASSWORD` | | Credentials for accessing the HTTP proxy. If `HTTP_PROXY_PASSWORD` is specified, you should also specify `HTTP_PROXY_USERNAME`. |
74-
| `HTTP_PROXY_USERNAME_SECRET` | | Docker secrets that contain the credentials for accessing the HTTP proxy. If `HTTP_PROXY_USERNAME_SECRET` is specified, you should also specify `HTTP_PROXY_PASSWORD_SECRET`. |
75-
| `HTTP_PROXY_PASSWORD_SECRET` | | Docker secrets that contain the credentials for accessing the HTTP proxy. If `HTTP_PROXY_PASSWORD_SECRET` is specified, you should also specify `HTTP_PROXY_USERNAME_SECRET`. |
76-
| `SOCKS_PROXY` | | Whether or not to enable the built-in SOCKS proxy server. To enable, set to any "truthy" value (see below the table). Any other value (including unset) will cause the proxy server to not run. It listens on port 1080. |
77-
| `SOCKS_LISTEN_ON` | | Address the proxies will be listening on. Set to `0.0.0.0` to listen on all IP addresses. |
78-
| `SOCKS_PROXY_USERNAME` | | Credentials for accessing the proxies. If `SOCKS_PROXY_USERNAME` is specified, you should also specify `SOCKS_PROXY_PASSWORD`. |
79-
| `SOCKS_PROXY_PASSWORD` | | Credentials for accessing the proxies. If `SOCKS_PROXY_PASSWORD` is specified, you should also specify `SOCKS_PROXY_USERNAME`. |
80-
| `SOCKS_PROXY_USERNAME_SECRET` | | Docker secrets that contain the credentials for accessing the proxies. If `SOCKS_PROXY_USERNAME_SECRET` is specified, you should also specify `SOCKS_PROXY_PASSWORD_SECRET`. |
81-
| `SOCKS_PROXY_PASSWORD_SECRET` | | Docker secrets that contain the credentials for accessing the proxies. If `SOCKS_PROXY_PASSWORD_SECRET` is specified, you should also specify `SOCKS_PROXY_USERNAME_SECRET`. |
82-
"Truthy" values are the following: `true`, `t`, `yes`, `y`, `1`, `on`, `enable`, or `enabled`.
83-
84-
##### Environment variable considerations
85-
###### `HTTP_PROXY` and `SOCKS_PROXY`
86-
If enabling the the proxy server(s), you'll want to publish the appropriate port(s) in order to access the server(s).
87-
To do that using `docker run`, add `-p <host_port>:8080` and/or `-p <host_port>:1080` where `<host_port>` is whatever port you want to use on the host.
88-
If you're using `docker-compose`, add the relevant port specification(s) from the snippet below to the `openvpn-client` service definition in your Compose file.
89-
```yaml
90-
ports:
91-
- <host_port>:8080
92-
- <host_port>:1080
93-
```
9470

95-
##### `*_PROXY_USERNAME_SECRET`, `*_PROXY_PASSWORD_SECRET`, and `VPN_AUTH_SECRET`
71+
##### `VPN_AUTH_SECRET`
9672
Compose has support for [Docker secrets](https://docs.docker.com/engine/swarm/secrets/#use-secrets-in-compose).
9773
See the [Compose file](docker-compose.yml) in this repository for example usage of passing proxy credentials as Docker secrets.
9874

@@ -118,7 +94,7 @@ ports:
11894
In both cases, replace `<host_port>` and `<container_port>` with the port used by your connected container.
11995

12096
### Verifying functionality
121-
Once you have container running `ghcr.io/wfg/openvpn-client`, run the following command to spin up a temporary container using `openvpn-client` for networking.
97+
Once you have container running `ghcr.io/RosemanLabs/openvpn-client`, run the following command to spin up a temporary container using `openvpn-client` for networking.
12298
The `wget -qO - ifconfig.me` bit will return the public IP of the container (and anything else using `openvpn-client` for networking).
12399
You should see an IP address owned by your VPN provider.
124100
```bash

build-variables

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
IMAGE_NAME=ghcr.io/wfg/openvpn-client
1+
IMAGE_NAME=ghcr.io/RosemanLabs/openvpn-client

build.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
'docker', 'build',
1414
'--build-arg', f'BUILD_DATE={str(datetime.datetime.now())}',
1515
'--build-arg', f'IMAGE_VERSION={args.image_version}',
16-
'--tag', f'ghcr.io/wfg/openvpn-client:{args.image_version}',
17-
'--tag', 'ghcr.io/wfg/openvpn-client:latest',
16+
'--tag', f'ghcr.io/RosemanLabs/openvpn-client:{args.image_version}',
17+
'--tag', 'ghcr.io/RosemanLabs/openvpn-client:latest',
1818
'.',
1919
]
2020
subprocess.run(docker_build_cmd)

chart/.helmignore

-23
This file was deleted.

chart/Chart.yaml

-15
This file was deleted.

chart/README.md

-42
This file was deleted.

chart/templates/_helpers.tpl

-76
This file was deleted.

chart/templates/auth-secret.yaml

-12
This file was deleted.

chart/templates/config-secret.yaml

-12
This file was deleted.

0 commit comments

Comments
 (0)