diff --git a/README.md b/README.md
index d0ae596..de3aa40 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,8 @@
-
-
-About Daplie: We're taking back the Internet!
---------------
-
-Down with Google, Apple, and Facebook!
-
-We're re-decentralizing the web and making it read-write again - one home cloud system at a time.
-
-Tired of serving the Empire? Come join the Rebel Alliance:
-
-jobs@daplie.com | [Invest in Daplie on Wefunder](https://daplie.com/invest/) | [Pre-order Cloud](https://daplie.com/preorder/), The World's First Home Server for Everyone
-
-
-
le-sni-auto
===========
+| Sponsored by [ppl](https://ppl.family)
+
An auto-sni strategy for registering and renewing letsencrypt certificates using SNICallback.
This does a couple of rather simple things:
@@ -77,7 +64,7 @@ http.createServer(le.middleware(redirectHttps));
var app = require('express')();
-https.createServer(le.httpsOptions, le.middleware(app)).listen(443);
+https.createServer(le.tlsOptions, le.middleware(app)).listen(443);
```
You can also provide a thunk-style `getCertificates(domain, certs, cb)`.
@@ -107,11 +94,11 @@ var leSni = require('le-sni-auto').create({
// some default certificates that work with localhost
// (because default certificates are required as a fallback)
-var httpsOptions = require('localhost.daplie.com-certificates').merge({
+var tlsOptions = require('localhost.daplie.me-certificates').merge({
SNICallback: leSni.sniCallback
});
-https.createServer(httpsOptions, app);
+https.createServer(tlsOptions, app);
```
You can also provide a thunk-style `getCertificates(domain, certs, cb)`.
@@ -154,14 +141,14 @@ You would set this to `10 * 24 * 60 * 60 * 1000`.
.sniCallback()
-----------
-This gets passed to `https.createServer(httpsOptions, app)` as `httpsOptions.SNICallback`.
+This gets passed to `https.createServer(tlsOptions, app)` as `tlsOptions.SNICallback`.
```javascript
var leSni = require('le-sni-auto').create({
renewWithin: 10 * 24 * 60 * 60 1000
});
-var httpsOptions = require('localhost.daplie.com-certificates').merge({
+var tlsOptions = require('localhost.daplie.com-certificates').merge({
SNICallback: leSni.sniCallback
});
@@ -169,7 +156,7 @@ function app(req, res) {
res.end("Hello, World!");
}
-https.createServer(httpsOptions, app);
+https.createServer(tlsOptions, app);
```
.cacheCerts()
diff --git a/index.js b/index.js
index ef32d77..3d0f480 100644
--- a/index.js
+++ b/index.js
@@ -4,8 +4,8 @@ var DAY = 24 * 60 * 60 * 1000;
var MIN = 60 * 1000;
var defaults = {
// don't renew before the renewWithin period
- renewWithin: 7 * DAY
-, _renewWithinMin: 3 * DAY
+ renewWithin: 14 * DAY
+, _renewWithinMin: 10 * DAY
// renew before the renewBy period
, renewBy: 2 * DAY
, _renewByMin: Math.floor(DAY / 2)
@@ -148,8 +148,8 @@ module.exports.create = function (autoSni) {
promise.then(function (certMeta) {
cb(null, certMeta.tlsContext);
}, function (err) {
- console.error('ERROR in le-sni-auto:');
- console.error(err.stack || err);
+ // console.error('ERROR in le-sni-auto:');
+ // console.error(err.stack || err);
cb(err);
// don't reuse this promise
delete autoSni._ipc[certMeta && certMeta.subject ? certMeta.subject : domain];
diff --git a/package.json b/package.json
index 733f082..4afd632 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,8 @@
{
"name": "le-sni-auto",
- "version": "2.1.0",
+ "version": "2.1.2",
"description": "An auto-sni strategy for registering and renewing letsencrypt certificates using SNICallback",
+ "homepage": "https://git.coolaj86.com/coolaj86/le-sni-auto.js",
"main": "index.js",
"dependencies": {
"bluebird": "^3.4.1"
@@ -12,7 +13,7 @@
},
"repository": {
"type": "git",
- "url": "git+https://github.com/Daplie/le-sni-auto.git"
+ "url": "git+https://git.coolaj86.com/coolaj86/le-sni-auto.git"
},
"keywords": [
"le-sni",
@@ -26,7 +27,6 @@
"author": "AJ ONeal (https://coolaj86.com/)",
"license": "(MIT OR Apache-2.0)",
"bugs": {
- "url": "https://github.com/Daplie/le-sni-auto/issues"
- },
- "homepage": "https://github.com/Daplie/le-sni-auto#readme"
+ "url": "https://git.coolaj86.com/coolaj86/le-sni-auto.js/issues"
+ }
}
diff --git a/test.js b/test.js
index 3b0cffd..3f52d57 100644
--- a/test.js
+++ b/test.js
@@ -86,7 +86,7 @@ var tests = [
return require('bluebird').promisify(fn);
});
-// opts = { notBefore, notAfter, letsencrypt.renew, letsencrypt.register, httpsOptions }
+// opts = { notBefore, notAfter, letsencrypt.renew, letsencrypt.register, tlsOptions }
var leSni = require('./').create({
notBefore: NOT_BEFORE
, notAfter: NOT_AFTER