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

Setting dial timeout #72

Open
MediocreCoding opened this issue Sep 21, 2022 · 1 comment
Open

Setting dial timeout #72

MediocreCoding opened this issue Sep 21, 2022 · 1 comment

Comments

@MediocreCoding
Copy link

When using a standard transport dialer, you can set the dial timeout:

t := &http.Transport{
	DialContext: (&net.Dialer{
		Timeout:   30 * time.Second,
	}).DialContext,
}

Since the Tor dial context replaces the standard dialer here though, we can't use this method to set the timeout.

I've searched through the various settings for both the bine Client and the bine Dialer, but cannot find a setting for dial timeout. Is there a way to set this?

@cretz
Copy link
Owner

cretz commented Sep 21, 2022

This is because https://pkg.go.dev/golang.org/x/net/proxy#Dial which we use doesn't support timeout. I think you need to can timeout the context though.

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