morethanenough Posted February 9, 2022 Share Posted February 9, 2022 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. Quote Link to comment
Spyderturbo007 Posted February 9, 2022 Share Posted February 9, 2022 I think this is what you want to do, right? Spaceinvader One did a video on it a little while back. Quote Link to comment
morethanenough Posted February 9, 2022 Author Share Posted February 9, 2022 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? Quote Link to comment
Jorgen Posted February 9, 2022 Share Posted February 9, 2022 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 1 Quote Link to comment
morethanenough Posted February 10, 2022 Author Share Posted February 10, 2022 Ah, thank you @Jorgen, exactly what I was looking for! 1 Quote Link to comment
morethanenough Posted February 10, 2022 Author Share Posted February 10, 2022 (edited) 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 February 10, 2022 by morethanenough Added MeTube's port to privoxyvpn Quote Link to comment
JonathanM Posted February 10, 2022 Share Posted February 10, 2022 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 1 Quote Link to comment
morethanenough Posted February 10, 2022 Author Share Posted February 10, 2022 (edited) 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 February 10, 2022 by morethanenough Quote Link to comment
Solution JonathanM Posted February 10, 2022 Solution Share Posted February 10, 2022 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. 1 Quote Link to comment
morethanenough Posted February 10, 2022 Author Share Posted February 10, 2022 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? Quote Link to comment
JonathanM Posted February 10, 2022 Share Posted February 10, 2022 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. 1 Quote Link to comment
morethanenough Posted February 10, 2022 Author Share Posted February 10, 2022 Thank you for all your help, it works perfectly! Quote Link to comment
Recommended Posts
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.