0

Good day, I downloaded https://github.com/qdm12/gluetun vpn client, but the problem is that each time you need to create a CLI with handles, and then enter data in it to create a vpn network. Since there is more than one account, this is inconvenient. Is it possible to make a script, for example, in PowerShell/bat, to automatically start docker containers and each of them had unique login details? How can it be solved? Thank you! P.S. This is what the command looks like:

docker run -it --rm --cap-add=NET_ADMIN -e VPNSP=windscribe \
-e VPN_TYPE=openvpn \
-e OPENVPN_USER=user -e OPENVPN_PASSWORD=pas \
-e HTTPPROXY=on \
-p 8119:8888 \
-e REGION=Netherlands qmcgaw/gluetun

1 Answers1

1

If you're on Windows, there's a task scheduler that comes with the OS. You just point it towards a batch file with all the startup commands to launch whatever you need, and trigger it on user login.

There's also this option (I've always gone with task scheduler) https://stackoverflow.com/questions/21218346/run-batch-file-on-start-up#:~:text=To%20run%20a%20batch%20file,drag%20shortcut%20to%20startup%20folder.&text=To%20start%20the%20batch%20file,also%20use%20a%20registry%20key

If you're on apple or Linux, I'm sure there's an open source task scheduler you can use (although you mentioned Powershell so I'm assuming Windows).

  • I don't know and can't find the commands, without them it's not possible. – Нет Позднононет Jan 26 '22 at 05:33
  • If the issue is that you need to run the same script with different login details, I'd do something in Python. Iterate over the username/password combinations, and use os.system("docker run {the command with the specified username/password combination subbed out}") Then add this to the windows scheduler. If this doesn't answer your question, I'd need a lot more details about what you're doing, why you can't access those commands, and how you manually do them every time. – countinglambdastosleep Jan 26 '22 at 20:23