mirror of
https://github.com/haugene/docker-transmission-openvpn.git
synced 2025-08-19 05:21:01 +02:00
Updated readme and compose file with new proxy image
This commit is contained in:
parent
16130bdb37
commit
78690b53c9
42
README.md
42
README.md
@ -81,34 +81,34 @@ This is because the VPN is active, and since docker is running in a different ip
|
|||||||
to your request will be treated as "non-local" traffic and therefore be routed out through the VPN interface.
|
to your request will be treated as "non-local" traffic and therefore be routed out through the VPN interface.
|
||||||
|
|
||||||
### How to fix this
|
### How to fix this
|
||||||
There are several ways to fix this. You can pipe and do fancy iptables or ip route configurations on the host and in
|
There are several ways to fix this. You can pipe and do fancy iptables or ip route configurations on the host and in the container. But I found that the simplest solution is just to proxy my traffic.
|
||||||
the container. But I found that the simplest solution is just to proxy my traffic. Start an nginx container like this:
|
|
||||||
|
#### Use preconfigured image
|
||||||
|
You can use the proxy image haugene/transmission-openvpn-proxy that comes with a config that is configurable through environment variables.
|
||||||
|
|
||||||
|
Start it like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker run -d \
|
$ docker run -d \
|
||||||
-v /path/to/nginx.conf:/etc/nginx/nginx.conf:ro \
|
--link <transmission-container>:transmission \
|
||||||
|
-p 8080:8080 \
|
||||||
|
haugene/transmission-openvpn-proxy
|
||||||
|
```
|
||||||
|
You can change to bind another port on your host by changing it to `-p 9091:8080` etc.
|
||||||
|
|
||||||
|
#### Use a custom proxy config
|
||||||
|
|
||||||
|
If you want to run the proxy with your own configuration you can do that by doing something like this.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker run -d \
|
||||||
|
-v /path/to/your/nginx.conf:/etc/nginx/nginx.conf:ro \
|
||||||
-p 8080:8080 \
|
-p 8080:8080 \
|
||||||
nginx
|
nginx
|
||||||
```
|
```
|
||||||
|
|
||||||
Where /path/to/nginx.conf has this content:
|
#### Finally
|
||||||
|
Based on the examples above, Transmission WebUI should now be avaliable at "your.host.ip.addr:8080/transmission/web/". See the docker-compose.yml file for an example on how to run the two containers using compose.
|
||||||
```
|
|
||||||
events {
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
server {
|
|
||||||
listen 8080;
|
|
||||||
location / {
|
|
||||||
proxy_pass http://host.ip.address.here:9091;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
Your Transmission WebUI should now be avaliable at "your.host.ip.addr:8080/transmission/web/".
|
|
||||||
Change the port in the docker run command if 8080 is not suitable for you. Alternatively if you use container linking, either directly or via docker-compose, you can replace "your.host.ip.addr" with the name or alias of the openvpn container.
|
|
||||||
|
|
||||||
## Known issues, tips and tricks
|
## Known issues, tips and tricks
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
transmission:
|
transmission:
|
||||||
image: haugene/transmission-openvpn
|
image: haugene/transmission-openvpn
|
||||||
privileged: true
|
privileged: true
|
||||||
|
restart: always
|
||||||
dns:
|
dns:
|
||||||
- 8.8.8.8
|
- 8.8.8.8
|
||||||
- 8.8.4.4
|
- 8.8.4.4
|
||||||
@ -11,6 +12,7 @@ transmission:
|
|||||||
OPENVPN_PROVIDER: PIA
|
OPENVPN_PROVIDER: PIA
|
||||||
OPENVPN_USERNAME: username
|
OPENVPN_USERNAME: username
|
||||||
OPENVPN_PASSWORD: password
|
OPENVPN_PASSWORD: password
|
||||||
|
OPENVPN_OPTS: "--inactive 3600 --ping 10 --ping-exit 60"
|
||||||
|
|
||||||
proxy:
|
proxy:
|
||||||
image: haugene/transmission-openvpn-proxy
|
image: haugene/transmission-openvpn-proxy
|
||||||
@ -20,5 +22,3 @@ proxy:
|
|||||||
- 8080:8080
|
- 8080:8080
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
environment:
|
|
||||||
PORT: 8080
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user