解决证书路径的问题
This commit is contained in:
parent
bf9be7ebc5
commit
c7036567e3
@ -20,13 +20,17 @@ init() ->
|
||||
Port = proplists:get_value(port, Props),
|
||||
Alpn = proplists:get_value(alpn, Props),
|
||||
Limits = proplists:get_value(limits, Props),
|
||||
CertFile = proplists:get_value(certfile, Props),
|
||||
KeyFile = proplists:get_value(keyfile, Props),
|
||||
|
||||
%% 获取环境变量
|
||||
Path = os:getenv("QUIC_CERT_PATH", code:priv_dir(sdlan)),
|
||||
|
||||
Path = code:priv_dir(sdlan),
|
||||
LOptions = #{
|
||||
addr_family => inet,
|
||||
% 必选:QUIC/TLS证书配置
|
||||
certfile => Path ++ "/cert.pem",
|
||||
keyfile => Path ++ "/key.pem",
|
||||
certfile => Path ++ "/" ++ CertFile,
|
||||
keyfile => Path ++ "/" ++ KeyFile,
|
||||
alpn => Alpn,
|
||||
peer_bidi_stream_count => 1,
|
||||
conn_acceptors => 10
|
||||
|
||||
@ -11,6 +11,8 @@
|
||||
{quic_server, [
|
||||
{port, 443},
|
||||
{alpn, ["punchnet/1.0"]},
|
||||
{certfile, "cert.pem"},
|
||||
{keyfile, "key.pem"},
|
||||
{limits, [
|
||||
{max_packet_size, 16384},
|
||||
%% 单位为秒
|
||||
|
||||
@ -11,6 +11,8 @@
|
||||
{quic_server, [
|
||||
{port, 443},
|
||||
{alpn, ["punchnet/1.0"]},
|
||||
{certfile, "fullchain.cer"},
|
||||
{keyfile, "punchsky.com.key"},
|
||||
{limits, [
|
||||
{max_packet_size, 16384},
|
||||
%% 单位为秒
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user