This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
笔记! 如果通过 GUI“C:\Program Files\OpenVPN\config\name.ovpn”启动,则参数 auth-user-pass 不起作用
制作启动文件 start_openvpv.cmd(+ 链接到“以管理员身份运行” )内容为:
pass.txt:
或将行放入 name.ovpn,如上面的信息:
+start_openvpv.cmd:
NOTE! param auth-user-pass not work if start by GUI "C:\Program Files\OpenVPN\config\name.ovpn"
Made start file start_openvpv.cmd (+ link to with "run as admin") with content:
pass.txt:
OR put line to name.ovpn, as in upper messege:
+start_openvpv.cmd:
可以使用以下 DOS 命令通过脚本打开 VPN 连接(但不建议这样做,因为密码未加密)
It's possible to open a VPN connection via a script by using the following DOS command (however this is not recommended since the password is not encrypted)
事实证明问题不在于标准输入。
我使用了一些锁定,如果进程在写入标准输入的过程中退出,则可能会出现死锁。
以这种方式发送密码没有问题。
It turns out the problem wasn't with standard in.
I was using some locking where if the process exited in the middle of writing to standard in, there could be a deadlock.
There is no issue sending the password in this manner.
要自动验证 Openvpn,您必须修改 config.ovpn 文件。
-转到 OpenVPN\config 目录并编辑 .ovpn 文件
-将此行添加到配置文件 -> auth-user-pass password.txt
-然后创建password.txt文件并在其中写入:
-完成这些步骤后,您的openvpn将自动连接。
For automatic authentication to Openvpn you have to modify the config.ovpn file.
-Go to OpenVPN\config directory and edit the .ovpn file
-Add this line to the config file -> auth-user-pass password.txt
-Then create the password.txt file and write in it:
-After these steps your openvpn will connect automatically.