Jump to content

Custom Docker Boot order


rix

Recommended Posts

I have daisy-chained all my downloader-apps behind binhex' awesome delugevpn client.

 

Sonarr and JDownloader have options to use the proxy provided through delugevpn (privoxy).

The others incapable of using privoxy (headphones, sabnzbd, etc.) require a workaround:

--net=container:delugevpn

routes all traffic through delugevpn.

 

I have double checked, using bash from within each container to 

curl ifconfig.co

and using tcpdump (from nerdpack) with wireshark to rule out any leaks.

 

Things are working great, except for one thing:

 

Using --net=container requires the specified container to run, before starting any linked container.

 

This works well using the scheduled docker backup by Andrew Zawadzki, because (randomly) delugevpn is the first container in my queue alphabetically, and is hence backed up and restarted before all other containers.

 

What does not work is the automatic start on unraid boot. I do not know how unraid "launches" docker containers (reverse alphabetical order?/all at once?/in too rapid succession?), but whenever I boot my server, my containers with the --net=container command remain unbooted.

Also rebooting delugevpn naturally kills the linked containers' wan access. They do still run, but need to be restarted manually to regain internet acces.

 

I am asking how to prevent this. Is there any way to delay launching of specific containers/defining a "launch group", so if I manually or automatically start delugevpn, all linked containers are started after a small delay?

Link to comment

CA Docker Autostart was my first thought, however I just installed it and it doesn't seem to be working at the moment. @Squid may be able to provide a bit more info.....

 

EDIT: Removed all the CA plugins and reinstalled and it's working now.  

Edited by CHBMB
  • Upvote 1
Link to comment

I did not try that before, embarassingly. Seems I overlooked it after CA, backup, etc. was split up.

 

After a bit of fiddling, I can confirm, this does not work. The --net containers remain stopped, even with high delays (30s or more)

 

it does work with the following settings (see attached file)! Thank you.

 

You have to wait for the delay to run down, after docker has already launched containers the default way!

 

That only leaves my idea of "launch groups"; but thats more of a feature request, i guess..

screen.PNG

Edited by rix
Link to comment

Yeah, most times it doesn't matter about the timeout value as everything is so fast now.  But instead of timeouts, you can always use the port feature too.  (ie: set the port to be the webUI port -> and it'll wait until the webUI port is open before continuing.  See the docs

  • Upvote 1
Link to comment
Port forwarding from delugevpn.
 
You need to remove the port from the original container first.


I thought of that but it didn't work. Wondering if I should have cleaned out my browser cache though. Chrome can be a temperamental beast.

Sent from my LG-H815 using Tapatalk

Link to comment
3 hours ago, rix said:

Port forwarding from delugevpn.

 

You need to remove the port from the original container first.

 

Hi, I would love to be able to do the same as you. I am trying to get the ZNC container to run through the VPN. I have done the following steps, but I still cannot access the webui:

 

in ZNC template:

Set network type to: None

Add --net=container:delugevpn to the extra parameters

Removed Host Port 1: 6501 from container

 

in deluge template:

Add Host/Container Port: 6501

 

When I try to connect to the ZNC webui however, I get nothing. Have I missed any steps? I did not get to the starting containers in a certain order part. But I started deluge with ZNC stopped, waited a while, and then started ZNC. The ZNC logs show that it is connecting to the net fine, I just cannot get access to the webui. Thanks.

Link to comment

Ensure 2 things:

 

-Set up the correct lan network in delugevpn 

-connect to the correct port (the original container may link to the wrong port after its removal)

 

Edit:

Restart delugevpn after you set everything up. Then restart your linked containers.

Edited by rix
Link to comment
36 minutes ago, rix said:

Ensure 2 things:

 

-Set up the correct lan network in delugevpn 

-connect to the correct port (the original container may link to the port after its removal)

 

Edit:

Restart delugevpn after you set everything up. Then restart your linked containers.

 

Apologies, but would you be able to elaborate more on the first 2 steps. I am still relatively new to all of this. Is the port not the same? For the port, I just moved it from the original ZNC container to the deluge one. both host/containger are set to the same 6501 in deluge and ZNC now has no ports active. Also I am not sure how to set up the correct lan as you state above. Thank you. 

 

Never mind. I found the LAN parameter in the deluge template and it was set wrong. Put it the same as my LAN an it is working great now! Thanks. This is awesome. I have been looking for a way to choose which traffic goes through the VPN and this is very easy, I think that a lot of people would like to be able to know how to do this. 

 

Second question.  I know I can connect Sonarr/Radarr to deluge via the build in proxy support. Since I was not sure how to set this up, I just used the same process as above for now to get it through the VPN.

 

But for curiosity sake, since I am not familiar with privoxy:,

                      what port would I use for that in sonarr 8118?

                      And would I put HTTP or SOCKS as the proxy type?

                      Do I need a user name/pass?

                      Do i put bypass proxy for local address to on?

 

Finally, do you know if delugevpn has a killswitch on by default? If not, how do I enable that?


Thank you.

                      

 

Edited by theGrok
Link to comment

Glad you got it up and running.

 

Use the port and ip of privoxy. Its type is http without auth.

 

I have no time to do a proper writeup but this is by far the easiest way to route specific apps through VPN without advanced firewall or route tables.

 

Thanks @binhex for making this possible!

 

 

 

 

 

Edited by rix
Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...