René's URL Explorer Experiment


Title: Allow ALPN fallback · Issue #45056 · nodejs/node · GitHub

Open Graph Title: Allow ALPN fallback · Issue #45056 · nodejs/node

X Title: Allow ALPN fallback · Issue #45056 · nodejs/node

Description: What is the problem this feature will solve? I want to create a TLS server that uses ALPN but accepts all protocols from the client. There's all sorts of interesting cases for this, but the simplest is when the server is really a TLS-ter...

Open Graph Description: What is the problem this feature will solve? I want to create a TLS server that uses ALPN but accepts all protocols from the client. There's all sorts of interesting cases for this, but the simples...

X Description: What is the problem this feature will solve? I want to create a TLS server that uses ALPN but accepts all protocols from the client. There's all sorts of interesting cases for this, but the sim...

Opengraph URL: https://github.com/nodejs/node/issues/45056

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow ALPN fallback","articleBody":"### What is the problem this feature will solve?\n\nI want to create a TLS server that uses ALPN but accepts _all_ protocols from the client.\r\n\r\nThere's all sorts of interesting cases for this, but the simplest is when the server is really a TLS-terminating proxy of some kind that's just forwarding data upstream. ALPN is necessary in these cases because some clients (e.g. GRPC) will completely fail to connect to a server that does not explicitly support their protocol of choice. I suspect that'll become even more common in future as ALPN becomes widespread outside HTTP/2.\r\n\r\nMy case is a little more specific: my server is a proxy that supports network debugging, and I specifically want to accept all protocols so that I can capture and debug unexpected traffic, rather than rejecting it at the door. I think this applies more widely though.\n\n### What is the feature you are proposing to solve the problem?\n\nAn additional TLS server option like `allowALPNFallback: \u003cboolean>`.\r\n\r\nIf set, at the end of [the SelectALPNCallback callback](https://github.com/tniessen/node/blob/21958e4eaa6d57f4f6afb766ea2cf3a34d7180db/src/crypto/crypto_tls.cc#L221-L256) if `status == OPENSSL_NPN_NEGOTIATED` then `SSL_TLSEXT_ERR_OK` should be returned instead of `SSL_TLSEXT_ERR_ALERT_FATAL`, thereby accepting the `out` value set by `SSL_select_next_proto` in the lines above.\r\n\r\nI believe this works because the feature described is already the default behaviour of OpenSSL's `SSL_select_next_proto` function, which sets `out` in this callback to the client's first protocol preference by default if no matching server protocol is found. Docs here: https://www.openssl.org/docs/man3.0/man3/SSL_select_next_proto.html. The only reason that this doesn't work already is the additional check the Node adds, which sends an alert and kills the connection instead.\n\n### What alternatives have you considered?\n\nI've opened this because this behaviour was recently changed in Node 19 in https://github.com/nodejs/node/pull/44031. Previously in many cases it was possible to at least detect and in some cases fudge these connections because the connection continued (without an ALPN response but without failure) despite the lack of ALPN protocol agreement. Now it will always be rejected explicitly, which makes this use case more complicated.\r\n\r\nI do agree the new behaviour in #44031 is correct as the default, but I just don't think that the RFC quoted there mandates this strict behaviour for _all_ TLS servers. As quoted in that PR, the RFC says:\r\n\r\n> It is expected that a server will have a list of protocols that it supports, in preference order, and will only select a protocol if the client supports it. In that case, the server SHOULD select the most highly preferred protocol that it supports and that is also advertised by the client. In the event that the server supports no protocols that the client advertises, then the server SHALL respond with a fatal \"no_application_protocol\" alert.\r\n\r\nIn my case, the server effectively supports all protocols (i.e. it doesn't care, it's just proxying raw traffic) and so it's not required to send the alert - it's reasonable to accept the client's preference for unknown protocols.\r\n\r\nA more general alternative would be an ALPN callback, to allow TLS servers to implement arbitrary logic like this or other ways to pick the ALPN protocol from JS directly. Imo that's interesting and all very cool, but not really necessary, and quite a bit more complicated, so probably not worthwhile. Could be worth considering if others see a good use cases for this though.","author":{"url":"https://github.com/pimterry","@type":"Person","name":"pimterry"},"datePublished":"2022-10-18T16:52:28Z","url":"https://github.com/nodejs/node/issues/45056"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b9f5393f-ba93-33f3-ad44-1c1e007c4155
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB45E:9B30C:5FE44A:832AC4:6AED8A90
html-safe-nonce39b4680badb97177df459298ea286a84c40367e619c920335ebfab1cdcf951a8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDVFOjlCMzBDOjVGRTQ0QTo4MzJBQzQ6NkFFRDhBOTAiLCJ2aXNpdG9yX2lkIjoiODkyNTA5NDI4MjI5MjcyNjQxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf85b835a7d75e08c08f22c81714b58a61670135635605e37cb9d97db1ff20f95
hovercard-subject-tagissue:1413544489
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/45056/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d80ef28954347002d2779dcb35cf88c08c20a8bbb6314dc9ae13c3a5756937e9/nodejs/node/issues/45056
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d80ef28954347002d2779dcb35cf88c08c20a8bbb6314dc9ae13c3a5756937e9/nodejs/node/issues/45056
og:image:altWhat is the problem this feature will solve? I want to create a TLS server that uses ALPN but accepts all protocols from the client. There's all sorts of interesting cases for this, but the simples...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepimterry
hostnamegithub.com
expected-hostnamegithub.com
None56fb42677ae87ed3e64410323d67980aa65d0485568a7858f874e7edfc6d1c11
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9c9a37e2423ed382cf39f70b5aa4b4858b40a3b0
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/45056#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F45056
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F45056
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/45056
Reloadhttps://github.com/nodejs/node/issues/45056
Reloadhttps://github.com/nodejs/node/issues/45056
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues654 (654)https://github.com/nodejs/node/issues
Pull requests662 (662)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/45056
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/45056
Allow ALPN fallbackhttps://github.com/nodejs/node/issues/45056#top
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
tlsIssues and PRs related to the tls subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22tls%22
https://github.com/pimterry
pimterryhttps://github.com/pimterry
on Oct 18, 2022https://github.com/nodejs/node/issues/45056#issue-1413544489
the SelectALPNCallback callbackhttps://github.com/tniessen/node/blob/21958e4eaa6d57f4f6afb766ea2cf3a34d7180db/src/crypto/crypto_tls.cc#L221-L256
https://www.openssl.org/docs/man3.0/man3/SSL_select_next_proto.htmlhttps://www.openssl.org/docs/man3.0/man3/SSL_select_next_proto.html
#44031https://github.com/nodejs/node/pull/44031
#44031https://github.com/nodejs/node/pull/44031
pimterryhttps://github.com/pimterry
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
on Oct 18, 2022https://github.com/nodejs/node/issues/45056#event-7613646711
https://github.com/bnoordhuis
bnoordhuishttps://github.com/bnoordhuis
on Oct 18, 2022https://github.com/nodejs/node/issues/45056#issuecomment-1282865837
bnoordhuishttps://github.com/bnoordhuis
tlsIssues and PRs related to the tls subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22tls%22
on Oct 18, 2022https://github.com/nodejs/node/issues/45056#event-7614564486
https://github.com/pimterry
pimterryhttps://github.com/pimterry
on Oct 19, 2022https://github.com/nodejs/node/issues/45056#issuecomment-1284312693
#45075https://github.com/nodejs/node/pull/45075
https://github.com/tniessen
tniessenhttps://github.com/tniessen
on Oct 19, 2022https://github.com/nodejs/node/issues/45056#issuecomment-1284352719
@pimterryhttps://github.com/pimterry
@bnoordhuishttps://github.com/bnoordhuis
#45075https://github.com/nodejs/node/pull/45075
#45075https://github.com/nodejs/node/pull/45075
https://github.com/pimterry
pimterryhttps://github.com/pimterry
on Oct 20, 2022https://github.com/nodejs/node/issues/45056#issuecomment-1285339258
#45075https://github.com/nodejs/node/pull/45075
#45075https://github.com/nodejs/node/pull/45075
httptoolkit.comhttps://httptoolkit.com/
https://github.com/pimterry
pimterryhttps://github.com/pimterry
on Oct 20, 2022https://github.com/nodejs/node/issues/45056#issuecomment-1285346462
https://github.com/bnoordhuis
bnoordhuishttps://github.com/bnoordhuis
on Oct 20, 2022https://github.com/nodejs/node/issues/45056#issuecomment-1286202833
https://github.com/pimterry
pimterryhttps://github.com/pimterry
on Oct 21, 2022https://github.com/nodejs/node/issues/45056#issuecomment-1286953591
https://www.openssl.org/docs/man3.0/man3/SSL_select_next_proto.html#NOTEShttps://www.openssl.org/docs/man3.0/man3/SSL_select_next_proto.html#NOTES
targoshttps://github.com/targos
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
on Oct 22, 2022https://github.com/nodejs/node/issues/45056#event-15229555504
targoshttps://github.com/targos
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
on Oct 22, 2022https://github.com/nodejs/node/issues/45056
https://github.com/pimterry
pimterryhttps://github.com/pimterry
on Oct 26, 2022https://github.com/nodejs/node/issues/45056#issuecomment-1292016409
#45190https://github.com/nodejs/node/pull/45190
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Apr 25, 2023https://github.com/nodejs/node/issues/45056#issuecomment-1521031663
feature request management documenthttps://github.com/nodejs/node/blob/HEAD/doc/contributing/feature-request-management.md
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Apr 25, 2023https://github.com/nodejs/node/issues/45056#event-9087098284
https://github.com/pimterry
pimterryhttps://github.com/pimterry
on Apr 25, 2023https://github.com/nodejs/node/issues/45056#issuecomment-1521602091
#45190https://github.com/nodejs/node/pull/45190
#45075https://github.com/nodejs/node/pull/45075
#45190https://github.com/nodejs/node/pull/45190
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Apr 26, 2023https://github.com/nodejs/node/issues/45056#event-9097976075
https://github.com/pimterry
pimterryhttps://github.com/pimterry
on Jun 28, 2023https://github.com/nodejs/node/issues/45056#issuecomment-1611637156
#45190https://github.com/nodejs/node/pull/45190
pimterryhttps://github.com/pimterry
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 28, 2023https://github.com/nodejs/node/issues/45056#event-9666208023
avivkellerhttps://github.com/avivkeller
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
on Sep 13, 2024https://github.com/nodejs/node/issues/45056
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/45056
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/45056
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
tlsIssues and PRs related to the tls subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22tls%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.