getlantern / browsersunbounded

Interoperable browser-based P2P proxies for censorship circumvention
GNU General Public License v3.0
16 stars 0 forks source link

Broflake Regression: repeated HTTP requests return a "context canceled" error #170

Open noahlevenson opened 1 year ago

noahlevenson commented 1 year ago

When you proxy your first HTTP request, it will work. But all subsequent HTTP requests will return a context canceled error. This applies only to HTTP (not HTTPS). Something like this used to happen and we fixed it during prototyping. But now it's happening again.

Repro:

  1. Start Freddie, the egress server, a desktop client, and a widget.

  2. Make an HTTP request with cURL: curl --proxy http://127.0.0.1:1080 http://info.cern.ch. It should succeed.

  3. Make another HTTP request with cURL -- it can be to the same host or a different one. It will result in a context canceled error.

  4. Knock yourself out making more HTTP requests with cURL. They will continue to result in context canceled errors.

I discovered this while working on https://github.com/getlantern/broflake/issues/45, and deep in my bones I feel like the issues are related.

noahlevenson commented 1 year ago

I hotfixed it with a one-line patch to the egress server: 0f60fc88c3a4b923e5628cf8c496bc231b76329b

I'm leaving the issue open for now because I don't yet understand why that hack was necessary.