Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Access HTTP Response from Tor Proxy due to ByteReaderException #42

Open
nns52k opened this issue May 8, 2024 · 4 comments
Open

Comments

@nns52k
Copy link

nns52k commented May 8, 2024

Given that we use package:socks5_proxy to connect Tor proxy, when accessing websites through an external Tor, everything works, but if we go through this package Tor, we'll have ByteReaderException (stream has fewer bytes than expected. Size: 0, expected: 1.).

For details, please check LacticWhale/socks_dart#9

@sneurlax
Copy link
Collaborator

I am only getting this error when querying an Onion service, but I still get it.

I'm working around this by patching socks_socket.dart to make sure it can connect to onion services via arti.

@sneurlax
Copy link
Collaborator

sneurlax commented Jun 22, 2024

I rebuilt the package with the "onion-service-client" (see https://github.com/cypherstack/tor/blob/main/rust/Cargo.toml#L17 ) feature on arti-client as described under "Additive features" on https://crates.io/crates/arti-client and am using the custom SOCKSSocket class contained in this repo to access onion services just fine now. package:socks5_proxy has never worked for our purposes (electrum, mostly). See https://github.com/cypherstack/tor/blob/main/example/lib/main.dart#L222-L244

@sneurlax
Copy link
Collaborator

Also, version 2.0 of https://github.com/LacticWhale/socks_dart has since been released and this issue needs re-assessing in light of that update.

@sneurlax
Copy link
Collaborator

#52 should solve this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants