2 答案
@qle 's answer is not right. You CAN have a trusted certificate for a local ip but what I am gonna explain here is how to create a self signed certificate for your iot box so that you can import later on to your browser.
First log into your iot box and create a self signed certificate for nginx:
cat << 'EOT' > /etc/ssl/san.cnf
[req]default_bits = 2048
distinguished_name = req_distinguished_name
req_extensions = req_ext
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
countryName = XX
stateOrProvinceName = N/A
localityName = N/A
organizationName = YourName
commonName = OdooIoTBoxCertificate
[req_ext]
subjectAltName = @alt_names
[v3_req]
subjectAltName = @alt_names
[alt_names]
IP.1 = YOUR_IOTBOX_IP
EOT
openssl req -x509 -nodes -days 365000 -newkey rsa:2048 -keyout key.pem -out cert.pem -config /etc/ssl/san.cnf
mv cert.pem /etc/ssl/certs/iot.crt
mv key.pem /etc/ssl/private/iot.key
Add those certs to the iotbox nginx proxy and when ready navigate to the iotbox homepage, then your browser will complain but you can then export the cert and add it to the trusted root certificate. You will be able then to naviagate to https://YOUR_IOT_IP and it will be secure,