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

Task never completes, no data is sent back #51

Open
acheong08 opened this issue Apr 29, 2024 · 3 comments
Open

Task never completes, no data is sent back #51

acheong08 opened this issue Apr 29, 2024 · 3 comments

Comments

@acheong08
Copy link

I'm trying to connect to socks5 over tor without opening a port. This is what I did:
https://github.com/acheong08/arti/blob/bb0cba1130d75ee0e58c9a42de0bad4a8ee14fa4/examples/hyper/hyper-http-hs-example/src/main.rs#L107-L160

Running and connection, I get:

SOCKS5 connection
onion service stream accepted
spawning task
task spawned

But the task never completes:

fn spawn_and_log_error<F, T, A>(fut: F) -> task::JoinHandle<()>
where
    F: Future<Output = Result<Socks5Socket<T, A>>> + Send + 'static,
    T: AsyncRead + AsyncWrite + Unpin,
    A: Authentication,
{
    eprintln!("spawning task");
    task::spawn(async move {
        eprintln!("task spawned");
        if let Err(e) = fut.await { // <---- Stuck here
            error!("{:#}", &e);
        }
        eprintln!("task finished");
    })
}

Any idea what could be causing the problem?

@acheong08
Copy link
Author

I'm pretty confident it's not a connection issue as the HTTP service is able to return data perfectly fine

@acheong08
Copy link
Author

acheong08 commented Apr 29, 2024

I opened up wireshark to peek at the connections

proxychains -f ./proxychains.conf curl 1.1.1.1

No connection is made to 1.1.1.1.

2024-04-29T05:14:38.710327Z TRACE fast_socks5::server: upgrading to socks5...    
2024-04-29T05:14:38.710340Z DEBUG fast_socks5::server: skipping auth

No other logs...

@acheong08
Copy link
Author

The problem is the lack of manual flushing. We get stuck at reading because data is never sent. https://gitlab.torproject.org/tpo/core/arti/-/issues/1072

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

1 participant