OpenVPN 客户端配置文件中的注释?

Dok*_*r J 32 configuration openvpn

是否可以在 OpenVPN 的客户端配置文件(那些在“client-config-dir”指定的路径中)中添加注释,即以“#”或“//”等开头的内容?如果是这样,适当的注释字符是什么?

Jim*_* G. 28

'#' 前缀是指定的注释标签。openvpn 网站上的示例广泛使用“#”注释。

此外,分号 - ';' - 用于注释单行或项目。


小智 23

正如吉姆所说,OpenVPN 站点上的示例使用 # 进行评论和 ; 注释掉设置。没有功能上的区别,但此约定可以更轻松地直观地识别已注释掉的设置。

来自https://openvpn.net/index.php/open-source/documentation/howto.html#examples

#################################################
# Sample OpenVPN 2.0 config file for            #
<snip>
# Comments are preceded with '#' or ';'         #
#################################################

# Which local IP address should OpenVPN
# listen on? (optional)
;local a.b.c.d

# Which TCP/UDP port should OpenVPN listen on?
# If you want to run multiple OpenVPN instances
# on the same machine, use a different port
# number for each one.  You will need to
# open up this port on your firewall.
port 1194

# TCP or UDP server?
;proto tcp
proto udp
Run Code Online (Sandbox Code Playgroud)