Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Is there a way to create a VPN connection that can be used by a docker of my choice?

Featured Replies

When creating a new docker, there is an option available for the Network type to use.

I have seen several containers that include the option for a VPN, but what I want is to have a container use a VPN that can be chosen from the "Network type" dropdown. I hope that makes sense.

 

For example, I want to run a docker called "MeTube" by alexta69. This docker creates a web page where I can enter a YouTube video URL and it will download the video to a disk I designate. What I want is for that specific video to be downloaded using a VPN connection and not my regular ISP. I want this to be done only for that specific docker though, not all of the containers I have running.

 

I am using Mullvad, if that makes any difference. I've seen this guide and I followed it until step 4, but then I don't know how to proceed. Then I found this guide that's a bit older, but it refers to a container that supports VPNs whereas mine doesn't (or I can't find how it can).

 

Is this technically possible at all? If it is, any help would be greatly appreciated please.

 

Solved by JonathanM

I think this is what you want to do, right?  Spaceinvader One did a video on it a little while back.

 

 

  • Author

Yes, that is what I want to do.

If you are doing the same, do you know of any container that doesn't offer torrents functionality but only the vpn part?

Or do I have to use a torrenting container?

do you know of any container that doesn't offer torrents functionality but only the vpn part?


Binhex has a Privoxy container that does exactly this.


Sent from my iPhone using Tapatalk
  • Author

Ah, thank you @Jorgen, exactly what I was looking for!

  • Author

Ok, I've read through quite a few posts to understand how Privoxy works but I am stuck.

I think the best way is to post my docker "run" commands so someone who is experienced can assist please.

 

Run command for alexta69/metube

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker create --name='MeTube' -e TZ="UTC" -e HOST_OS="Unraid" -e 'OUTPUT_TEMPLATE'='%(title)s.%(ext)s' -v '/mnt/disks/TRANSIT/':'/downloads':'rw,slave' --user 99:100 --net=container:binhex-privoxyvpn 'alexta69/metube'

 

Run command for binhex-privoxyvpn

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='binhex-privoxyvpn' --net='bridge' --privileged=true -e TZ="UTC" -e HOST_OS="Unraid" -e 'VPN_ENABLED'='yes' -e 'VPN_USER'='vpn_username' -e 'VPN_PASS'='vpn_password' -e 'VPN_PROV'='custom' -e 'VPN_CLIENT'='wireguard' -e 'VPN_OPTIONS'='' -e 'LAN_NETWORK'='192.168.1.0/24' -e 'NAME_SERVERS'='84.200.69.80,37.235.1.174,1.1.1.1,37.235.1.177,84.200.70.40,1.0.0.1' -e 'SOCKS_USER'='admin' -e 'SOCKS_PASS'='socks' -e 'ENABLE_SOCKS'='no' -e 'ENABLE_PRIVOXY'='yes' -e 'VPN_INPUT_PORTS'='' -e 'VPN_OUTPUT_PORTS'='' -e 'DEBUG'='false' -e 'UMASK'='000' -e 'PUID'='99' -e 'PGID'='100' -p '8118:8118/tcp' -p '9118:9118/tcp' -p '8081:8081/tcp' -v '/mnt/user/appdata/binhex-privoxyvpn':'/config':'rw' --sysctl="net.ipv4.conf.all.src_valid_mark=1" 'binhex/arch-privoxyvpn'

 

Now, when I run the command

curl ipconfig.io

in the privoxyvpn Console, I am getting the correct IP address (that of Mullvad, not my ISP's).

 

But when I try to run the same command in the metube container, I get the error:

 

sh: curl: not found

 

I found this thread where @starwak3 seems to have the same problem and the first advice from @JonathanM is to "add the port mapping that would normally be on the youtube-dl container to the vpn container", which I think in my case translates to "add the port mapping that would normally be on the metube container to the vpn container". Unfortunately I have minimal experience with docker and I can't understand what this means and what I need to do.

 

Also, I am a bit concerned about the "Extra Parameters" option in the privoxyvpn container. According to SpaceInvader One's video, I need to add the line:

 

--net=container:binhex-privoxyvpn

 

but the container itself had the following already added by default:

 

--user 99:100

 

As you can see in the docker "run" command for the privoxyvpn container I added above, I added both lines one after the other, like this:

 

--user 99:100 --net=container:binhex-privoxyvpn

 

but I am not sure if that is correct and I couldn't find what the correct syntax is if there is more than one parameter to be added

 

 

 

Any help would be greatly appreciated.

Edited by morethanenough
Added MeTube's port to privoxyvpn

In the config for the privoxy container, add a port to access the downloaders webui, I think it's 8081 by default. So add another path, port.... select port, name it whatever, and enter 8081 for host and container.

Then edit the existing entry for vpn input ports and add 8081

  • Author

Thank you @JonathanM. Yes, it is port 8081.


Did as you said. Here's the run command for binhex-privoxyvpn updated:

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker create --name='binhex-privoxyvpn' --net='bridge' --privileged=true -e TZ="UTC" -e HOST_OS="Unraid" -e 'VPN_ENABLED'='yes' -e 'VPN_USER'='vpn_username' -e 'VPN_PASS'='vpn_password' -e 'VPN_PROV'='custom' -e 'VPN_CLIENT'='wireguard' -e 'VPN_OPTIONS'='' -e 'LAN_NETWORK'='192.168.0.0/24' -e 'NAME_SERVERS'='84.200.69.80,37.235.1.174,1.1.1.1,37.235.1.177,84.200.70.40,1.0.0.1' -e 'SOCKS_USER'='admin' -e 'SOCKS_PASS'='socks' -e 'ENABLE_SOCKS'='no' -e 'ENABLE_PRIVOXY'='yes' -e 'VPN_INPUT_PORTS'='8081' -e 'VPN_OUTPUT_PORTS'='' -e 'DEBUG'='false' -e 'UMASK'='000' -e 'PUID'='99' -e 'PGID'='100' -p '8118:8118/tcp' -p '9118:9118/tcp' -p '8081:8081/tcp' -v '/mnt/user/appdata/binhex-privoxyvpn':'/config':'rw' --sysctl="net.ipv4.conf.all.src_valid_mark=1" 'binhex/arch-privoxyvpn'

 

Same issue. After restarting both containers, I tried the curl command on MeTube's console, but got the same result:

 

/app $ curl ipconfig.io
sh: curl: not found
/app $

 

Also, trying to access the WebUI at:

  • 192.168.1.6:8081
  • 192.168.1.6/metube
  • 192.168.1.6:8081/metube

 

None works. When I tried 192.168.1.6/metube it took me to the UNRAID login page (so I think this wouldn't work anyway)

 

 Any ideas?

Edited by morethanenough

  • Solution
16 minutes ago, morethanenough said:

LAN_NETWORK'='192.168.0.0/24

 

16 minutes ago, morethanenough said:

192.168.1.6:8081

You need to correct the LAN Network.

  • Author

Of course I do, that was so silly of me @JonathanM!

Everything works now, except for the "curl ipconfig.io" command.

Since this isn't working, is there a way for me to check if the download is indeed using the vpn or not?

Just now, morethanenough said:

Of course I do, that was so silly of me @JonathanM!

Everything works now, except for the "curl ipconfig.io" command.

Since this isn't working, is there a way for me to check if the download is indeed using the vpn or not?

curl isn't installed in the metube container, but you can use traceroute 1.1.1.1 and see the routers the container uses along the way.

  • Author

Thank you for all your help, it works perfectly!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.