• rnhmjoj 3 minutes ago

    Unfortunately there is still the issue[1] of fingerprinting. Until it can spoof the TLS handshake of a typical browser, you get these "Just a quick check..." or "Sorry, it looks like you're a bot" pages on about 80% of the web.

    [1]: https://github.com/mitmproxy/mitmproxy/issues/4575

    • envoked 11 hours ago

      It’s great to see that Mitmproxy is still being developed - it indirectly made my career.

      Back in 2011, I was using it to learn API development by intercepting mobile app requests when I discovered that Airbnb’s API was susceptible to Rails mass assignment (https://github.com/rails/rails/issues/5228). I then used it to modify some benign attributes, reached out to the company, and it landed me an interview. Rest is history.

      • danmur 6 hours ago

        It's absolutely insane how many core devs argued against change there

        • JeremyNT 2 hours ago

          To this day it remains incredibly useful to me, and weirdly obscure to people who I would've thought should know better.

          Sometimes it's easier to use mitmproxy with an existing implementation than to read the documentation!

          • RamRodification 3 hours ago

            > Rest is history

            ;)

          • febusravenga 6 hours ago

            Only slightly related ...

            > Chrome does not trust user-added Certificate Authorities for QUIC.

            Interesting. In linked issue chrome team says:

            > We explicitly disallow non-publicly-trusted certificates in QUIC to prevent the deployment of QUIC interception software/hardware, as that would harm the evolvability of the QUIC protocol long-term. Use-cases that rely on non-publicly-trusted certificates can use TLS+TCP instead of QUIC.

            I don't follow evolution of those protocols, but i am not sure how disallowing custom certificates has anything with "evolvability" of protocol ...

            Anyone knows are those _reasons_?

            • filleokus 5 hours ago

              If I were to guess, it's to allow Google freedom in experimenting with changes to QUIC, since they control both the client and large server endpoints (Google Search, Youtube etc).

              They can easily release a sightly tweaked QUIC version in Chrome and support it on e.g Youtube, and then use metrics from that to inform proposed changes to the "real" standard (or just continue to run the special version for their own stuff).

              If they were to allow custom certificates, enterprises using something like ZScaler's ZIA to MITM employee network traffic, would risk to break when they tweak the protocol. If the data stream is completely encrypted and opaque to middleboxes, Google can more or less do whatever they want.

              Kinda related: https://en.wikipedia.org/wiki/Protocol_ossification

              • dstroot 5 hours ago

                Companies that use something like Zscaler would be highly likely to block QUIC traffic to force it onto TCP.

                • josephg 3 hours ago

                  That’s exactly what Google is hoping will happen. If QUIC is blocked entirely, there’s no risk that small tweaks to the quic protocol will break Google’s websites for any companies using these tools.

              • sbinder 6 hours ago

                Perhaps they're referring to this famous objection of financial institutions to TLS 1.3, motivated by them not wanting to update their MitM software needed for compliance: https://mailarchive.ietf.org/arch/msg/tls/CzjJB1g0uFypY8UDdr...

                • eptcyka 5 hours ago

                  TLS1.3 breaks MITM boxes because a client can establish a session key outside of the network with the middle box and continue using it afterwards in the middlebox’s network.

                • remus 4 hours ago

                  > I don't follow evolution of those protocols, but i am not sure how disallowing custom certificates has anything with "evolvability" of protocol ...

                  One of the reasons for developing HTTP 2 and 3 was because it was so difficult to make changes to HTTP 1.1 because of middleware that relied heavily on implementation details, so it was hard to tweak things without inadvertently breaking people. They're trying to avoid a similar situation with newer versions.

                  • ozim 3 hours ago

                    There is a case of Kazakhstan installing certs to MITM citizens couple years ago and bunch of cases where bad actors can social engineer people to install certain for.

                    I think because of KZ case browsers and Chrome especially went for using only their own cert store instead of operating system one.

                    • intelVISA 4 hours ago

                      QUIC exists to improve ad deliverability, to grant user freedom would counteract that goal.

                      • jsheard 4 hours ago

                        How does QUIC improve ad deliverability?

                        • intelVISA 4 hours ago

                          > We explicitly disallow non-publicly-trusted certificates in QUIC to prevent the deployment of QUIC interception software/hardware, as that would harm the evolvability of the QUIC protocol

                          For Chrome at least..!

                          • josephg 2 hours ago

                            That has nothing to do with ad deliverability.

                          • superkuh 2 hours ago

                            The entire protocol puts corporate/institutional needs first and foremost to the detriment of human person use cases. HTTP/3 makes all web things require CA TLS and means that if something in the TLS breaks (as it does every couple years with root cert expirations, version obsolecence, acme version obsolecence, etc) then the website is not accessible. Because there's no such thing as HTTP+HTTPS HTTP/3, self-signed HTTPS HTTP/3, or even, as in this case, custom CA TLS HTTP/3. It's designed entirely around corporate/institutional needs and is a terrible protocol for human people. HTTP+HTTPS websites can last decades without admin work. HTTP/3 websites can only last a few years at most.

                            • persnickety an hour ago

                              This doesn't have much to do with QUIC. If HTTP/3 was based upon another transport protocol, you'd have the exact same problems.

                              You can use QUIC with custom certs without any trouble.

                              • superkuh an hour ago

                                QUIC isn't just some transport protocol though: it's weird. These restrictions are based in the QUIC libs, not in UDP (which is the QUIC transport protocol).

                                And while you can use QUIC with custom certs in a technical sense if you do the compile flags and build your own universe, 99.9999% of the people on Earth with their standard QUIC lib implementations (most use the same two) will be unable to connect to it.

                                • persnickety an hour ago

                                  I don't know what you're talking about, but I just imported a QUIC library and used it with a self-signed certificate. No extra steps required, either on the server or the client side.

                                  Yes, the protocol is weird, compared to TCP. It has many extra features and one restriction, which is mandatory TLS, which I wouldn't even consider skipping anyway. Still nothing to do with ads.

                                  • cookiengineer 42 minutes ago

                                    He was arguing about 99.99% of users being people that cannot use your stuff because chrome doesn't allow the use of snakeoil / self signed certs for QUIC, specifically, and TLS encryption is mandatory.

                                    If you compare that to the graceful Connection: Upgrade handshake in http/1.1 and websockets, for example, this would've been much better because there is no isolation based on tools and libraries, only based on trust chain of the certificates. If a new version of the protocol breaks, it automatically falls back with both parties knowing about it. If QUIC protocol has changes on the client side, good luck finding that out.

                                    • persnickety 16 minutes ago

                                      Then the OP used a bad framing, because it was apparent to me that they opposed QUIC in general, not QUIC in Chrome.

                                      Either way, I still fail to see how this relates to the original complaint that QUIC somehow leads to ads.

                        • globular-toast 6 hours ago

                          It can seem confusing but it all makes sense when you realise Chrome is designed to work for Google, not for you. I remember people switching their Grandmas to Chrome 15 years ago when they could've chosen Firefox. Many of us knew this would happen, but convenience and branding is everything, sadly.

                          • le-mark 4 hours ago

                            > Chrome is designed to work for Google, not for you.

                            Maybe more accurately “chrome is designed to work for you in so far as that also works for google”. I share the long standing dismay that so many willingly surrendered their data and attention stream to an ad company.

                            • fud101 2 hours ago

                              I don't really think Firefox cares about having users. The one killer feature Chrome has is being able to access all your state by logging into your Chrome account. Firefox refuses to provide this basic service which will allow you to seamlessly use your data on Firefox and then eventually stop using Chrome. I wish Firefox nothing but the worst.

                          • nilslindemann 4 hours ago

                            I wonder, can I use it like Privoxy/Proxomitron/Yarip? E.g. can I strip out script tags from specific sites, which I request with my browser (Ungoogled Chromium), using Mitmproxy as a Proxy? And how will this affect performance?

                            • bluejekyll 15 hours ago

                              Thanks for the shoutout to Hickory. It’s always fun to see what people build with it. Nice work!

                              • mhils 12 hours ago

                                Thank you for your work on Hickory! It's super exciting to see how PyO3's Python <-> Rust interop enables us to use a production-grade DNS library with Hickory and also a really solid user-space networking stack with smoltcp. These things wouldn't be available in Python otherwise.

                              • Onavo 17 hours ago

                                Do http/2 and http/3 offer any benefits if they are only supported by the reverse proxy but not the underlying web server? Most mainstream frameworks for JS/Python/Ruby don't support the newer http standards. Won't the web server be a bottleneck for the reverse proxied connection?

                                • AgentME 13 hours ago

                                  Yes, because http/2 or http/3 will improve the reliability of the connection between the client and the reverse proxy. The connection between the reverse proxy and the underlying web server is usually much faster and more reliable, so that part would benefit much less from being upgraded to http/2 or http/3.

                                  • markasoftware 15 hours ago

                                    the transport between reverse proxy <-> backend is not always http, eg python w/ uwsgi and php w/ fastcgi.

                                    And even when it is HTTP, as other commenters said, the reverse proxy is able to handshake connections to the backend much more quickly than an actual remote client would, so it's still advantageous to use http/2 streams for the slower part of the connection.

                                    • masspro 16 hours ago

                                      Probably not, but mitmproxy is not a reverse proxy for any production purpose. It’s for running on your local machine and doing testing of either low-level protocol or web security stuff.

                                      • codetrotter 13 hours ago

                                        > mitmproxy is not a reverse proxy for any production purpose

                                        At a startup I was working on a few years ago, I set up mitmproxy in dev and eventually if memory serves right I also sometimes enabled it in prod to debug things.

                                        That being said, we did not have a lot of users. We had in fact very very few users at the time.

                                    • nitely 11 hours ago

                                      Something not mentioned: web-browsers limit the number of connections per domain to 6. With +http/2 they will use a single connection for multiple concurrent requests.

                                      • jeltz 3 hours ago

                                        Yes, for http/3 since it handles network issues better. Http/2 is of more doubtful value since it can choke really bad on packet loss.

                                        • mhils 12 hours ago

                                          One of the main promises of HTTP/3 is better performance under worse network conditions (e.g. no head-of-line blocking as in HTTP/2, connection migration, 0-RTT). For all of that HTTP/3 between client and proxy is really great. HTTP/3 between proxy and server is not required for that.

                                          • connicpu 16 hours ago

                                            Depends. If they're running on the same box, the reverse proxy will be able to initiate tcp connections to the web server much more cheaply. Even if they're just in the same datacenter, the lower round trip latency will reduce the time for establishing TCP connections. Plus, the proxy might be load balancing across multiple instances of the backend.

                                            • apitman 15 hours ago

                                              Also browsers limit the number of HTTP/1.1 requests you can have in flight to a specific domain

                                              • ahoka 14 hours ago

                                                The limit is much higher for proxies, though.

                                                • connicpu an hour ago

                                                  With a reverse proxy the browser doesn't know it's talking to one

                                            • lemagedurage 11 hours ago

                                              Yes. Besides other performance benefits, HTTP/3 saves a full roundtrip for connection by combining TCP and TLS handshakes.

                                              • Narhem 16 hours ago

                                                http/3 seems to be an excellent opportunity to optimize HTMX or any of the libraries which leverage HTML fragments like JSX. The obvious advantage of http/3 is for gaming.

                                                The servers which run the frameworks have to http/3. In most cases the advantages should be transparent to the developers.

                                                • deznu 16 hours ago

                                                  I’m curious what about HTTP/3 is particularly advantageous with HTMX?

                                                  • Narhem 14 hours ago

                                                    A common use case of HTMX is sending fragments when scrolling.

                                                    Since http/3 uses udp to send the fragments, duplicate packet information doesn’t have to be sent.

                                                    Kind of funny the newer protocol effectively works in the opposite direction of GraphQl.

                                                    • greenavocado 10 hours ago

                                                      Network congestion management is gonna be wild in the coming decade with the proliferation of udp based protocols

                                              • 38 17 hours ago