Auto-Connect and Auto-Launch
Issue Details
Connecting to the server requires manually launching the interface after restarting the system and entering a command each time the interface is restarted
Proposed solution
Implement features that enable the interface to auto-launch at system startup and automatically connect to the server when the interface starts
Alternative solution
No response
Another vote for this feature 🙏
This feature is highly relevant, and I'm eagerly looking forward to its implementation 🙏
Oohh yesaa, I would be all for it! All attempts to get the application to autostart failed for me. (Linux Mint Debian Edition 6)
Please implement this feature. Thank you very much!
I have found the following workaround, using the example of the server in the Netherlands (NL) (Everything with root rights)
Generate a systemd unit
`cat > /etc/systemd/system/adguardvpn.service << EOF [Unit] Description=AdGuardVPN cli After=network.target
[Service] User=root Type=oneshot RemainAfterExit=yes ExecStart=/usr/local/bin/adguardvpn-cli connect -l NL
[Install] WantedBy=multi-user.target EOF`
check:
ls -l /ect/systemd/system/adguardvpn.service
reload
systemctl daemon-reload
start
systemctl start adguardvpn.service
status
systemctl status adguardvpn.service
enable
systemctl enable adguardvpn.service
Thats it. Now you just have to log in again. (if necessary)
adguardvpn-cli login
have fun :)
could you please explain, why do you need to log in again at the end?
could you please explain, why do you need to log in again at the end?
The note is only optional, as the connection did not work after the systemd unit was created. The reason was that I was suddenly logged out of my Adguard account. If this is not the case, this step is of course not necessary.
Do my instructions work for you?
What I have noticed since this autostart, however, is that the status query
adguardvpn-cli status
gives the answer
"VPN is disconnected", although I am still connected, as numerous web browser tests have shown.
I have found the following workaround, using the example of the server in the Netherlands (NL) (Everything with root rights)
Generate a systemd unit
`cat > /etc/systemd/system/adguardvpn.service << EOF [Unit] Description=AdGuardVPN cli After=network.target
[Service] User=root Type=oneshot RemainAfterExit=yes ExecStart=/usr/local/bin/adguardvpn-cli connect -l NL
[Install] WantedBy=multi-user.target EOF`
check:
ls -l /ect/systemd/system/adguardvpn.servicereload
systemctl daemon-reloadstart
systemctl start adguardvpn.servicestatus
systemctl status adguardvpn.serviceenable
systemctl enable adguardvpn.serviceThats it. Now you just have to log in again. (if necessary)
adguardvpn-cli loginhave fun :)
Hi @Achim242 , and thank you for taking the time to explain your workaround.
Could your solution also be used if AdguardVPN-CLI is installed as a docker container?
Unfortunately, I'm not a programmer, so I don't know how to implement your workaround to my situation.
I have done that with the service few month ago, but now I wait for Wireguard, so we don't need a custom client. Had too much problems (also the thing with "not connected" - think about a killswitch...) with the client and right now I use a different VPN for my Linux nodes. Hopefully they will push the Wireguard implementation forward!