@samitouri / QOSami-HFS / commits / 299a2d23

allow attempting letsencrypt if we cannot test port 80

Massimo Melina committed Oct 9, 2023 at 22:11 UTC 299a2d23f8ccf91c44fd27f560d1f2d9047abea0
1 file changed +2 -3
src/api.net.ts
+2 -3
@@ -144,9 +144,8 @@ async function generateSSLCert(domain: string, email?: string) {
144 await upnpClient.createMapping({ private: 80, public: { host: '', port: 80 }, description: 'hfs temporary', ttl: 30 }).catch(() => {})
145 check = await checkPort(domain, 80) // repeat test
146 }
147 - if (!check)
148 - throw new ApiError(HTTP_FAILED_DEPENDENCY, "couldn't test port 80")
149 - if (!check.success)
147 + //if (!check) throw new ApiError(HTTP_FAILED_DEPENDENCY, "couldn't test port 80")
148 + if (!check?.success)
149 throw new ApiError(HTTP_FAILED_DEPENDENCY, "port 80 is not working on the specified domain")
150 const acmeClient = new acme.Client({
151 accountKey: await acme.crypto.createPrivateKey(),