Nginx 1.25.0: experimental HTTP/3 support
nginx.org
nginx.org
Can we give a huge round of applause to Maxim Dounin for community support and technical excellence?
Maxim and team are answering the deepest of technical questions patiently, to the point.
Every time I read into those threads I am impressed by Maxim. By his dry communication style, his precision, and his patience. It's inspiring.
When you get his reply (which is likely to be the case), you typically get the problem you presented described in his words: with precise language/terms. Very likely he provides a solution. Or a precise quote of reference docs or spec describing why something doesn't work, conceptually. Or a patch (he often replies with "here's a patch that should work", showing a clean diff).
So: https://mailman.nginx.org/pipermail/nginx/ -- highly recommended if you want to learn more about HTTP and web servers in general.
By the way: for forcing DNS re-resolution (mentioned in this thread here) in the open source version by the way there is a weird but extremely powerful workaround (which really works, we have used it in DC/OS successfully over years), also see https://github.com/dcos/dcos/tree/master/packages/adminroute....
It was of course Maxim who described this little trick in the mailing list in 2011 :-) https://forum.nginx.org/read.php?2,215830,215832#msg-215832
It's still highly relevant in 2023 for controlled dynamic service discovery with nginx.
I recently made the mistake/challenge to use nginx as a SSL reverse proxy for a bunch of non SSL services running in docker containers .
To my dismay there is no decent documentation for what I thought would be a common usage case - namely docker for everything including nginx.
* SSL was easy enough - I have a wild card certificate and nginx does have good docs on setting it up
* Docker networking was a bit of pain - but I solved it by making a separate network.
* proxy_pass is where I got really bogged down - I got to rewrite location /api and serve it at the internal network + port.
location /api/ {
rewrite ^/api(.*)$ $1 break;
# proxy_pass http://172.19.0.3; # also works
proxy_pass http://172.19.0.1:9090;
# most likely something else is needed for fix relative paths
}
So now I have the problem that proxy works for mysite/api/index.html but not for any relative paths ie static/css/style.css is not loading (but docker exec -it mycontainer curl does work)Maybe it is Google's fault but it seems near impossible to find a good AUTHORATIVE reference on setting up reverse proxy server with nginx.
But as the saying went with apache, if you have a routing problem, you can fix it with mod_rewrite - now you have two problems!
You might want to (re)read:
https://nginx.org/en/docs/http/request_processing.html
and skim:
https://nginx.org/en/docs/http/load_balancing.html
And (re)read:
https://nginx.org/en/docs/http/ngx_http_proxy_module.html#pr...
It seems dubious that you need any rewriting for your setup.
You might need a handful of server blocks (vhosts) with either proxy_pass or a few locations with proxy_pass?
So using a subdomain should solve routing issues - api.myproject.myorg.org instead of myproject.myorg.org/api ?
Two issues - my wildcard cert is *.myorg.org so not 100% it would cover subdomains of subdomains.
Second issue - you'd need to set up DNS for subdomain of subdomain, would you not?
Sadly DNS setup would require opening an uncertain to complete support ticket in myorg...
it won't:
https://www.rfc-editor.org/rfc/rfc2818#section-3.1
> Matching is performed using the matching rules specified by [RFC2459]. If more than one identity of a given type is present in the certificate (e.g., more than one dNSName name, a match in any one of the set is considered acceptable.) Names may contain the wildcard character * which is considered to match any single domain name component or component fragment. E.g., *.a.com matches foo.a.com but not bar.foo.a.com. f*.com matches foo.com but not bar.com.
My employer (Wikimedia, which is a non-profit) has been running all our server infra on pure open source for many years, for very principled reasons. We even publish all of our internal infrastructure config in public git repos as well. We're an open-source-only shop that's doing very non-hobby work. We have thousands of servers, we run our own CDN on multiple continents, we have somewhere around a billion unique users per month, and our average global rate of inbound HTTP requests is around 135K/second.
However, it keeps getting harder to stick to our open source principles every year as more projects shift towards open-core models with this kind of "Anyone who needs feature X is surely a big corporation making billions who doesn't mind running closed source software" type of thinking. It's not just bad for us, it's bad for the whole larger open source and Internet ecosystems if all the important bits for running at scale are locked up and hidden away in closed-source software.
Avoiding recurring payments you can't easily stop makes reasonable financial sense to me. Particularly for a business that doesn't sell anything.
Many people assume that developing it in-house is a one-time cost. However, in my experience, code is not an asset but a liability for which you will have to pay interest in the form of maintenance. More specifically, in this case there will most likely need to be adjustments made to the in-house extension as the oss nginx version it was built on top is being updated over the years.
My point here is that you should probably treat in-house code as a recurring cost, because in practice it usually is.
The question then becomes which recurring cost is higher: The license or the in-house maintenance?
Accepting these "sprinkles on top" licenses is highly foolish. I do hope that the true free and open source licensed software prevails in the server space. As many as possible must continue to hold out and push forward with new better and better scalable fully open source software.
Curious how deep does it go? Do you only use firmware in server which has open source code. Do you require all drivers to be open source?
> It should be possible to run large-scale important things on pure open source.
It is definitely possible. With enough developer time, you could create copy of any software. Every paid or open core software runs on the philosophy that it is cheaper to pay them rather than to build them.
Which brings to the core issue, developer time is not free or cheap. The fact is that software quality and reliability is dependent on the money that the software has means paid software quality in general should be higher. While wikimedia could get enough money through donation, no one donates to open source projects that could be counted in full time developer salary, likely not even wikipedia(correct me if wrong).
It has been built by extending Nginx with an OpenResty-based DNS resolver instead. You could even extract it away from Kong itself and use it standalone.
It took me almost exactly 3 minutes start to finish with letsencypt. Where 'start' was "I should stop putting that off" and typing "letsencrypt.com" into a browser, and 'finish' was nginx serving up https:// on all my domains. I'm genuinely curious what nginx could possibly do to improve the situation there.
You don't have to mess with having a .well-known always accessible on each domain, for example. Caddy does it for you and only when it's needed.
Nginx has a profit from big business that would require coordination to avoid multiple certificates. For comparison, it is worth noting that to ensure such coordination, Traefik requires an Enterprise plan and a separate agent. Such a business also often has mechanisms for storing certificates, so they do not necessarily want to integrate it into Nginx.
Still irritated that they ship it with an unprotected admin endpoint enabled by default on localhost:2019 that eats JSON and allows reconfiguration of the webserver like adding new sites that enable further attacks.
Put "{ admin off }" as a separate block in the root Caddyfile to disable it.
That said, see https://github.com/caddyserver/caddy/issues/5317, we are considering changing the default, but that would be a breaking change although it would likely be a transparent change for most users. The default that makes the most sense depends on the platform and installation method, which is why it's complicated.
Glad to hear you're considering changing the default!
It would be enough for me if Caddy generated a password (that's hard for attackers to predict) on first launch, set that in a config file it has write access to (autosave.json for example), and then required Basic auth using this password unless the configuration specified otherwise. My problem is that this endpoint is entirely unauthenticated.
We have yet to see this, but if we do see a practical demonstration, we're happy to reconsider.
The problem here is that a priviledged process (and yes, a process that has access to Port 80 and 443 is priviledged even if it doesn't run as root) gives unauthenticated control to less priviledged processes.
With good security design you don't lock things down as needed but instead start fully locked down and open up only the accesss you really need.
This. @mholt what we're arguing for is just to have secure defaults.
What's the pain?
https://doc.traefik.io/traefik/providers/docker/
(but preferring Caddy so far)
I should revisit Caddy and see how it gets on.
Well, for what it's worth, certbot is still pretty good: https://certbot.eff.org/
That said, with servers like Caddy supporting automatic TLS and even Apache httpd having built in support now with mod_md, Nginx feels more like an outlier for not supporting ACME out of the box: https://httpd.apache.org/docs/2.4/mod/mod_md.html
For my personal sites I actually use Apache because it's pretty good and has lots of modules (including OpenID Connect support for Keycloak etc.), but Nginx has always been really easy to install and setup, especially for serving static files (e.g. built front end apps) or being a basic reverse proxy.
Here's a bit more about how I use Apache: https://blog.kronis.dev/tutorials/how-and-why-to-use-apache-...
And a little bit about some of the occasional warts of Nginx: https://blog.kronis.dev/everything%20is%20broken/nginx-confi... (though otherwise it's fine)
That said using HTTP-01 instead of DNS-01 across multiple nodes with the same hostname is needlessly complex in most cases and DNS-01 doesn't always have the best support in web servers (Apache in particular is just like: "Yeah, we can run whatever script you want, but the contents and integrating with your DNS server is up to you").
There are quite a few other options besides certbot, I was just suggesting it as a "install + one liner" for adding auto renewing ssl certs to a server.
Or docker: https://eff-certbot.readthedocs.io/en/stable/install.html#ru...
Also, there's massive advantages to having TLS issuance built into the webserver, such as proper OCSP stapling, having an active process to trigger renewals as soon as a revocation happens (hearing about it via OCSP), solving the ACME TLS-ALPN challenge without extra steps, and unique features like On-Demand TLS that many SaaS companies are relying on to provide a custom domains feature to their customers. None of those things are possible unless it's tightly integrated in the webserver.
Vs just actually selling the software and having it work flawlessly with minimal work.
Always
Pay for the features you want. You will be better off for it. Expecting every company to follow the RedHat model is unsustainable.
If it's actually gated, not enough people care enough to get together and make and maintain a better one themselves.
Literally, at work (a startup), we use Traefik (which is horrible imho) instead of nginx (which I've used literally everywhere else) because the devs who originally started this project had never used it on a personal project.
So the issue isn't paying for it, it is about making it useful enough for personal projects that people use it for personal projects that it then gets used on professional projects. Right now, it is barely useful for personal projects unless you know what you're doing.
Do I personally need DNS SRV support? No, I have a templated Nomad config that will re-render and reload the nginx config if the consul upstreams change. Setting this up though is definitely a bigger hurdle than just specifying a Consul service as an upstream.
It seems they're more interested in high-touch sales (which is unlikely to happen on a dev team), vs. organic growth.
A vendor that releases some free software and some proprietary software is a proprietary software vendor. (This describes, for example, both Microsoft and nginx.)
Caddy has sane defaults for many settings and I only need to add a couple of response headers, drop the domain name, and where to proxy the requests to. It takes care of maintaining things like the list of TLSv1.2 ciphersuites.
Adding more domains takes two lines of config thanks to parameterized includes — another important thing nginx misses that has to be implemented manually via scripts using something like envsubst (or again, full-on automation which is problematic if many of your servers are just a little bit different from each other — for good reasons).
Apache httpd has it by the way: https://httpd.apache.org/docs/current/mod/mod_macro.html
The cherry on top is the OpenResty “community”. You know the one that call you an idiot for not pretending Lua is orgasmically good; the one that declares you “just” implement thousands of lines of code because there’s no possible way a useful library could exist; the one with the ecosystem full of awful, worse than js leftpad garbage that hasn’t been updated in three years.
Give me a break. F nginx and openresty.
We do pay them, for a bunch of boxes. But I can't afford to run their plus version in front of every microservice. Or even in front of our entry point server. That's 5 times as many machines, plus staged versions of the app, plus other services running on the same boxes.
If you're running anything that is not multithreaded, you're running a reverse proxy in front of it. And even then you can still improve server availability by running a reverse proxy.
I really wish companies would come up with SMB pricing to help us side project hackers out so we could grow into paying for the bigger plans. Also, I understand why they don't. SMB support is a huge PITA.
While one can talk about corporate contributions and basically ownership of some open source projects (the F5/Nginx case included), I also think that the funding is a big challenge for many projects out there.
Now, this is from 2019, but I found the article "Software below the poverty line" to be a useful if a bit grim look at the way things are: https://staltz.com/software-below-the-poverty-line.html
It will be interesting to see how their native implementation compares.
Implementing QUIC seems no fun and there are almost no implementations. Almost everybody claiming HTTP/3 support uses Quiche under the hood for QUIC (besides some outliers and AWS who are one of the very small group of orgs who have their own QUIC lib). I was under the impression NGINX kept building on the current foundations with Quiche.
A more or less full list of implementations is here:
https://github.com/quicwg/base-drafts/wiki/Implementations
But I personalty would have qualms with all the C implementations. Crypto and very complex protocols are nothing one should implement in C, imho. This cries for disaster. And what's left, especially in an usable state, is quite underwhelming currently.
Higher level libs / frameworks like Java's Netty and Rusts Hyper chose Quiche for QUIC.
The only other ready to use libs I've found were AIOQUIC for Python and quic-go. Those are also the only ones with a working WebTransport feature currently.
Looking on the above linked inter-op tables MS will need some time to catch up. QUIC is indeed complex.
Instead, we ship with our own debian repo, hosting graciously provided by CloudSmith https://caddyserver.com/docs/install#debian-ubuntu-raspbian. This is packaged via CD with GitHub Actions, and you can verify the authenticity of the build since it's signed by Matt Holt's GPG key.
For RHEL, it's in COPR, and that's the best you'll ever get for similar reasons https://copr.fedorainfracloud.org/coprs/g/caddy/caddy/
You can also build it from source using the `buildable` source archive artifact that includes all the deps so it can be built in air-gapped machine. Like its sibling artifacts, the source archive is signed, the signature is published, the signing certificate is available, and the checksum is published and also signed. What's so concerning?
[Disclaimer: Affiliated with Caddy]
This is actually enforced and there is processes in place to ensure that it stays that way.
This means that all new software that Debian packages is audited by a group of volunteers, the ftp-masters team, they check copyright, license and stuff like that.
If all binaries in Debian would vendor all of their dependencies, this would cause a lot extra and duplicated work for the ftp-masters, a team that already have a lot to do.
Same with security, if a popular go library needs to be patched to fix a security problem, then it's easier to do that in one place instead of patching it in N different binary packages.
And that goes without saying that Debian in general tends to release much slower than we'd be comfortable with. We don't want users running outdated and potentially insecure versions of Caddy. Best if users keep up to date by using a first-party installation method where we have control over the distribution pipeline.
That creates a bit of a split between Debian packages and language specific packages like rust crates, golang, python eggs or ruby gems.
There's some friction there, but the reasoning makes sense (but it is ok to disagree of course).
Based on the sibling comment that points out a volunteer has packaged caddy for Debian 12 - that work has been done?
Debian 12 (bookworm) will have it: https://packages.debian.org/bookworm/caddy
In practice, in the case of less popular packages, they do this on demand, when someone requests it in the bug tracker.
I want to emphasize that we have no contact at all with the people maintaining that Debian package, they've never reached out to discuss anything. We're absolutely open to that (and they know where to find us, not hard to contact us either on GitHub, Twitter, our forums, here, etc).
They will contact you if the need arises. It's the same usual process that has been used since the 90s to great success.
Maybe. That is indeed a risk with third party distribution.
But do note that Debian has its own support channels, and infrastructure (like the "reporting" tool: https://packages.debian.org/stable/utils/reportbug ).
It's ok to not want to support older versions or downstream packages (even if imo there is value in doing so) but don't be a drama queen and claim you can't.
Maybe it's pretty good for very popular packages, but how about the more niche ones (and when it comes to Debian I'm not sure how popular Caddy is in their view)?
The versions often feel arbitrary and don't line up. For example... I've been watching this for years:
https://bugs.launchpad.net/ubuntu/+source/firewalld/+bug/183...
This is more on the edge case side of things, too. Not really security patch related -- but a consequence of picking/choosing component levels
With this the firewall can randomly just stop being effective
When things aren't exactly upstream, the knives you're juggling get a little bigger and more unbalanced.
That's exactly why people (including me) tend to like LTS - no critical changes till next release. Upgrades for security with minimal surprises. I go further and often use unattended-upgrades on my Ubuntu fleet. I don't wanna version bumping until I explicitly ask for it as much as possible.
In two patch versions? With minor version unchanged?
Despite v2 supporting a very similar config file, the documentation doesn't emphasise that and tries to steer you towards its API, confusing JSON config syntax etc.
It's still a very good web server for very few lines of config, but I don't relish trying to learn something new from its docs like I used to.
I disagree. The docs don't do that. What you're probably talking about is the Getting Started guide https://caddyserver.com/docs/getting-started, which is a tour of how Caddy works, so it first shows you the "bare-metal" look at how it works, then it introduces the Caddyfile which allows you to simplify your user experience.
There's even a comparison table between the two https://caddyserver.com/docs/getting-started#json-vs-caddyfi... which explains when you'd want to use JSON (i.e. if you want programmable, API-based usage) or Caddyfile (i.e. for quick-and-simple hand-written config, 95% of users choose this).
I recommend starting from https://caddyserver.com/docs/caddyfile-tutorial or https://caddyserver.com/docs/caddyfile/concepts to get an idea of how the Caddyfile works.
If it is fixed now then that is great, but it took at least a year (I'm guessing more) after the launch of v2.
Definitely take another look now, there's been a ton of progress since then, 3 years ago. The initial v2 release was in May 2020, soon after the pandemic hit.
What I'm trying to say is that on launch v2 was not a good replacement for v1, especially in the docs area. I've seen quite a few major version bumps in OSS, and it feels docs is an area that is usually neglected, and for quite a while (at least a year, I'd say more) the v2 docs where not useful for someone who had not participated in the caddy v2 community discussions.
I'm just trying to describe what led me to go from a avid caddy proponent back to an nginx user.
I'll take another look next time I have a project that needs a http/s server!
> The Caddyfile seems easier than JSON, but should you always use it? There are pros and cons to each approach. The answer depends on your requirements and use case.
Followed by a table comparing the json and caddyfile approaches. What's the confusion?
I agree with this, v1 was an excellent user experience, I actually ran it on my servers for way too long. There was also the Wedge fork which might have helped with the EOL but sadly it didn't go anywhere: https://github.com/WedgeServer/wedge
> Despite v2 supporting a very similar config file, the documentation doesn't emphasise that and tries to steer you towards its API, confusing JSON config syntax etc.
Others responded to this a bit more, but while I agree that different config types are a confusing experience, at the same time I appreciate that they support something like that in the first place. I might not use it often, but it's nice that you can.
To say it again:
> It's all very confusing for someone looking in the docs for a solution and instead has to learn how everything works, whether they want to or not.
Maybe we should just un-index all docs pages except the intro pages.
1. A simple link like this: https://docs.k3s.io/installation/configuration#:~:text=For%2....
2. An aside at the top that informs the person where to get more information with a link.
3. An example showing the structure of the file.
4. A link to examples/tests in the repo showing how it can be used.
I would think that a simple aside in your template would work wonders. Maybe saying something like:
> See our page on [directives](link) to learn how to best use this in your configuration.
It’s too bad, I only moved away from caddy because of weird disconnection issues when reverse proxying certain apps.
https://dropbox.tech/frontend/investigating-the-impact-of-ht...
(Discussed at https://news.ycombinator.com/item?id=36027702.)
For the majority of our global users, HTTP3 reduced network latencies by 5-15ms (or 5%). While this is an improvement, these wins would appear negligible to the average user. At p90, however, HTTP3 demonstrated massive improvements, with a latency reduction of 48ms (or 13%)—and at p95, a reduction of 146ms (21%). This could be explained by the fact that HTTP3 is better at handling packet drops in parallel connections by eliminating head-of-line blocking; because packet drops are more likely to occur in networks with suboptimal connection quality, the benefits of HTTP3 are more visible at the higher percentiles.Of course it's true that QUIC is a complexity monster. OTOH HTTP/3 is actually quite simple when you have the QUIC layer implemented. A simple HTTP/3 server is no more than this:
https://github.com/aiortc/aioquic/blob/main/examples/http3_s...
People have definitely gotten more impatient over the years.
There was quite a bit of pushback on this in the IETF from financial institutions that think they have mandatory obligations to spy on their employees.
Here is a relevant HN discussion thread from 2016 about TLS 1.3, most of which applies to HTTP/3: https://news.ycombinator.com/item?id=12641880
To be fair, they do have mandatory requirements to prevent their employees from doing some things online in some cases. For example - some of the rules around coordination on a trading floor: https://www.sec.gov/rules/sro/nyse/2017/34-80374-ex5.pdf
Or - in many cases they are legally required to retain a copy of communications sent, and there are a large number of sites that offer diverse services banks want that also happen to have "chat/email" hidden as a feature. That's legally communication, and they often can't collect and retain it.
Long story short - they don't really care so much, because many of them are already doing this collection now in other ways... my first job out of college 13 years ago was helping large banks transition this monitoring and policy enforcement to browser extensions (Guess who was grumbling about the MV3 changes in chrome, for very similar reasons).
Now they're moving to directly adding the monitoring in the OS/Kernel
Does this mean financial software has root-kits build in? Good to know!
So this means every banking computer is fundamentally compromised at the OS level. Let' see how long it takes until this backfires. Could be a nice global firework when it goes off.
Who exactly builds those root-kits? How good are they protected against supply chain attacks?
I assume Google and co. will fix this if it ever starts to seriously benefit platforms like KiwiFarms, which in the last year was being blocked by CenturyLink, a major US ISP. I also predict these QUICfixes will be met with broad enthusiasm by HNers.
plus, in real-world use cases it's probably a perf loss running TLS like this fwiw.
Are there any prove points for this claim besides this shout-out?
QUIC is more like a modern TCP. What you do with such a protocol is unrelated to the protocol as such. You can open secure connections and stream data with it. That's all. Everything else is on the application side.
> Something like dns-over-http/3 is, allegedly, referred to internally at Google as the anti-Pi-hole
This claim sounds like anti QUIC FUD.
Nothing can stop you from using a Pi-hole like device as your primary DNS resolver!
(OK, I admit Google could try to hard-code their DNS servers in Chrome. But I'm very unsure they would make it through the following shit storm in one piece.)
It dates back to a more draconic era of firewall management, but has also worked its way into DHCP (https://en.wikipedia.org/wiki/Web_Proxy_Auto-Discovery_Proto...).
More relevantly, there's no reason they couldn't do the same before HTTP/3. Even with DNS traffic hijacking, they could just as well do DNS-over-TLS. Infiltrating advertising-related DNS is completely orthogonal to HTTP/3; agreed that the gp comment is FUD.
What? What is your source on this? How does the protocol stop you from using e.g. uBlock to filter the domains at the application level?
It's the main reason why I'm thinking about migrating everything to Caddy.
In this particular case, the ngx_http_api module offers way more monitoring options but is gated behind nginx Plus.
Only "serious" companies need that (as a hobby project maintainer you probably don't need it)... and if you really want to make sure you don't give them a cent, you can build your own monitoring on top of nginx easily enough.
But if Caddy can serve metrics which I can then collect with for example Grafana, that’s very interesting!
But caveat: we don't have maintainers who understand metrics currently, so it's nowhere near as good as we'd hope it to be. Help wanted!
That said, I've been running it since the early days, on super heavy production loads and never felt the need to have some more "decent" metrics out of it. I assume you're referring to real time metrics here.
Most if not everything can be gathered from the logs, which nginx is very flexible with.
I fail to understand why some missing metrics in a great product make you think to migrate everything to Caddy?
My tests in controlled environments show that caddy is absolutely fine for my workload and has perks that make my life easier. Some have been mentioned in this thread already.
Metrics is a must have in our case as we have many things to manage, few people to maintain things and alerts are the only way to grow. For alerts you need metrics.
No product would ever cater to each and every need, and that's fine.
You have choice, if something doesn't satisfy you, you can sometimes fix the problem, improve the product or write your own module (when its opensource), or switch to another solution. Look at the opentelemetry comment below as another possibility to get what you want done.
There are so many choices today, and you enjoy the freedom of choice. If something else works better for you, use that other something.
There's no need to complain.
Not sure about the status quo in NGINX. They had a HTTP/3 implementation on Quiche (a Rust lib implementing QUIC, and HTTP/3 as a side project, but afik NGINX never used that part, only the QUIC protocol implementation). But after reading a post here I'm not sure they still use Quiche (and with it BoringSSL). Maybe they have now an own QUIC implementation (with support for other crypto libs). But given QUIC is complex and therefore hard to implement I would actually expect they still base of their HTTP/3 efforts on the by now quite popular Quiche library. But I'm maybe wrong in this regard. Have to look into that.
AFAIK that was a Cloudflare project, and since then they moved away from nginx due to it's stagnation.
Footnote: I actually love musl, just for my own software that explicitly targets it and is validated against it.
Most software isn't written with Musl in mind! And that shows.
You can run in all kinds of extremely hard to debug issues and especially massive performance problems. Stuff may slow down to fractions of the performance comparison to regular Linux distros.
If you want maximal small containers go with Distroless.
QUIC: https://en.wikipedia.org/wiki/QUIC
DoQ: DNS-over-QUIC: https://en.wikipedia.org/wiki/Domain_Name_System#Transport_p...
RFC9520: DNS over Dedicated QUIC Connections: https://datatracker.ietf.org/doc/html/rfc9250
I haven't used it so I can't vouch for the quality.
Update: I guess, technically, HTTP 3 is the protocol built on top of the QUIC protocol.
[1] https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/...
[2] https://www.w3.org/2011/04/webrtc/wiki/images/6/69/Media_ove...
AFAIK nobody ever implemented WebRTC on top of QUIC. The new kid on the block is called WebTransport.
WebTransport could be described in short as "WebRTC / WebSocket, the good parts". It's way simpler than WebRTC and solves some issues with WebSocket like the lack of low-latency unreliable transport (WebTransport can send Datagrams without having to use a reliable connection channel for that). A big difference to WebRTC is: All the STUN / TURN complexity is gone. WebTransport gives you at the end more or less almost "raw" QUIC streams or datagrams. It's almost like a socket interface for web user agents, only with all the features of QUIC.
Given you have already HTTP/3 (which implies you have also QUIC) WebTransport is a pretty simple and slim addition on top:
https://datatracker.ietf.org/doc/html/draft-ietf-webtrans-ht...
(The only thing I'm missing is client authentication. It would be really good to do this in-band, and for example allow to send client certs with the WebTransport CONNECT request. For some reason this was left out on purpose. Only that I did not find out why actually.)
What I'm not sure about is who good WebTransport would be in a P2P scenario. But given libp2p implemented WebTransport it would seem that it's good for that also. (So could replace WebRTC completely.)
but STUN / TURN is there for a reason. I always thought of the P2P scenario as the main use case for WebRTC.
https://w3c.github.io/p2p-webtransport/
> This specification extends the WebRTC [WEBRTC], ORTC [ORTC] and WebTransport [WEBTRANSPORT] APIs to enable peer-to-peer operation using QUIC [RFC9000]. This specification supports the exchange of arbitrary data with remote peers using NAT-traversal technologies such as ICE, STUN, and TURN. As specified in [RFC7983bis], QUIC can be multiplexed on the same port as RTP, RTCP, DTLS, STUN and TURN, allowing the API defined in this specification to be utilized along with the functionality defined in [WEBRTC] and [ORTC] including communication using audio/video media and SCTP data channels.
It implements the missing parts on top of WebTransport. I was especially sad that WT doesn't do client authentication. You can't send credentials with a CONNECT request. But this thingy adds exactly this. Great!
Also having some standardized way to open QUIC Streams through NAT sounds nice. (Even I think the proper fix for this issues would just be IPv6.)
Frankly it's very early days. It's not implemented, and not even considered currently.
> It is not a W3C Standard nor is it on the W3C Standards Track.
But as I'm currently into implementing a WebTransport lib maybe I should try to add the features form this draft. Would be funny to have a P2P ready WT lib. Only that NAT traversal part I would leave out for now, I guess, as I'm not sold on the idea that this complexity is strictly needed. NAT just needs to die finally…
> it cannot establish a connection to a non-CA TLS endpoint
That's plain wrong. Self signed certificates and internal CAs work just fine.
The whole point of HTTP/3 is: You can't establish an unencrypted connection. And that's a very good idea!
I'm running at the very moment a HTTP/3 development server on this machine here. I did not have to ask anybody for allowance to do so.
(Actually I'm right now building a WebTransport server. WebTransport has even more strict rules for certificates but even there it's still possible to connect to an endpoint that uses a self-signed cert that isn't signed by any CA cert.)
Inform me then. Did you compile boringssl or openssl+quic or whatever TLS lib yourself and enable the proper flags so you could do this? You and I both know that doesn't count. You certainly can't if you're using a binary distributed browser made by Microsoft, Google, Apple, or even Mozilla. If you look at the traffic you're sending it's probably hitting the HTTP/1.1 endpoint first then going to http/3 for further traffic.
Internal CAs work but that's internal and irrelevant to being able to host a visitable website to a random persons.
>You can't establish an unencrypted connection. And that's a very good idea!
That's a very good idea for incorporated persons and their websites that involve transfers of money and other private details. The trade-off is that the entire system is more fragile and complex and needs continous constant updating and approval from a third party corporation. These are very bad traits for making a personal website that can last more than a few years. It's bad for the longevity of the web and so it's health.
No, I did not.
> You certainly can't if you're using a binary distributed browser made by Microsoft, Google, Apple, or even Mozilla.
That's the part that simply isn't true.
I'm using for testing a Chromium derivative with a stock Blink engine (Vivaldi).
You can use self signed certs just fine. (But using a custom CA set up by `mkcert` is actually the simplest way for a dev setup).
Chrome has a `--ignore-certificate-errors-spki-list=${CERT_HASH}` flag enabling the use of self signed certs for HTTP/3, given the right cert hash.
I admit that this isn't something an average user could do. You need to invoke some `openssl` voodoo to generate the hash appropriate for usage with the mentioned browser flag from a given cert. But that's actually a feature, imho, as it makes talking someone into casually starting their browser with this flag for some arbitrary domain quite difficult, or in a lot of cases even impossible. (And the addition of CA certs by an unauthorized user can be prevented by other means).
For WebTransport (where it's anticipated that the endpoints could be quite well some ephemeral machines, maybe even without DNS records) you can pass just a cert's sha1 fingerprint to the `WebTransport` constructor on the user agent. This will make the browser accept the designated (self signed) cert without any further checks.
> If you look at the traffic you're sending it's probably hitting the HTTP/1.1 endpoint first then going to http/3 for further traffic.
No, I don't even have a HTTP/1 (or /2) endpoint in this setup. I need to pass `--origin-to-force-quic-on=localhost` explicitly as Google's engine is otherwise too stupid to recognize the HTTP/3 server. (ALPN seems to have currently also issue besides this, judging from some comments online. But I'm not using this mechanism anyway currently, and have just a pure HTTP/3 endpoint.)
> That's a very good idea for incorporated persons and their websites that involve transfers of money and other private details.
It's a good idea in general.
Have you ever considered that alone knowing who visits which website when is privacy related information?
Meta-data is often even considered more interesting than the actual data. The USA stated boldly things like: "We kill people based on metadata"…
Encrypting just everything is the only way forward! Otherwise sending or receiving encrypted traffic already would be a data point as such—a data point which could be used against some.
> The trade-off is that the entire system is more fragile and complex […]
Yes, it's a trade-off.
Also, I think that the CA system is fundamentally broken.
But this is nothing new coming with QUIC!
> […] and needs continous constant updating and approval from a third party corporation. These are very bad traits for making a personal website that can last more than a few years.
I'm not buying this argument any more. Before something like Let's Encrypt you've been right with that argument. But since then this point is moot.
You don't need any "approval", you just need to prove that you own the domain for which you like to have a cert. This is a completely automatic and anonymous process. Set up once it will work as long as something like Let's Encrypt exists. (And Let's Encrypt very likely won't disappear anytime soon!)
> It's bad for the longevity of the web and so it's health.
No, it makes no difference.
An unmaintained website will go away sooner or later anyway. You need at least to pay bills to keep it up. At least…
But besides that this point is also moot. Nothing of this whole digital stuff will last very long. Ever tried to open an ancient file format? By ancient I don't mean 20 000 years old like some stone carvings, I don't mean 2 000 years like some papyrus role, not even 200 years like some a little bit older book, I mean a file as "ancient" as something made by some firm that went out of business 20 years ago…
And talking about "health" in the context of the web given the current state of the internet is a joke in its own. I don't want to offend anybody but that's just the truth. The web is broken beyond repair. And that's mostly not even for technical reasons. (Even there would be also more than enough of those. But QUIC is actually one of the technologies that are more or less sane—even complex—and a step in the right direction. Every middle-box it kills on its way is a huge win for the net!)
>Have you ever considered that alone knowing who visits which website when is privacy related information?
I get this a lot. To be clear, I'm not against encryption. I am against only allowing connections to sites which are encrypted using a third party incorporated entity's tools. HTTP+HTTPS is definitely the way to go so that people can chose the HTTPS endpoint if they want, but still access the site if that fails for technical (lack of maintaince when acme2 came around and acme1 dropped, etc, etc) or malicious reasons. The problem is that HTTP/3 only allows the one mode.
> But this is nothing new coming with QUIC!
Correct. But HTTP/3 on QUIC does make it much, much more of a problem because only 0.000001% of worldwide users are going to be passing --ignore-certificate-errors-spki-list=${CERT_HASH} to chrome after their browser first prevents the link from working.
>An unmaintained website will go away sooner or later anyway. You need at least to pay bills to keep it up. At least…
I know too many late 90s/early 2000s websites to count that haven't been touched in the last decade+. And I know they would not exist not if they relied on HTTPS only or HTTP/3.
This opens up the way to downgrade attacks.
Imho there should not be any unencrypted traffic on the net. Not even the technical possibility for that as long as you're using std. software. Call me an old school crypto-nerd but I just don't see any alternative. Everything else is going to get exploited. There is just too much initiative form very powerful fractions. So crypto needs to be enfoced at a very fundamental level. Security by design, privacy by design!
> HTTP/3 on QUIC does make it much, much more of a problem because only 0.000001% of worldwide users are going to be passing `--ignore-certificate-errors-spki-list=${CERT_HASH}` to chrome after their browser first prevents the link from working.
I agree that the requirement for CA signed certs is sub-optimal.
I for my part only care about the (forced) encryption.
And that's actually all QUIC requires. The protocol does not force checking certificate chains. (Otherwise the above mentioned switch wouldn't be possible while having a complaint implementation.)
The check of the cert chain is a implementation detail of the HTTP/3 stack in browsers AFAIK. (I could be wrong here and HTTP/3 may require "WebPKI" trusted certs; I didn't read all of the spec until now.)
I would love it of course if the CA based "WebPKI" would get replaced by something decentral with self service options.
Having CA certs you didn't install yourself in your browser (after sorrow consideration!) is a mayor security risk, imho. Just look at the list… You're "trusting" in the end more of less everybody with money and power on this planet. That's not how it should be. But I don't know how an alternative could look like. (And I guess nobody really knows. Maybe you?)
But something like Let's Encrypt, which only checks the part that actually matters—namely whether you own the domain for which you like a cert, no further questions asked—is imho as close to "decentralized self-service" as it could get at the moment.
> I know too many late 90s/early 2000s websites to count that haven't been touched in the last decade+. And I know they would not exist not if they relied on HTTPS only or HTTP/3.
Why do you think HTTP/3 would have prevented the sites to last as long as they did?
Getting and renewing certs is an one-time setup. I'm pretty sure it will just work for the years to come once up and running.
>Why do you think HTTP/3 would have prevented the sites to last as long as they did?
If the site was HTTP/3 only then their cert would have expired or their update system broken and browsers would not be able to access the site.
While it is a performance and security burden, people reject .htaccess is too readily. It has enabled users who aren't quite programmers to assemble sites out of web applications and components that live in different subdirectories. It has clear value. (Not that I think nginx should implement it.)
In that case you would still need some way to trigger a reload of the htaccess, right?
If so, is there a usability difference to just including nginx configs on the same locations?
It doesn't need to, though.
These days you only need .htaccess for compatibility with old PHP apps. Stacking another instance of Apache on top feels bloated.