From 2bc162b388aa7b139a8807d4479030e4b168f2f7 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Wed, 3 Mar 2021 13:58:44 +0100 Subject: add linter, minor tweaks, 1.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add debug logging to connect() - readme: document verifyAlpnId() 📝 --- readme.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 3b3ff89..7739b06 100644 --- a/readme.md +++ b/readme.md @@ -114,6 +114,9 @@ createServer(opt = {}, onRequest) cert: null, key: null, passphrase: null, // additional options to be passed into `tls.createServer` tlsOpt: {}, + // verify the ALPN ID requested by the client + // see https://de.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation + verifyAlpnId: alpnId => alpnId ? alpnId === ALPN_ID : true, } ``` @@ -139,6 +142,9 @@ request(pathOrUrl, opt = {}, cb) connectTimeout: 60 * 1000, // 60s // additional options to be passed into `tls.connect` tlsOpt: {}, + // verify the ALPN ID chosen by the server + // see https://de.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation + verifyAlpnId: alpnId => alpnId ? (alpnId === ALPN_ID) : true, } ``` -- cgit v1.3