HTTP/3 Quic support in MacOS?

I work with .Net Core a lot, and whenever I look at docs like [censored] that say "HTTP/3 is not currently supported on macOS but may be available in a future release."

So when will it be supported? I've seen where it's an experimental feature in Safari, and has to be explicitly enabled for it to work...when will be a full part of the OS so that third parties can make use of it in their tech stacks?

It depends on what you mean by “full part of the OS”. From the perspective of a native app developer, you can opt into to HTTP/3 with a simple flag. For example, when I run the code at the end of this response on macOS 13 it prints:

protocols: ["h3", "h3", "h3"]
status: 200
bytes: 13484

showing that all 3 transactions in this request ran over HTTP/3.

Note This test was inspired by the code in TN3102 HTTP/3 in your app.

Or are you asking specifically about Safari?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

import Foundation

@main
class Main: NSObject, URLSessionTaskDelegate {

    func run() async throws {
        let config = URLSessionConfiguration.default
        config.requestCachePolicy = .reloadIgnoringLocalCacheData
        let session = URLSession(configuration: config, delegate: self, delegateQueue: .main)
        // We are leaking session here but that’s OK in this test project.

        print("will start task")
        let url = URL(string: "https://google.com")!
        var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: 60.0)
        request.assumesHTTP3Capable = true
        let (data, response) = try await session.data(for: request)
        print("status:", (response as! HTTPURLResponse).statusCode)
        print("bytes:", data.count)
    }
    
    func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) {
        print("protocols:", metrics.transactionMetrics.map { $0.networkProtocolName ?? "-" })
    }

    static func main() async {
        let m = Main()
        do {
            try await m.run()
        } catch {
            print(error)
        }
    }
}

What I mean by full part of the OS is that .Net 6 can't use it. This forum prevents me from linking to the Microsoft documentation but it says: "HTTP/3 is not currently supported on macOS but may be available in a future release." and here is the link: https://learn.microsoft.com/en-us/dotnet/core/extensions/httpclient-http3

So will Http/3 be supported by macOS such that .Net 6 can use it?

So will Http/3 be supported by macOS such that .Net 6 can use it?

I can’t answer questions about third-party tools and libraries. You’ll have to ask the vendor for a definitive answer. However, if they’re based on URLSession all they need to do is set, or provide a way to set, the assumesHTTP3Capable property.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thank you - it took me a bit to understand what is going on. It's not Apple that isn't supporting it, it's Microsoft. And the reason they don't support it is in one of their blogs:

".NET 6 does not include support for HTTP/3 on macOS, primarily because of a lack of a QUIC compatible TLS API. .NET uses SecureTransport on macOS for its TLS implementation, which does not yet include TLS APIs to support QUIC handshake. While we could use OpenSSL, we felt it better to not introduce an additional dependency which is not integrated with the cert management of the OS."

So maybe this is the better question - does macOS have a QUIC compatible TLS API that supports the QUIC handshake and in a way that is integrated with the certificate management of the OS?

BTW - I can be quite persistent about these kinds of things, so if there is a better source for helping me understand this, please point me to it. I don't want to be a bother or a problem.

Thank you so much!

Secure Transport is deprecated. We don’t plan to add new features to it.

We recommend that folks migrate in one of two ways:

  • For high-level networking, HTTPS basically, use URLSession.

  • For low-level networking, TLS-over-TCP and so on, use Network framework.

URLSession supports HTTP/3 out of the box, as I’ve demonstrated above.

Network framework supports TLS-over-QUIC, and that support includes TLS [1]. It also supports TLS-over-TCP and TLS-over-UDP.

If you were previously using Secure Transport for networking, one of these two frameworks is the correct path forward. If you can’t get on that path then you will need to build your own TLS implementation. Such an implementation with the “certificate management of the OS” using Security framework APIs. It’s not what I’d do, but it’s certainly possible.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] In fact, we only support QUIC with TLS. Implementing QUIC without TLS is possible but we’ve chosen not to support it.

Thanks! All done. :-)

Hello, I'm currently looking for a way to make my client, in C#, use http3. However, I have already searched several forums and found no results. Did you manage to get any results from your research?

HTTP/3 Quic support in MacOS?
 
 
Q