协议配置,如果要使用 HTTPS,可以设置该字段。
填写示例:记得把证书文件丢到 data 目录里面才会识别到喔~
"scheme": {
"address": "0.0.0.0", // 要监听的 http/https 地址,默认为 0.0.0.0
"http_port": 5244, // 监听的 http 端口,默认的 '5244',如果你想禁用 http,将其设置为 '-1'
"https_port": -1, // https 端口监听,默认的 '-1',如果你想启用 https,将其设置为非 '-1'
"force_https": false, // 是否强制使用 HTTPS 协议,如果设置为 true ,则用户只能通过 HTTPS 访问该网站
"cert_file": "data\\cert.crt", // 证书文件路径
"key_file": "data\\key.key", // 证书密钥文件路径
"unix_file": "", // Unix 监听套接字文件路径,默认的空的,如果你想使用 Unix socket,将其设置为非空
"unix_file_perm": "" // Unix 监听套接字文件,设置为合适的权限
},
成功使用过的配置
xxxxxxxxxx
"scheme": {
"address": "0.0.0.0",
"http_port": 5244,
"https_port": 5242,
"force_https": true,
"cert_file": "C:\\ali\\data\\csnd.fun.pem",
"key_file": "C:\\ali\\data\\csnd.fun.key",
"unix_file": "",
"unix_file_perm": ""
},