Add proxy for Esplora & Electrum#711
Conversation
|
One comment I have is that this works fairly well with the addition of the new constructor, but if we wanted to expose more of the builder options we'd be stuck with a crazy amount of constructors (one for each combination of arguments the users might need):
ect. An alternative approach would be to make use of default arguments in the main constructor. The new parameters can then be added without creating breaking changes. |
Absolutely! Updated |
|
I don't personally like the Rust naming much but I see that the electrum client calls its method on the builder I'm sort of open to keeping the name proxy here for the Electrum client but it is a slight rename of the true Rust method. |
|
Ok scratch my previous comment. After asking chatGPT I get this interesting answer: ChatGPT Question and AnswerThe rust electrum-client library has a builder with a socks5 method. Is this socks5 method always used for proxies? Is it used for anything else? Great question. In the context of the electrum-client Rust library, the .socks5() method is specifically and only used to configure a SOCKS5 proxy. It’s not used for anything else — not for authentication, TLS settings, or other types of proxy protocols like HTTP proxies. TL;DR ✅ Used for: ❌ Not used for: My thoughtsI think that in that way since proxy5 seems to be a subset of what a proxy means, it's probably more accurate to keep the name socks5 (even though I didn't really know what it meant the first time I saw it). |
|
@thunderbiscuit yeah I thought the naming was tricky so I went for proxy on both, but totally open to renaming. To make sure I'm on the same page, are you thinking:
instead of
or something different on the Electrum specifically? |
|
Yeah that's what I had in mind. The argument on the |
Updated 👍 |
|
rebased, will merge after tests pass |
Description
Add proxy to Esplora and Electrum
Resolves comment #662 (comment)
Notes to the reviewers
Changelog notice
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
Bugfixes: