jlesage / docker-jdownloader-2

Docker container for JDownloader 2
MIT License
816 stars 71 forks source link

[Feature Request] Add VPN options. #17

Open FoulSpud opened 6 years ago

FoulSpud commented 6 years ago

Can you add the ability to integrate vpn services into the docker? Similar to how binhex does it on the deluge and sabnzbd apps so that paid VPN services can be used to encrypt traffic?

jlesage commented 6 years ago

The issue I have with integrating a VPN service directly in the container is that it's a work that need to be repeated for every container. An other solution is to use a separate container that act as the VPN client. Then it would be possible for other containers (like JDownloader) to connect through it. For example, some like https://github.com/dperson/openvpn-client could work.

zensbert commented 4 years ago

Most vpn providers also provide socks5-proxys which you can enter directly under connection settings. Disable "no proxy" and jdownloader either connects via provided proxies or it stays offline.

Protektor-Desura commented 3 years ago

It is better to use a VPN docker then route whatever containers you want, to go out the VPN through that container. It means the VPN can be updated easily and the other containers can be updated easily without having to rely on scheduling updates to one or the other. So in reality you end up with more up to date containers by doing it separately. It also means that if the VPN dies for whatever reason so does the outgoing connections for the containers so you don't have to write a script to kill processes when the VPN dies. You can use whatever VPN setup you want and not one the docker author chose. So if you want OpenVPN no problem, prefer Wireguard, no problem.

AlexeiScherbakov commented 2 years ago

You should use docker-compose with vpn service. Just take this example for nordvpn:

version: "3.9"  # optional since v1.27.0
services:
  vpn:
    image: ghcr.io/bubuntux/nordvpn
    cap_add:
      - NET_ADMIN               # Required
      - NET_RAW
    environment:                # Review https://github.com/bubuntux/nordvpn#environment-variables
      - USER=     # Required
      - "PASS="         # Required
      - TECHNOLOGY=OpenVPN
      - NETWORK=192.168.0.0/16  # So it can be accessed within the local network
    ports:
      - "5800:5800"
      - "5900:5900"
    sysctls:
      - net.ipv6.conf.all.disable_ipv6=1  # Recomended if using ipv4 only
      - net.ipv4.conf.all.src_valid_mark=1
  jd2gui:
    image: jlesage/jdownloader-2
    environment:
      - VNC_PASSWORD=pass
    volumes:
      - "/run/desktop/mnt/host/d/jd2/config:/config:rw"
      - "/run/desktop/mnt/host/d/jd2/Downloads:/output:rw"
    network_mode: service:vpn
    depends_on:
      - vpn