From 6d83163ac65e7c746097277f1d63a6021a2054d5 Mon Sep 17 00:00:00 2001 From: LINKLIU Date: Wed, 29 Mar 2023 11:35:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...n\347\232\204powershell\350\204\232\346\234\254.md" | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git "a/_posts/config/2023-03-28-windows\344\270\213\350\207\252\345\212\250\350\277\236\346\216\245openvpn\347\232\204powershell\350\204\232\346\234\254.md" "b/_posts/config/2023-03-28-windows\344\270\213\350\207\252\345\212\250\350\277\236\346\216\245openvpn\347\232\204powershell\350\204\232\346\234\254.md" index 718c6fe1010..5f35f9e0ba2 100644 --- "a/_posts/config/2023-03-28-windows\344\270\213\350\207\252\345\212\250\350\277\236\346\216\245openvpn\347\232\204powershell\350\204\232\346\234\254.md" +++ "b/_posts/config/2023-03-28-windows\344\270\213\350\207\252\345\212\250\350\277\236\346\216\245openvpn\347\232\204powershell\350\204\232\346\234\254.md" @@ -53,4 +53,12 @@ foreach ($ovpn_file in Get-ChildItem -Path $ovpn_dir -Filter *.ovpn) { your_name your_password ``` -3. `$log_file`是openvpn的日志输出文件,控制台会读取这个文件,然后比对字符串,看看是否已经成功连接。 \ No newline at end of file +3. `$log_file`是openvpn的日志输出文件,控制台会读取这个文件,然后比对字符串,看看是否已经成功连接。 + + + +openvpn的参数: +`--config` 指定配置文件位置。 +`--auth-user-pass` 指定用户和密码文件 +`--connect-timeout 10` 指定timeout时间,这里表示10秒没有连上就timeout +`--connect-retry-max 3` 指定最多尝试次数,这里尝试3次如果失败就会退出程序