Can't get native-tls to work in library while rustls works perfectly

Hi

I am the author of a merge request on the Arti project, developing a library to bridge between the http library ureq and Arti. So users can easily use ureq to route requests over Tor.

The MR can be found here: [WIP] - #1519 Integration or example with ureq (!2724) · Merge requests · The Tor Project / Core / Arti · GitLab

We are nearly finished but are stumbling on a very persistent issue that the library seems impossible to work with native-tls. We want to support both the former and rustls.

Multiple developers have looked at it but were not able to solve it. As last hope I have opened an issue on the repo for native-tls: Failed to make request: native-tls: connection closed via error · Issue #327 · sfackler/rust-native-tls · GitHub

More info about the issue can be found here: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2724#note_3176523

The steps to reproduce the issue are documented there.

Does anyone have an idea on how to solve this?

Fix: Fix for native-tls issue · Issue #1044 · algesten/ureq · GitHub

2 Likes