PROBLEM AUTOMATIC CONNECTION

SoftEther VPN に関するご質問はこのフォーラムにお気軽にご投稿ください。
Post Reply
trade.one.1401
Posts: 9
Joined: Fri Dec 30, 2022 9:55 am

PROBLEM AUTOMATIC CONNECTION

Post by trade.one.1401 » Sun Jan 01, 2023 4:16 am

IN SOFTWARE VPN CLIENT MANAGER This feature should be added so that the user can choose that if it has a number of VPN connections and each one is disconnected, it will automatically connect to the next connection

cedar
Site Admin
Posts: 1897
Joined: Sat Mar 09, 2013 5:37 am

Re: PROBLEM AUTOMATIC CONNECTION

Post by cedar » Wed Jan 04, 2023 9:30 am

What is the function intended to be used for?
It would be possible to modify the source code and add such features, but features that are only beneficial to specific users may not be adopted in the main tree.
For functions that are used only by you, it may be quicker to implement them externally using scripts or the like.

trade.one.1401
Posts: 9
Joined: Fri Dec 30, 2022 9:55 am

Re: PROBLEM AUTOMATIC CONNECTION

Post by trade.one.1401 » Sun Jan 22, 2023 7:33 am

Hello
Thank you for your reply
Yes, this is a feature that can be comprehensive and is needed by many
For example, I have 5 VPN connections, if each of them is disconnected, it will automatically connect the next connection. Do you understand what I mean?
And the new problem that I observed, in the list of some servers, they also have UDP capability, but when we make the connection manually and want to connect by UDP, we cannot, and only TCP.

cedar
Site Admin
Posts: 1897
Joined: Sat Mar 09, 2013 5:37 am

Re: PROBLEM AUTOMATIC CONNECTION

Post by cedar » Sun Jan 22, 2023 8:30 am

I know how it works, but I don't understand why it is needed.
In what situations would you use that feature?

trade.one.1401
Posts: 9
Joined: Fri Dec 30, 2022 9:55 am

Re: PROBLEM AUTOMATIC CONNECTION

Post by trade.one.1401 » Mon Jan 23, 2023 5:48 am

Yes, I want to always be connected to the VPN
Becaue in iran internet is filter

cedar
Site Admin
Posts: 1897
Joined: Sat Mar 09, 2013 5:37 am

Re: PROBLEM AUTOMATIC CONNECTION

Post by cedar » Mon Jan 23, 2023 8:01 am

I think it would be good to write a script that monitors the connection status with vpncmd, and if the connection is lost, gets the next host from the list and connects to it.

trade.one.1401
Posts: 9
Joined: Fri Dec 30, 2022 9:55 am

Re: PROBLEM AUTOMATIC CONNECTION

Post by trade.one.1401 » Sat Jan 28, 2023 5:13 am

Yes, you are right, but this is done by a program or script specialist, I can't do it
can you؟

cedar
Site Admin
Posts: 1897
Joined: Sat Mar 09, 2013 5:37 am

Re: PROBLEM AUTOMATIC CONNECTION

Post by cedar » Sat Jan 28, 2023 7:32 am

By using the vpncmd command line tool, even unskilled people can automate VPN connections.
As a test, I wrote a script that monitors until the connection setting with the specified name becomes unconnected or retrying.
I think you can accomplish what you want by writing it repeatedly for as many connection settings as you want to challenge the connection, and jumping back to the beginning at the end.

set ACCT=vpn

vpncmd /client localhost /cmd:AccountConnect %ACCT%
echo %errorlevel%
:checkloop
sleep 3
vpncmd /client localhost /programming /cmd:AccountStatusGet %ACCT% > tmp.txt
set err=%errorlevel%
if %err% equ 37 goto next
find "Retry" tmp.txt
set err=%errorlevel%
if %err% neq 0 goto checkloop
:next

trade.one.1401
Posts: 9
Joined: Fri Dec 30, 2022 9:55 am

Re: PROBLEM AUTOMATIC CONNECTION

Post by trade.one.1401 » Sat Jan 28, 2023 3:59 pm

Hello
I sent photos of the steps
But I had a problem
Did I do it right?
I want it to automatically select from the list of servers

https://ibb.co/WvbH8xt
https://ibb.co/2jpRqDX

cedar
Site Admin
Posts: 1897
Joined: Sat Mar 09, 2013 5:37 am

Re: PROBLEM AUTOMATIC CONNECTION

Post by cedar » Sun Jan 29, 2023 4:07 am

My script is an example in a windows batch file.
(vpncmd itself does not have the ability to handle conditional branches)

trade.one.1401
Posts: 9
Joined: Fri Dec 30, 2022 9:55 am

Re: PROBLEM AUTOMATIC CONNECTION

Post by trade.one.1401 » Sun Jan 29, 2023 4:15 am

HELLO
THANKS DO NOT ANY SOLVING WAY FOR THIS?

ANOTHER QUESTION :Why is it that when we disconnect from a public server, that server is automatically removed from my list (VPN CLIENT MANAGER)!!!

FOR THIS PROBLEM IS ANY WAY :
https://www.vpnusers.com/viewtopic.php?f=15&t=68077

cedar
Site Admin
Posts: 1897
Joined: Sat Mar 09, 2013 5:37 am

Re: PROBLEM AUTOMATIC CONNECTION

Post by cedar » Sun Jan 29, 2023 4:58 am

Is this a question about VPN Gate?
The VPN Gate function is developed by the author alone, apart from his OSS community of SoftEther VPN, and the details are not disclosed.
I don't think it's possible to automatically manipulate or change the functionality.

trade.one.1401
Posts: 9
Joined: Fri Dec 30, 2022 9:55 am

Re: PROBLEM AUTOMATIC CONNECTION

Post by trade.one.1401 » Sun Jan 29, 2023 5:51 am

HI
FOR SOFTETHER VPNGATE IN THIS PICTURE YOU CAN SEE:
WHEN I DISCONNECT THE CONNECTION DELETE FROM LIST WHY?
https://ibb.co/wz8yPwn

cedar
Site Admin
Posts: 1897
Joined: Sat Mar 09, 2013 5:37 am

Re: PROBLEM AUTOMATIC CONNECTION

Post by cedar » Sun Jan 29, 2023 9:04 am

Did you create the connection settings manually?
Automatically created ones may be automatically deleted.

Post Reply