librespeed / speedtest-go

Go backend for LibreSpeed
GNU Lesser General Public License v3.0
700 stars 152 forks source link

TLS Support #39

Closed yas-nyan closed 2 years ago

yas-nyan commented 2 years ago

sumally

This changes allow TLS to be enabled.

In net/http package, HTTP/2 is automatically enabled when TLS is enabled. But this may cause performance problems, we have also added the ability for users to selectively disable HTTP/2.

sample settings

settings.toml

# TLS and HTTP2 settings. TLS is required for HTTP2
enable_tls=true
enable_http2=true

# if you use HTTP2 or TLS, you need to prepare certificates and private keys
tls_cert_file="cert.pem"
tls_key_file="privkey.pem"

reference information

maddie commented 2 years ago

Thanks!