Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/docs/http-proxy-midd…
Browse files Browse the repository at this point in the history
…leware-2.0.7
  • Loading branch information
sinamics authored Dec 7, 2024
2 parents 14c7890 + 5cbaf90 commit 0d90ae4
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 10 deletions.
6 changes: 3 additions & 3 deletions docs/docs/Installation/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ sudo systemctl stop ztnet

### Enable at boot (default)

To stop the `ztnet` service, run the following command:
To let the `ztnet` service start at boot, run the following command:

```bash
sudo systemctl enable ztnet
```

### Disable at boot

To stop the `ztnet` service, run the following command:
To stop the `ztnet` service from starting at boot, run the following command:

```bash
sudo systemctl disable ztnet
Expand All @@ -113,4 +113,4 @@ curl -s http://install.ztnet.network | sudo bash -s -- -u
The installation scripts is available in the [install.ztnet](https://github.com/sinamics/ztnet/tree/main/install.ztnet) folder in main repository.

## Ztnet Environment Variables
See [Environment Variables](/installation/options#environment-variables) for more information.
See [Environment Variables](/installation/options#environment-variables) for more information.
2 changes: 1 addition & 1 deletion docs/docs/Usage/private_root.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ To connect your devices to the newly established private root server, they need

3. **Restart ZeroTier Service**: After updating the file, restart the ZeroTier service on each device to make sure the changes are applied.

- **Windows**: Restart the service through the Services management console or by using the PowerShell command `Restart-Service ZeroTierOne`.
- **Windows**: Restart the service through the Services management console or by using the PowerShell command `Restart-Service ZeroTierOneService`.
- **Linux**: Use `sudo systemctl restart zerotier-one` or the appropriate command for your init system.

4. **Downloading the `planet` File Conveniently**:
Expand Down
4 changes: 3 additions & 1 deletion src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
"privatePublicSwitch": {
"accessControllMessage": "Your network is now {authType}",
"privateCardTitle": "Private",
"privateCardContent": "Each user needs to be Autorization by network administrator.",
"privateCardContent": "Each user needs to be authorized by the network administrator.",
"publicCardTitle": "Public",
"publicCardContent": "All users can connect to this network without Autorization",
"loading": "Loading"
Expand Down Expand Up @@ -449,6 +449,8 @@
"mailSMTP": "Mail SMTP",
"smtpHost": "SMTP Host",
"smtpPort": "SMTP Port",
"smtpRequireTLS": "Verify SSL Certificate",
"smtpRequireTLSDescription": "Enforce valid SSL/TLS certificates. Disable only if using self-signed certificates.",
"senderEmail": "Sender Email",
"mailPlaceholder": "[email protected]",
"username": "Username",
Expand Down
2 changes: 2 additions & 0 deletions src/locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@
"mailSMTP": "Mail SMTP",
"smtpHost": "Host SMTP",
"smtpPort": "Puerto SMTP",
"smtpRequireTLS": "Verificar certificado SSL",
"smtpRequireTLSDescription": "Exigir certificados SSL/TLS válidos. Desactivar solo si usa certificados autofirmados.",
"senderEmail": "Correo electrónico del remitente",
"mailPlaceholder": "[email protected]",
"username": "Nombre de usuario",
Expand Down
2 changes: 2 additions & 0 deletions src/locales/fr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@
"mailSMTP": "Mail SMTP",
"smtpHost": "Hôte SMTP",
"smtpPort": "Port SMTP",
"smtpRequireTLS": "Vérifier le certificat SSL",
"smtpRequireTLSDescription": "Exiger des certificats SSL/TLS valides. Désactiver uniquement si vous utilisez des certificats auto-signés.",
"senderEmail": "E-mail de l'expéditeur",
"mailPlaceholder": "[email protected]",
"username": "Nom d'utilisateur",
Expand Down
2 changes: 2 additions & 0 deletions src/locales/no/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@
"mailSMTP": "Mail SMTP",
"smtpHost": "SMTP-vert",
"smtpPort": "SMTP-port",
"smtpRequireTLS": "Verifiser SSL-sertifikat",
"smtpRequireTLSDescription": "Krev gyldige SSL/TLS-sertifikater. Deaktiver kun ved bruk av selvsignerte sertifikater.",
"senderEmail": "Avsenders e-post",
"mailPlaceholder": "[email protected]",
"username": "Brukernavn",
Expand Down
4 changes: 3 additions & 1 deletion src/locales/pl/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@
"mailSMTP": "Ustawienia serwera SMTP",
"smtpHost": "Serwer SMTP",
"smtpPort": "Port SMTP",
"smtpRequireTLS": "Weryfikuj certyfikat SSL",
"smtpRequireTLSDescription": "Wymagaj ważnych certyfikatów SSL/TLS. Wyłącz tylko w przypadku certyfikatów samopodpisanych.",
"senderEmail": "E-mail nadawcy",
"mailPlaceholder": "[email protected]",
"username": "Nazwa użytkownika",
Expand Down Expand Up @@ -932,4 +934,4 @@
}
}
}
}
}
4 changes: 3 additions & 1 deletion src/locales/ru/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@
"mailSMTP": "Почтовый SMTP",
"smtpHost": "SMTP-хост",
"smtpPort": "SMTP-порт",
"smtpRequireTLS": "Проверять SSL-сертификат",
"smtpRequireTLSDescription": "Требовать действительные SSL/TLS сертификаты. Отключите только при использовании самоподписанных сертификатов.",
"senderEmail": "Email отправителя",
"mailPlaceholder": "[email protected]",
"username": "Имя пользователя",
Expand Down Expand Up @@ -932,4 +934,4 @@
}
}
}
}
}
2 changes: 2 additions & 0 deletions src/locales/zh-tw/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@
"mailSMTP": "郵件SMTP",
"smtpHost": "SMTP主機",
"smtpPort": "SMTP端口",
"smtpRequireTLS": "驗證SSL憑證",
"smtpRequireTLSDescription": "強制要求有效的SSL/TLS憑證。僅在使用自行簽署憑證時停用。",
"senderEmail": "寄件人電子郵件",
"mailPlaceholder": "[email protected]",
"username": "使用者名稱",
Expand Down
2 changes: 2 additions & 0 deletions src/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@
"mailSMTP": "邮件SMTP",
"smtpHost": "SMTP主机",
"smtpPort": "SMTP端口",
"smtpRequireTLS": "验证SSL证书",
"smtpRequireTLSDescription": "强制要求有效的SSL/TLS证书。仅在使用自签名证书时禁用。",
"senderEmail": "发件人电子邮件",
"mailPlaceholder": "[email protected]",
"username": "用户名",
Expand Down
16 changes: 15 additions & 1 deletion src/pages/admin/mail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const Mail = () => {
submitHandler={(params) => inputHandler(params)}
/>

<div className="flex items-center justify-between pb-10">
<div className="flex items-center justify-between">
<p className="font-medium">{t("mail.useSSL")}</p>
<input
type="checkbox"
Expand All @@ -160,6 +160,20 @@ const Mail = () => {
}}
/>
</div>
<div className="flex items-center justify-between pb-10">
<div>
<p className="font-medium">{t("mail.smtpRequireTLS")}</p>
<p className="text-gray-500">{t("mail.smtpRequireTLSDescription")}</p>
</div>
<input
type="checkbox"
checked={options?.smtpRequireTLS || false}
className="checkbox-primary checkbox checkbox-sm"
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
void inputHandler({ smtpRequireTLS: e.target.checked });
}}
/>
</div>
<div className="collapse collapse-arrow w-full border border-base-300 bg-base-200">
<input type="checkbox" />
<div className="collapse-title">{t("mail.inviteUserTemplate")}</div>
Expand Down
11 changes: 9 additions & 2 deletions src/utils/mail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,14 @@ export async function sendMailWithTemplate(
html: parsedTemplate.body,
};

await sendEmail(transporter, mailOptions);
// Run SMTP operation in background
setImmediate(async () => {
try {
await sendEmail(transporter, mailOptions);
} catch (error) {
console.error("Email sending failed:", error);
}
});
}

/**
Expand Down Expand Up @@ -285,7 +292,7 @@ export async function createTransporter() {
}
: undefined,
tls: {
rejectUnauthorized: true,
rejectUnauthorized: globalOptions.smtpRequireTLS,
minVersion: "TLSv1.2",
},
} as TransportOptions);
Expand Down

0 comments on commit 0d90ae4

Please sign in to comment.