From 57f97eebdbbec692747b0922e4a1e6f09c0f19d8 Mon Sep 17 00:00:00 2001 From: tigerbot Date: Tue, 7 Nov 2017 15:46:36 -0700 Subject: [PATCH 1/7] removed `le-challenge-ddns` from package.json --- package-lock.json | 977 ++++++++++------------------------------------ package.json | 1 - 2 files changed, 212 insertions(+), 766 deletions(-) diff --git a/package-lock.json b/package-lock.json index 804184b..7804c8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "goldilocks", - "version": "1.0.0-placeholder", + "version": "1.1.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -35,11 +35,6 @@ "sprintf-js": "1.0.3" } }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" - }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", @@ -70,33 +65,6 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, - "authenticator": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/authenticator/-/authenticator-1.1.2.tgz", - "integrity": "sha1-zkVq2pE6S7oJ5HlvSRNBS81u40w=", - "requires": { - "authenticator-cli": "1.0.2", - "notp": "2.0.3", - "thirty-two": "0.0.2" - }, - "dependencies": { - "authenticator-cli": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/authenticator-cli/-/authenticator-cli-1.0.2.tgz", - "integrity": "sha1-xtM3PkfSdcjbFAVkWdRIq/HrOt0=", - "requires": { - "authenticator": "1.1.2", - "cli": "0.11.3", - "qrcode-terminal": "0.10.0" - } - }, - "qrcode-terminal": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.10.0.tgz", - "integrity": "sha1-p2pI4mEKGPl/o6K9UytoKs/4bFM=" - } - } - }, "aws-sign2": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", @@ -194,35 +162,11 @@ "resolved": "https://registry.npmjs.org/buffer-v6-polyfill/-/buffer-v6-polyfill-1.0.3.tgz", "integrity": "sha1-vGlcbxnQCmPoMzjDbNaPP13Lo+g=" }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" - }, "bytes": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz", "integrity": "sha1-fZcZb51br39pNeJZhVSe3SpsIzk=" }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" - } - }, - "capture-stack-trace": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", - "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=" - }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -239,15 +183,6 @@ "pkijs": "1.3.33" } }, - "cli": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/cli/-/cli-0.11.3.tgz", - "integrity": "sha1-ewzT3pkORSklZnwNuv/cn38qmhU=", - "requires": { - "exit": "0.1.2", - "glob": "7.1.2" - } - }, "cliff": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/cliff/-/cliff-0.1.10.tgz", @@ -327,28 +262,6 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "country-data": { - "version": "0.0.24", - "resolved": "https://registry.npmjs.org/country-data/-/country-data-0.0.24.tgz", - "integrity": "sha1-4SRm/Qo/FLG4gQNxH7XzCINXmfg=", - "requires": { - "currency-symbol-map": "2.2.0", - "underscore": "1.8.3" - } - }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", - "requires": { - "capture-stack-trace": "1.0.0" - } - }, "cryptiles": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", @@ -357,34 +270,11 @@ "boom": "2.10.1" } }, - "currency-symbol-map": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/currency-symbol-map/-/currency-symbol-map-2.2.0.tgz", - "integrity": "sha1-KzwYcv8aws5ZXYJz5Y4f/wJyrqI=" - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "requires": { - "array-find-index": "1.0.2" - } - }, "cycle": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" }, - "daplie-dns": { - "version": "git+https://git.daplie.com/Daplie/daplie-cli-dns.git#ed68b2cb128ed25ac96ae1eea1b2707dbf6e2d28" - }, - "daplie-domains": { - "version": "git+https://git.daplie.com/Daplie/daplie-cli-domains.git#1e06a49b96be8861fe4c7ffaec0714dcfbeec916", - "requires": { - "colors": "1.1.2", - "mkdirp": "0.5.1" - } - }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -400,20 +290,6 @@ } } }, - "ddns-cli": { - "version": "git+https://git.daplie.com/Daplie/node-ddns-client.git#485a7fe66bdd9c6537798979fda7f1e3653ba97b", - "requires": { - "bluebird": "3.5.0", - "cli": "0.11.3", - "daplie-dns": "git+https://git.daplie.com/Daplie/daplie-cli-dns.git#ed68b2cb128ed25ac96ae1eea1b2707dbf6e2d28", - "daplie-domains": "git+https://git.daplie.com/Daplie/daplie-cli-domains.git#1e06a49b96be8861fe4c7ffaec0714dcfbeec916", - "homedir": "0.6.0", - "human-readable-ids": "git+https://git.daplie.com/Daplie/human-readable-ids-js#dca721f8ac642eb7c5ae28238331577ada437ed0", - "ipify": "1.1.0", - "oauth3-cli": "git+https://git.daplie.com/OAuth3/oauth3-cli.git#49c741c9c55bb38fb4138fba4bc1ed3d0ce574a9", - "spliddit": "2.1.1" - } - }, "debug": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.1.tgz", @@ -422,11 +298,6 @@ "ms": "0.7.2" } }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, "deep-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", @@ -448,18 +319,15 @@ "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, "dns-suite": { - "version": "git+https://git@git.daplie.com/Daplie/dns-suite#6352cf4b516d94f0283c9c7cd024431bf974f049", + "version": "git+https://git@git.daplie.com/Daplie/dns-suite#c0f5e0cb173c49dc86b6f34b4dd0dcf9af593805", "requires": { "bluebird": "3.5.0", - "hexdump.js": "1.0.5" - } - }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "requires": { - "readable-stream": "2.2.11" + "hexdump.js": "git+https://git.coolaj86.com/coolaj86/hexdump.js#222fa7de5036a16397de2fe703c35ac54a3d8d0c" + }, + "dependencies": { + "hexdump.js": { + "version": "git+https://git.coolaj86.com/coolaj86/hexdump.js#222fa7de5036a16397de2fe703c35ac54a3d8d0c" + } } }, "ecc-jsbn": { @@ -504,24 +372,11 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=" }, - "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", - "requires": { - "is-arrayish": "0.2.1" - } - }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, "esprima": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", @@ -537,93 +392,250 @@ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz", "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg=" }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=" - }, "express": { - "version": "git+https://github.com/expressjs/express.git#d43b074f0b3b56a91f240e62798c932ba104b79a", + "version": "git+https://github.com/expressjs/express.git#351396f971280ab79faddcf9782ea50f4e88358d", "requires": { - "accepts": "1.3.3", + "accepts": "1.3.4", "array-flatten": "1.1.1", + "body-parser": "1.18.2", "content-disposition": "0.5.2", - "content-type": "1.0.2", + "content-type": "1.0.4", "cookie": "0.3.1", "cookie-signature": "1.0.6", - "debug": "2.6.1", - "depd": "1.1.0", + "debug": "2.6.9", + "depd": "1.1.1", "encodeurl": "1.0.1", "escape-html": "1.0.3", - "etag": "1.8.0", - "finalhandler": "1.0.3", - "fresh": "0.5.0", + "etag": "1.8.1", + "finalhandler": "1.1.0", + "fresh": "0.5.2", "merge-descriptors": "1.0.1", "methods": "1.1.2", "on-finished": "2.3.0", - "parseurl": "1.3.1", + "parseurl": "1.3.2", "path-to-regexp": "0.1.7", - "proxy-addr": "1.1.4", - "qs": "6.4.0", + "proxy-addr": "2.0.2", + "qs": "6.5.1", "range-parser": "1.2.0", - "send": "0.15.1", - "serve-static": "1.12.1", - "setprototypeof": "1.0.3", + "safe-buffer": "5.1.1", + "send": "0.16.1", + "serve-static": "1.13.1", + "setprototypeof": "1.1.0", "statuses": "1.3.1", "type-is": "1.6.15", - "utils-merge": "1.0.0", - "vary": "1.1.1" + "utils-merge": "1.0.1", + "vary": "1.1.2" }, "dependencies": { - "finalhandler": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.3.tgz", - "integrity": "sha1-70fneVDpmXgOhgIqVg4yF+DQzIk=", + "accepts": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", + "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", "requires": { - "debug": "2.6.7", + "mime-types": "2.1.17", + "negotiator": "0.6.1" + } + }, + "body-parser": { + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", + "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "1.0.4", + "debug": "2.6.9", + "depd": "1.1.1", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "on-finished": "2.3.0", + "qs": "6.5.1", + "raw-body": "2.3.2", + "type-is": "1.6.15" + } + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "finalhandler": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "requires": { + "debug": "2.6.9", "encodeurl": "1.0.1", "escape-html": "1.0.3", "on-finished": "2.3.0", - "parseurl": "1.3.1", + "parseurl": "1.3.2", "statuses": "1.3.1", "unpipe": "1.0.0" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": "1.3.1" }, "dependencies": { - "debug": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", - "integrity": "sha1-krrR9tBbu2u6Isyoi80OyJTChh4=", - "requires": { - "ms": "2.0.0" - } + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" } } }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" + }, + "ipaddr.js": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.5.2.tgz", + "integrity": "sha1-1LUFvemUaYfM8PxY2QEP+WB+P6A=" + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "requires": { + "mime-db": "1.30.0" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "proxy-addr": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.2.tgz", + "integrity": "sha1-ZXFQT0e7mI7IGAJT+F3X4UlSvew=", + "requires": { + "forwarded": "0.1.2", + "ipaddr.js": "1.5.2" + } + }, "qs": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz", - "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=" + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "send": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.1.tgz", + "integrity": "sha512-ElCLJdJIKPk6ux/Hocwhk7NFHpI3pVm/IZOYWqUmoxcgeyM+MpxHHKhb8QmlJDX1pU6WrgaHBkVNm73Sv7uc2A==", + "requires": { + "debug": "2.6.9", + "depd": "1.1.1", + "destroy": "1.0.4", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "etag": "1.8.1", + "fresh": "0.5.2", + "http-errors": "1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "2.3.0", + "range-parser": "1.2.0", + "statuses": "1.3.1" + } }, "serve-static": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.1.tgz", - "integrity": "sha1-dEOpZePO1kes61Y5+ga/TRu+ADk=", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.1.tgz", + "integrity": "sha512-hSMUZrsPa/I09VYFJwa627JJkNs0NrfL1Uzuup+GqHfToR2KcsXFymXSV90hoyw3M+msjFuQly+YzIH/q0MGlQ==", "requires": { "encodeurl": "1.0.1", "escape-html": "1.0.3", - "parseurl": "1.3.1", - "send": "0.15.1" + "parseurl": "1.3.2", + "send": "0.16.1" } }, "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" } } }, @@ -668,15 +680,6 @@ } } }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - } - }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -692,11 +695,6 @@ "mime-types": "2.1.15" } }, - "forwarded": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.0.tgz", - "integrity": "sha1-Ge+YdMSuHCl7zweP3mOgm2aoQ2M=" - }, "fresh": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz", @@ -707,11 +705,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" - }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -740,40 +733,13 @@ "path-is-absolute": "1.0.1" } }, - "got": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-5.7.1.tgz", - "integrity": "sha1-X4FjWmHkplifGAVp6k44FoClHzU=", - "requires": { - "create-error-class": "3.0.2", - "duplexer2": "0.1.4", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.0", - "node-status-codes": "1.0.0", - "object-assign": "4.1.1", - "parse-json": "2.2.0", - "pinkie-promise": "2.0.1", - "read-all-stream": "3.1.0", - "readable-stream": "2.2.11", - "timed-out": "3.1.3", - "unzip-response": "1.0.2", - "url-parse-lax": "1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, "graceful-readlink": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" }, "greenlock": { - "version": "git+https://git.daplie.com/Daplie/node-greenlock.git#d985dd371aece59cdfe374963bd9919bffc1bc5b", + "version": "git+https://git.daplie.com/Daplie/node-greenlock.git#0096a59894af156b6bf67bc9b0d496be256b12e5", "requires": { "asn1js": "1.2.12", "bluebird": "3.5.0", @@ -824,11 +790,6 @@ "sntp": "1.0.9" } }, - "hexdump.js": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/hexdump.js/-/hexdump.js-1.0.5.tgz", - "integrity": "sha1-xbxlSoIvAzjzEX5fXzVgZd6HmDQ=" - }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -849,11 +810,6 @@ "resolved": "https://registry.npmjs.org/homedir/-/homedir-0.6.0.tgz", "integrity": "sha1-KyHbZr8Ipts4JJo+/1LX0YcGrx4=" }, - "hosted-git-info": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.2.tgz", - "integrity": "sha1-AHa59GonBQbduq6lZJaJdGBhKmc=" - }, "http-errors": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.5.1.tgz", @@ -894,14 +850,6 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz", "integrity": "sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es=" }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "requires": { - "repeating": "2.0.1" - } - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -919,71 +867,16 @@ "ipaddr.js": { "version": "git+https://github.com/whitequark/ipaddr.js.git#9c557556e495a2c60a3c656e4f9f8b3a1e14dedc" }, - "ipify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ipify/-/ipify-1.1.0.tgz", - "integrity": "sha1-66PK6hfngPqNryOropWD5/3cteQ=", - "requires": { - "got": "5.7.1", - "meow": "3.7.0" - } - }, "is": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/is/-/is-3.2.1.tgz", "integrity": "sha1-0Kwq1V63sL7JJqUmb2xmKqqD3KU=" }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "requires": { - "builtin-modules": "1.1.1" - } - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=" - }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, "isemail": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", @@ -1120,16 +1013,6 @@ "rsa-compat": "1.2.7" } }, - "le-challenge-ddns": { - "version": "git+https://git.daplie.com/Daplie/le-challenge-ddns.git#01ebef901cfb96ecb7ded02299a75a1a9f17167d", - "requires": { - "cluster-store": "2.0.6", - "daplie-dns": "git+https://git.daplie.com/Daplie/daplie-cli-dns.git#ed68b2cb128ed25ac96ae1eea1b2707dbf6e2d28", - "daplie-domains": "git+https://git.daplie.com/Daplie/daplie-cli-domains.git#1e06a49b96be8861fe4c7ffaec0714dcfbeec916", - "ddns-cli": "git+https://git.daplie.com/Daplie/node-ddns-client.git#485a7fe66bdd9c6537798979fda7f1e3653ba97b", - "oauth3-cli": "git+https://git.daplie.com/OAuth3/oauth3-cli.git#49c741c9c55bb38fb4138fba4bc1ed3d0ce574a9" - } - }, "le-challenge-fs": { "version": "git+https://git.daplie.com/Daplie/le-challenge-webroot.git#7d904739fbe517da2582a01faeb2407405f99daf", "requires": { @@ -1170,18 +1053,6 @@ "rsa-compat": "1.2.7" } }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" - } - }, "localhost.daplie.me-certificates": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/localhost.daplie.me-certificates/-/localhost.daplie.me-certificates-1.3.5.tgz", @@ -1192,64 +1063,16 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" - }, "lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" - } - }, - "lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=" - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" - }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.3.8", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - } - } - }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -1362,11 +1185,6 @@ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.6.49.tgz", "integrity": "sha1-8e6V1ddGI5OP4Z1piqWibVTS9g8=" }, - "node-status-codes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-status-codes/-/node-status-codes-1.0.0.tgz", - "integrity": "sha1-WuVUHQJGRdMqWPzdyc7s6nrjrC8=" - }, "node.extend": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/node.extend/-/node.extend-1.1.6.tgz", @@ -1375,68 +1193,11 @@ "is": "3.2.1" } }, - "normalize-package-data": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.8.tgz", - "integrity": "sha1-2Bntoqne29H/pWPqQHHZNngilbs=", - "requires": { - "hosted-git-info": "2.4.2", - "is-builtin-module": "1.0.0", - "semver": "5.3.0", - "validate-npm-package-license": "3.0.1" - } - }, - "notp": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/notp/-/notp-2.0.3.tgz", - "integrity": "sha1-qf0R4lz+HMs5/GaJVE7kwQ75pXc=" - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, "oauth-sign": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" }, - "oauth3-cli": { - "version": "git+https://git.daplie.com/OAuth3/oauth3-cli.git#49c741c9c55bb38fb4138fba4bc1ed3d0ce574a9", - "requires": { - "authenticator": "1.1.2", - "bluebird": "3.5.0", - "cli": "0.11.3", - "colors": "1.1.2", - "country-data": "0.0.24", - "escape-string-regexp": "1.0.5", - "homedir": "0.6.0", - "jsonwebtoken": "5.7.0", - "mkdirp": "0.5.1", - "node-uuid": "1.4.8", - "qrcode-terminal": "git+https://github.com/gtanner/qrcode-terminal.git#9b412b3052242e054b85705f5033cd15719ef7e8", - "request": "2.81.0", - "strip-ansi": "3.0.1", - "stripe": "4.22.0" - }, - "dependencies": { - "jsonwebtoken": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-5.7.0.tgz", - "integrity": "sha1-HJD5qGzlt0j1+XnBK3BAK0r83bQ=", - "requires": { - "jws": "3.1.4", - "ms": "0.7.2", - "xtend": "4.0.1" - } - }, - "node-uuid": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", - "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=" - } - } - }, "oauth3.js": { "version": "git+https://git.daplie.com/OAuth3/oauth3.js.git#5163463dd200ae1ccd03a47c698e5102dd74a1ca", "requires": { @@ -1446,11 +1207,6 @@ "terminal-forms.js": "git+https://git.daplie.com/OAuth3/terminal-forms.js.git#079d94cbf3dc8998beca5a72a827444d0e8dd504" } }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -1467,27 +1223,11 @@ "wrappy": "1.0.2" } }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "requires": { - "error-ex": "1.3.1" - } - }, "parseurl": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz", "integrity": "sha1-yKuMkiO6NIiKpkopeyiFO+wY2lY=" }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "requires": { - "pinkie-promise": "2.0.1" - } - }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -1498,39 +1238,11 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - } - }, "performance-now": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz", "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=" }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "2.0.4" - } - }, "pkginfo": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", @@ -1541,25 +1253,6 @@ "resolved": "https://registry.npmjs.org/pkijs/-/pkijs-1.3.33.tgz", "integrity": "sha1-ponvYhE7fDSOH/wJll0iOeW7TJI=" }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "proxy-addr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.4.tgz", - "integrity": "sha1-J+VF9pYKRKYn2bREZ+NcG2tM4vM=", - "requires": { - "forwarded": "0.1.0", - "ipaddr.js": "git+https://github.com/whitequark/ipaddr.js.git#9c557556e495a2c60a3c656e4f9f8b3a1e14dedc" - } - }, "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", @@ -1573,9 +1266,6 @@ "safe-replace": "1.0.2" } }, - "qrcode-terminal": { - "version": "git+https://github.com/gtanner/qrcode-terminal.git#9b412b3052242e054b85705f5033cd15719ef7e8" - }, "qs": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.1.tgz", @@ -1596,67 +1286,9 @@ "unpipe": "1.0.0" } }, - "read-all-stream": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz", - "integrity": "sha1-NcPhd/IHjveJ7kv6+kNzB06u9Po=", - "requires": { - "pinkie-promise": "2.0.1", - "readable-stream": "2.2.11" - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.3.8", - "path-type": "1.1.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" - } - }, - "readable-stream": { - "version": "2.2.11", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.11.tgz", - "integrity": "sha512-h+8+r3MKEhkiVrwdKL8aWs1oc1VvBu33ueshOvS26RsZQ3Amhx/oO3TKe4lApSV9ueY6as8EAh7mtuFjdlhg9Q==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "safe-buffer": "5.0.1", - "string_decoder": "1.0.2", - "util-deprecate": "1.0.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", - "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=" - } - } - }, "recase": { "version": "git+https://git.daplie.com/coolaj86/recase-js.git#fcff04dcb0198a81576aad68506ae2490872db04" }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" - } - }, "redirect-https": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/redirect-https/-/redirect-https-1.1.4.tgz", @@ -1665,14 +1297,6 @@ "escape-html": "1.0.3" } }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "requires": { - "is-finite": "1.0.2" - } - }, "request": { "version": "2.81.0", "resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz", @@ -1737,49 +1361,6 @@ "scmp": { "version": "git+https://github.com/freewil/scmp.git#246bacad4f84fe4e0b0d16cd55d19684cffbaf5c" }, - "semver": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", - "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" - }, - "send": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.15.1.tgz", - "integrity": "sha1-igI1TCbm9cynAAZfXwzeupDse18=", - "requires": { - "debug": "2.6.1", - "depd": "1.1.0", - "destroy": "1.0.4", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "etag": "1.8.0", - "fresh": "0.5.0", - "http-errors": "1.6.1", - "mime": "1.3.4", - "ms": "0.7.2", - "on-finished": "2.3.0", - "range-parser": "1.2.0", - "statuses": "1.3.1" - }, - "dependencies": { - "http-errors": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz", - "integrity": "sha1-X4uO2YrKVFZWv1cplzh/kEpyIlc=", - "requires": { - "depd": "1.1.0", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": "1.3.1" - } - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" - } - } - }, "serve-index": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.0.tgz", @@ -1897,11 +1478,6 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz", "integrity": "sha1-gaVSFB7BBLiOic44MQOtXGZWTQg=" }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, "sni": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/sni/-/sni-1.0.0.tgz", @@ -1958,24 +1534,6 @@ } } }, - "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", - "requires": { - "spdx-license-ids": "1.2.2" - } - }, - "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" - }, - "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" - }, "spliddit": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/spliddit/-/spliddit-2.1.1.tgz", @@ -2018,21 +1576,6 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" }, - "string_decoder": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz", - "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=", - "requires": { - "safe-buffer": "5.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", - "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=" - } - } - }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -2046,45 +1589,6 @@ "ansi-regex": "2.1.1" } }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "requires": { - "is-utf8": "0.2.1" - } - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "requires": { - "get-stdin": "4.0.1" - } - }, - "stripe": { - "version": "4.22.0", - "resolved": "https://registry.npmjs.org/stripe/-/stripe-4.22.0.tgz", - "integrity": "sha1-bNw14Nb06xPCmeimsvSDfLLU1zI=", - "requires": { - "bluebird": "2.11.0", - "lodash.isplainobject": "4.0.6", - "object-assign": "4.1.1", - "qs": "6.0.4" - }, - "dependencies": { - "bluebird": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", - "integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE=" - }, - "qs": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.0.4.tgz", - "integrity": "sha1-UQGdhHIMk5uCc36EVWp4Izjs6ns=" - } - } - }, "stunnel": { "version": "git+https://git.daplie.com/Daplie/node-tunnel-client.git#114847e31abe9a0c5f0598b892dd98b37fe9622e", "requires": { @@ -2103,7 +1607,7 @@ "bluebird": "3.5.0", "cluster-store": "2.0.6", "commander": "2.9.0", - "greenlock": "git+https://git.daplie.com/Daplie/node-greenlock.git#d985dd371aece59cdfe374963bd9919bffc1bc5b", + "greenlock": "git+https://git.daplie.com/Daplie/node-greenlock.git#0096a59894af156b6bf67bc9b0d496be256b12e5", "jsonwebtoken": "7.4.1", "localhost.daplie.me-certificates": "1.3.5", "redirect-https": "1.1.4", @@ -2128,16 +1632,6 @@ "strip-ansi": "3.0.1" } }, - "thirty-two": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/thirty-two/-/thirty-two-0.0.2.tgz", - "integrity": "sha1-QlPinYywWPBIAmfFaYwOSSflS2o=" - }, - "timed-out": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-3.1.3.tgz", - "integrity": "sha1-lYYL/MXHbCd/j4Mm/Q9bLiDrohc=" - }, "topo": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz", @@ -2154,11 +1648,6 @@ "punycode": "1.4.1" } }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -2192,29 +1681,11 @@ "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.0.tgz", "integrity": "sha1-sHoualQagV/Go0zNRTO67DB8qGQ=" }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, - "unzip-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz", - "integrity": "sha1-uYTwh3/AqJwsdzzB73tbIytbBv4=" - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "requires": { - "prepend-http": "1.0.4" - } - }, "ursa": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/ursa/-/ursa-0.9.4.tgz", @@ -2225,35 +1696,11 @@ "nan": "2.6.2" } }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "utils-merge": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", - "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg=" - }, "uuid": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=" }, - "validate-npm-package-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", - "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" - } - }, - "vary": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.1.tgz", - "integrity": "sha1-Z1Neu2lMHVIldFeYRmUyP1h+jTc=" - }, "verror": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", diff --git a/package.json b/package.json index bd7a739..7dde714 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,6 @@ "js-yaml": "^3.8.3", "jsonschema": "^1.2.0", "jsonwebtoken": "^7.4.0", - "le-challenge-ddns": "git+https://git.daplie.com/Daplie/le-challenge-ddns.git#master", "le-challenge-fs": "git+https://git.daplie.com/Daplie/le-challenge-webroot.git#master", "le-challenge-sni": "^2.0.1", "le-store-certbot": "git+https://git.daplie.com/Daplie/le-store-certbot.git#master", From 40bd1d9cc63c0efeac36de972017cbaa65901e3d Mon Sep 17 00:00:00 2001 From: tigerbot Date: Tue, 7 Nov 2017 16:42:00 -0700 Subject: [PATCH 2/7] moved some functions into a utils files for wider use within ddns --- lib/ddns/dns-ctrl.js | 64 ++------------------------- lib/ddns/index.js | 57 ++++++------------------ lib/ddns/utils.js | 102 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+), 103 deletions(-) create mode 100644 lib/ddns/utils.js diff --git a/lib/ddns/dns-ctrl.js b/lib/ddns/dns-ctrl.js index 59eee35..4c19a59 100644 --- a/lib/ddns/dns-ctrl.js +++ b/lib/ddns/dns-ctrl.js @@ -1,6 +1,6 @@ 'use strict'; -module.exports.create = function (deps, conf) { +module.exports.create = function (deps, conf, utils) { function dnsType(addr) { if (/^\d+\.\d+\.\d+\.\d+$/.test(addr)) { return 'A'; @@ -10,62 +10,6 @@ module.exports.create = function (deps, conf) { } } - var tldCache = {}; - async function getTlds(provider) { - async function updateCache() { - var reqObj = { - url: deps.OAUTH3.url.normalize(provider)+'/api/com.daplie.domains/prices' - , method: 'GET' - , json: true - }; - - var resp = await deps.OAUTH3.request(reqObj); - var tldObj = {}; - resp.data.forEach(function (tldInfo) { - if (tldInfo.enabled) { - tldObj[tldInfo.tld] = true; - } - }); - - tldCache[provider] = { - time: Date.now() - , tlds: tldObj - }; - return tldObj; - } - - // If we've never cached the results we need to return the promise that will fetch the recult, - // otherwise we can return the cached value. If the cached value has "expired", we can still - // return the cached value we just want to update the cache in parellel (making sure we only - // update once). - if (!tldCache[provider]) { - return updateCache(); - } - if (!tldCache[provider].updating && Date.now() - tldCache[provider].time > 24*60*60*1000) { - tldCache[provider].updating = true; - updateCache(); - } - - return tldCache[provider].tlds; - } - - async function splitDomains(provider, domains) { - var tlds = await getTlds(provider); - return domains.map(function (domain) { - var split = domain.split('.'); - var tldSegCnt = tlds[split.slice(-2).join('.')] ? 2 : 1; - - // Currently assuming that the sld can't contain dots, and that the tld can have at - // most one dot. Not 100% sure this is a valid assumption, but exceptions should be - // rare even if the assumption isn't valid. - return { - tld: split.slice(-tldSegCnt).join('.') - , sld: split.slice(-tldSegCnt-1, -tldSegCnt).join('.') - , sub: split.slice(0, -tldSegCnt-1).join('.') - }; - }); - } - async function setDeviceAddress(session, addr, domains) { var directives = await deps.OAUTH3.discover(session.token.aud); @@ -111,7 +55,7 @@ module.exports.create = function (deps, conf) { return goodAddrDomains.indexOf(domain) < 0; }); - var oldDns = await splitDomains(directives.api, badAddrDomains); + var oldDns = await utils.splitDomains(directives.api, badAddrDomains); var common = { api: 'devices.detach' , session: session @@ -124,7 +68,7 @@ module.exports.create = function (deps, conf) { console.log('removed bad DNS records for ' + badAddrDomains.join(', ')); } - var newDns = await splitDomains(directives.api, requiredUpdates); + var newDns = await utils.splitDomains(directives.api, requiredUpdates); common = { api: 'devices.attach' , session: session @@ -169,7 +113,7 @@ module.exports.create = function (deps, conf) { async function removeDomains(session, domains) { var directives = await deps.OAUTH3.discover(session.token.aud); - var oldDns = await splitDomains(directives.api, domains); + var oldDns = await utils.splitDomains(directives.api, domains); var common = { api: 'devices.detach' , session: session diff --git a/lib/ddns/index.js b/lib/ddns/index.js index fb72030..adce60d 100644 --- a/lib/ddns/index.js +++ b/lib/ddns/index.js @@ -3,48 +3,19 @@ module.exports.create = function (deps, conf) { var dns = deps.PromiseA.promisifyAll(require('dns')); var network = deps.PromiseA.promisifyAll(deps.recase.camelCopy(require('network'))); - var loopback = require('./loopback').create(deps, conf); - var dnsCtrl = require('./dns-ctrl').create(deps, conf); - var tunnelClients = require('./tunnel-client-manager').create(deps, conf); var equal = require('deep-equal'); + var utils = require('./utils').create(deps, conf); + var loopback = require('./loopback').create(deps, conf, utils); + var dnsCtrl = require('./dns-ctrl').create(deps, conf, utils); + var tunnelClients = require('./tunnel-client-manager').create(deps, conf, utils); + var loopbackDomain; - function iterateAllModules(action, curConf) { - curConf = curConf || conf; - var promises = curConf.ddns.modules.map(function (mod) { - return action(mod, mod.domains); - }); - - curConf.domains.forEach(function (dom) { - if (!dom.modules || !Array.isArray(dom.modules.ddns) || !dom.modules.ddns.length) { - return null; - } - - // For the time being all of our things should only be tried once (regardless if it succeeded) - // TODO: revisit this behavior when we support multiple ways of setting records, and/or - // if we want to allow later modules to run if early modules fail. - promises.push(dom.modules.ddns.reduce(function (prom, mod) { - if (prom) { return prom; } - return action(mod, dom.names); - }, null)); - }); - - return deps.PromiseA.all(promises.filter(Boolean)); - } - - async function getSession(id) { - var session = await deps.storage.tokens.get(id); - if (!session) { - throw new Error('no user token with ID "'+id+'"'); - } - return session; - } - var tunnelActive = false; async function startTunnel(tunnelSession, mod, domainList) { try { - var dnsSession = await getSession(mod.tokenId); + var dnsSession = await utils.getSession(mod.tokenId); var tunnelDomain = await tunnelClients.start(tunnelSession || dnsSession, domainList); var addrList; @@ -74,7 +45,7 @@ module.exports.create = function (deps, conf) { tunnelSession = await deps.storage.tokens.get(conf.ddns.tunnel.tokenId); } - await iterateAllModules(function (mod, domainList) { + await utils.iterateAllModules(function (mod, domainList) { if (mod.type !== 'dns@oauth3.org') { return null; } return startTunnel(tunnelSession, mod, domainList); @@ -90,7 +61,7 @@ module.exports.create = function (deps, conf) { async function checkTunnelTokens() { var oldTokens = tunnelClients.current(); - var newTokens = await iterateAllModules(function checkTokens(mod, domainList) { + var newTokens = await utils.iterateAllModules(function checkTokens(mod, domainList) { if (mod.type !== 'dns@oauth3.org') { return null; } var domainStr = domainList.slice().sort().join(','); @@ -188,10 +159,10 @@ module.exports.create = function (deps, conf) { } publicAddress = addr; - await iterateAllModules(function setModuleDNS(mod, domainList) { + await utils.iterateAllModules(function setModuleDNS(mod, domainList) { if (mod.type !== 'dns@oauth3.org' || mod.disabled) { return null; } - return getSession(mod.tokenId).then(function (session) { + return utils.getSession(mod.tokenId).then(function (session) { return dnsCtrl.setDeviceAddress(session, addr, domainList); }).catch(function (err) { console.log('error setting DNS records for', domainList.join(', ')); @@ -206,13 +177,13 @@ module.exports.create = function (deps, conf) { // this returns a Promise, but since the functions we use are synchronous // and change our enclosed variables we don't need to wait for the return. - iterateAllModules(function (mod, domainList) { + utils.iterateAllModules(function (mod, domainList) { if (mod.type !== 'dns@oauth3.org') { return; } prevMods[mod.id] = { mod, domainList }; return true; }, prevConf); - iterateAllModules(function (mod, domainList) { + utils.iterateAllModules(function (mod, domainList) { if (mod.type !== 'dns@oauth3.org') { return; } curMods[mod.id] = { mod, domainList }; @@ -250,7 +221,7 @@ module.exports.create = function (deps, conf) { return; } - return getSession(mod.tokenId).then(function (session) { + return utils.getSession(mod.tokenId).then(function (session) { return dnsCtrl.removeDomains(session, oldDomains); }); }).filter(Boolean)); @@ -275,7 +246,7 @@ module.exports.create = function (deps, conf) { return; } - return getSession(mod.tokenId).then(function (session) { + return utils.getSession(mod.tokenId).then(function (session) { return dnsCtrl.setDeviceAddress(session, publicAddress, newDomains); }); }).filter(Boolean)); diff --git a/lib/ddns/utils.js b/lib/ddns/utils.js new file mode 100644 index 0000000..6fe507c --- /dev/null +++ b/lib/ddns/utils.js @@ -0,0 +1,102 @@ +'use strict'; + +module.exports.create = function (deps, conf) { + + async function getSession(id) { + var session = await deps.storage.tokens.get(id); + if (!session) { + throw new Error('no user token with ID "' + id + '"'); + } + return session; + } + + function iterateAllModules(action, curConf) { + curConf = curConf || conf; + var promises = []; + + curConf.domains.forEach(function (dom) { + if (!dom.modules || !Array.isArray(dom.modules.ddns) || !dom.modules.ddns.length) { + return null; + } + + // For the time being all of our things should only be tried once (regardless if it succeeded) + // TODO: revisit this behavior when we support multiple ways of setting records, and/or + // if we want to allow later modules to run if early modules fail. + promises.push(dom.modules.ddns.reduce(function (prom, mod) { + if (prom) { return prom; } + return action(mod, dom.names); + }, null)); + }); + + curConf.ddns.modules.forEach(function (mod) { + promises.push(action(mod, mod.domains)); + }); + + return Promise.all(promises.filter(Boolean)); + } + + var tldCache = {}; + async function updateTldCache(provider) { + var reqObj = { + url: deps.OAUTH3.url.normalize(provider) + '/api/com.daplie.domains/prices' + , method: 'GET' + , json: true + }; + + var resp = await deps.OAUTH3.request(reqObj); + var tldObj = {}; + resp.data.forEach(function (tldInfo) { + if (tldInfo.enabled) { + tldObj[tldInfo.tld] = true; + } + }); + + tldCache[provider] = { + time: Date.now() + , tlds: tldObj + }; + return tldObj; + } + async function getTlds(provider) { + // If we've never cached the results we need to return the promise that will fetch the result, + // otherwise we can return the cached value. If the cached value has "expired", we can still + // return the cached value we just want to update the cache in parellel (making sure we only + // update once). + if (!tldCache[provider]) { + tldCache[provider] = { + updating: true + , tlds: updateTldCache(provider) + }; + } + if (!tldCache[provider].updating && Date.now() - tldCache[provider].time > 24 * 60 * 60 * 1000) { + tldCache[provider].updating = true; + updateTldCache(provider); + } + + return tldCache[provider].tlds; + } + + async function splitDomains(provider, domains) { + var tlds = await getTlds(provider); + return domains.map(function (domain) { + var split = domain.split('.'); + var tldSegCnt = tlds[split.slice(-2).join('.')] ? 2 : 1; + + // Currently assuming that the sld can't contain dots, and that the tld can have at + // most one dot. Not 100% sure this is a valid assumption, but exceptions should be + // rare even if the assumption isn't valid. + return { + tld: split.slice(-tldSegCnt).join('.') + , sld: split.slice(-tldSegCnt - 1, -tldSegCnt).join('.') + , sub: split.slice(0, -tldSegCnt - 1).join('.') + }; + }); + } + + return { + getSession + , iterateAllModules + , getTlds + , splitDomains + }; +}; From 11f2d37044f28432d8b8005abe356a3662d3a62a Mon Sep 17 00:00:00 2001 From: tigerbot Date: Wed, 8 Nov 2017 12:05:38 -0700 Subject: [PATCH 3/7] implemented dns-01 ACME challenges --- README.md | 6 ++ lib/ddns/challenge-responder.js | 122 ++++++++++++++++++++++++++++++++ lib/ddns/index.js | 2 + lib/tcp/index.js | 12 ++-- lib/tcp/tls.js | 3 +- 5 files changed, 138 insertions(+), 7 deletions(-) create mode 100644 lib/ddns/challenge-responder.js diff --git a/README.md b/README.md index fcf263b..ac2d160 100644 --- a/README.md +++ b/README.md @@ -271,6 +271,12 @@ tls: challenge_type: 'http-01' ``` +**NOTE:** If you specify `dns-01` as the challenge type there must also be a +[DDNS module](#ddns) defined for all of the relevant domains (though not all +domains handled by a single TLS module need to be handled by the same DDNS +module). The DDNS module provides all of the information needed to actually +set the DNS records needed to verify ownership. + ### tcp The tcp system handles both *raw* and *tls-terminated* tcp network traffic diff --git a/lib/ddns/challenge-responder.js b/lib/ddns/challenge-responder.js new file mode 100644 index 0000000..f82d635 --- /dev/null +++ b/lib/ddns/challenge-responder.js @@ -0,0 +1,122 @@ +'use strict'; + +// Much of this file was based on the `le-challenge-ddns` library (which we are not using +// here because it's method of setting records requires things we don't really want). +module.exports.create = function (deps, conf, utils) { + + function getReleventSessionId(domain) { + var sessId; + + utils.iterateAllModules(function (mod, domainList) { + // We return a truthy value in these cases because of the way the iterate function + // handles modules grouped by domain. By returning true we are saying these domains + // are "handled" and so if there are multiple modules we won't be given the rest. + if (sessId) { return true; } + if (domainList.indexOf(domain) < 0) { return true; } + + // But if the domains are relevant but we don't know how to handle the module we + // return false to allow us to look at any other modules that might exist here. + if (mod.type !== 'dns@oauth3.org') { return false; } + + sessId = mod.tokenId || mod.token_id; + return true; + }); + + return sessId; + } + + function get(args, domain, challenge, done) { + done(new Error("Challenge.get() does not need an implementation for dns-01. (did you mean Challenge.loopback?)")); + } + // same as get, but external + function loopback(args, domain, challenge, done) { + var challengeDomain = (args.test || '') + args.acmeChallengeDns + domain; + require('dns').resolveTxt(challengeDomain, done); + } + + var activeChallenges = {}; + async function removeAsync(args, domain) { + var data = activeChallenges[domain]; + if (!data) { + console.warn(new Error('cannot remove DNS challenge for ' + domain + ': already removed')); + return; + } + + var session = await utils.getSession(data.sessId); + var directives = await deps.OAUTH3.discover(session.token.aud); + var apiOpts = { + api: 'dns.unset' + , session: session + , type: 'TXT' + , value: data.keyAuthDigest + }; + await deps.OAUTH3.api(directives.api, Object.assign({}, apiOpts, data.splitDomain)); + + delete activeChallenges[domain]; + } + async function setAsync(args, domain, challenge, keyAuth) { + if (activeChallenges[domain]) { + await removeAsync(args, domain, challenge); + } + + var sessId = getReleventSessionId(domain); + if (!sessId) { + throw new Error('no DDNS module handles the domain ' + domain); + } + var session = await utils.getSession(sessId); + var directives = await deps.OAUTH3.discover(session.token.aud); + + // I'm not sure what role challenge is supposed to play since even in the library + // this code is based on it was never used, but check for it anyway because ... + if (!challenge || keyAuth) { + console.warn(new Error('DDNS challenge missing challenge or keyAuth')); + } + var keyAuthDigest = require('crypto').createHash('sha256').update(keyAuth || '').digest('base64') + .replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''); + + var challengeDomain = (args.test || '') + args.acmeChallengeDns + domain; + var splitDomain = (await utils.splitDomains(directives.api, [challengeDomain]))[0]; + + var apiOpts = { + api: 'dns.set' + , session: session + , type: 'TXT' + , value: keyAuthDigest + , ttl: args.ttl || 0 + }; + await deps.OAUTH3.api(directives.api, Object.assign({}, apiOpts, splitDomain)); + + activeChallenges[domain] = { + sessId + , keyAuthDigest + , splitDomain + }; + + return new Promise(res => setTimeout(res, 1000)); + } + + // It might be slightly easier to use arguments and apply, but the library that will use + // this function counts the arguments we expect. + function set(a, b, c, d, done) { + setAsync(a, b, c, d).then(result => done(null, result), done); + } + function remove(a, b, c, done) { + removeAsync(a, b, c).then(result => done(null, result), done); + } + + function getOptions() { + return { + oauth3: 'oauth3.org' + , debug: conf.debug + , acmeChallengeDns: '_acme-challenge.' + }; + } + + return { + getOptions + , set + , get + , remove + , loopback + }; +}; diff --git a/lib/ddns/index.js b/lib/ddns/index.js index adce60d..f7cabe6 100644 --- a/lib/ddns/index.js +++ b/lib/ddns/index.js @@ -8,6 +8,7 @@ module.exports.create = function (deps, conf) { var utils = require('./utils').create(deps, conf); var loopback = require('./loopback').create(deps, conf, utils); var dnsCtrl = require('./dns-ctrl').create(deps, conf, utils); + var challenge = require('./challenge-responder').create(deps, conf, utils); var tunnelClients = require('./tunnel-client-manager').create(deps, conf, utils); var loopbackDomain; @@ -312,5 +313,6 @@ module.exports.create = function (deps, conf) { , getDeviceAddresses: dnsCtrl.getDeviceAddresses , recheckPubAddr: recheckPubAddr , updateConf: updateConf + , challenge }; }; diff --git a/lib/tcp/index.js b/lib/tcp/index.js index fb69fc9..eb7fbbf 100644 --- a/lib/tcp/index.js +++ b/lib/tcp/index.js @@ -159,11 +159,13 @@ module.exports.create = function (deps, config) { }); } - modules = {}; - modules.tcpHandler = tcpHandler; - modules.proxy = require('./proxy-conn').create(deps, config); - modules.tls = require('./tls').create(deps, config, modules); - modules.http = require('./http').create(deps, config, modules); + process.nextTick(function () { + modules = {}; + modules.tcpHandler = tcpHandler; + modules.proxy = require('./proxy-conn').create(deps, config); + modules.tls = require('./tls').create(deps, config, modules); + modules.http = require('./http').create(deps, config, modules); + }); function updateListeners() { var current = listeners.list(); diff --git a/lib/tcp/tls.js b/lib/tcp/tls.js index 60868a0..34d899f 100644 --- a/lib/tcp/tls.js +++ b/lib/tcp/tls.js @@ -86,8 +86,7 @@ module.exports.create = function (deps, config, tcpMods) { , challenges: { 'http-01': require('le-challenge-fs').create({ debug: config.debug }) , 'tls-sni-01': require('le-challenge-sni').create({ debug: config.debug }) - // TODO dns-01 - //, 'dns-01': require('le-challenge-ddns').create({ debug: config.debug }) + , 'dns-01': deps.ddns.challenge } , challengeType: 'http-01' From d8cc8fe8e6bca021f1af260dbccccd1d705b6c4e Mon Sep 17 00:00:00 2001 From: tigerbot Date: Wed, 8 Nov 2017 12:08:36 -0700 Subject: [PATCH 4/7] fixed a few places ddns module.disabled wasn't handle properly --- lib/ddns/index.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/ddns/index.js b/lib/ddns/index.js index f7cabe6..6d75878 100644 --- a/lib/ddns/index.js +++ b/lib/ddns/index.js @@ -32,7 +32,9 @@ module.exports.create = function (deps, conf) { throw new Error('failed to lookup IP for tunnel domain "' + tunnelDomain + '"'); } - await dnsCtrl.setDeviceAddress(dnsSession, addrList[0], domainList); + if (!mod.disabled) { + await dnsCtrl.setDeviceAddress(dnsSession, addrList[0], domainList); + } } catch (err) { console.log('error starting tunnel for', domainList.join(', ')); console.log(err); @@ -207,8 +209,11 @@ module.exports.create = function (deps, conf) { // Then remove DNS records for the domains that we are no longer responsible for. await Promise.all(Object.values(prevMods).map(function ({mod, domainList}) { + // If the module was disabled before there should be any records that we need to clean up + if (mod.disabled) { return; } + var oldDomains; - if (!curMods[mod.id] || mod.tokenId !== curMods[mod.id].mod.tokenId) { + if (!curMods[mod.id] || curMods[mod.id].disabled || mod.tokenId !== curMods[mod.id].mod.tokenId) { oldDomains = domainList.slice(); } else { oldDomains = domainList.filter(function (domain) { @@ -232,6 +237,9 @@ module.exports.create = function (deps, conf) { // And add DNS records for any newly added domains. await Promise.all(Object.values(curMods).map(function ({mod, domainList}) { + // Don't set any new records if the module has been disabled. + if (mod.disabled) { return; } + var newDomains; if (!prevMods[mod.id] || mod.tokenId !== prevMods[mod.id].mod.tokenId) { newDomains = domainList.slice(); From ea010427e8a986f5c92ab926bf9ac19e15844a63 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 8 Nov 2017 14:14:06 -0700 Subject: [PATCH 5/7] Delete terms.sh --- terms.sh | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 terms.sh diff --git a/terms.sh b/terms.sh deleted file mode 100644 index 7c16ca6..0000000 --- a/terms.sh +++ /dev/null @@ -1,3 +0,0 @@ -# adding TOS to TXT DNS Record -daplie dns:set -n _terms._cloud.localhost.foo.daplie.me -t TXT -a '{"url":"oauth3.org/tos/draft","explicit":true}' --ttl 3600 -daplie dns:set -n _terms._cloud.localhost.alpha.daplie.me -t TXT -a '{"url":"oauth3.org/tos/draft","explicit":true}' --ttl 3600 From a8aedcbc31d9f10d37d5083ca6ddb4537eb86297 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 8 Nov 2017 14:14:41 -0700 Subject: [PATCH 6/7] Delete test-chain.sh --- test-chain.sh | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100755 test-chain.sh diff --git a/test-chain.sh b/test-chain.sh deleted file mode 100755 index 396d286..0000000 --- a/test-chain.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -node serve.js \ - --port 8443 \ - --key node_modules/localhost.daplie.me-certificates/privkey.pem \ - --cert node_modules/localhost.daplie.me-certificates/fullchain.pem \ - --root node_modules/localhost.daplie.me-certificates/root.pem \ - -c "$(cat node_modules/localhost.daplie.me-certificates/root.pem)" & - -PID=$! - -sleep 1 -curl -s --insecure http://localhost.daplie.me:8443 > ./root.pem -curl -s https://localhost.daplie.me:8443 --cacert ./root.pem - -rm ./root.pem -kill $PID 2>/dev/null From dd7bc74dad219f40cf849954c6b00c204c29f73d Mon Sep 17 00:00:00 2001 From: tigerbot Date: Wed, 8 Nov 2017 14:17:40 -0700 Subject: [PATCH 7/7] v1.1.5 --- CHANGELOG | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 8e0dfb1..097e511 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +v1.1.5 - Implemented dns-01 ACME challenges + v1.1.4 - Improved responsiveness to config updates * changed which TCP/UDP ports are bound to on config update * update tunnel server settings on config update diff --git a/package.json b/package.json index 7dde714..b3ddf4a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "goldilocks", - "version": "1.1.4", + "version": "1.1.5", "description": "The node.js webserver that's just right, Greenlock (HTTPS/TLS/SSL via ACME/Let's Encrypt) and tunneling (RVPN) included.", "main": "bin/goldilocks.js", "repository": {