From de966dd2860166801941b757805806c26ccc46e8 Mon Sep 17 00:00:00 2001 From: Martijn de Boer Date: Thu, 15 Oct 2020 15:30:25 +0200 Subject: remove ALPN protocol ID When setting the ALPN protocol the gemini browser Kristall won't connect properly. While removing this, per suggestion in #5, connection seems to be working properly. more info: https://lists.orbitalfox.eu/archives/gemini/2020/002848.html With this commit, - the server will only verify the ALPN ID to be `gemini` if the client has sent one - the server won't send the ALPN ID anymore closes #5 --- server.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 88d3a2d..a67d340 100644 --- a/server.js +++ b/server.js @@ -21,7 +21,7 @@ const createGeminiServer = (opt = {}, onRequest) => { } = { cert: null, key: null, passphrase: null, tlsOpt: {}, - verifyAlpnId: alpnId => alpnId === ALPN_ID, + verifyAlpnId: alpnId => alpnId ? alpnId === ALPN_ID : true, ...opt, } @@ -85,7 +85,9 @@ const createGeminiServer = (opt = {}, onRequest) => { } const server = createTlsServer({ - ALPNProtocols: [ALPN_ID], + // Disabled ALPNProtocols to mitigate connection issues in gemini + // clients as reported in #5 + // ALPNProtocols: [ALPN_ID], minVersion: MIN_TLS_VERSION, // > Usually the server specifies in the Server Hello message if a // > client certificate is needed/wanted. -- cgit v1.3