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

refactor: introduce factory for stdlib http transport #413

Merged
merged 2 commits into from
Jul 1, 2021

Conversation

bassosimone
Copy link
Contributor

With this factory, we want to construct ourselves the TLS dialer
so that we can use a dialer wrapper that always sets timeouts when
reading, addressing ooni/probe#1609.

As a result, we cannot immediately replace the i/e/netx factory
for creating a new HTTP transport, since the functions signatures
are not directly compatible.

Refactoring is part of ooni/probe#1505.

With this factory, we want to construct ourselves the TLS dialer
so that we can use a dialer wrapper that always sets timeouts when
reading, addressing ooni/probe#1609.

As a result, we cannot immediately replace the i/e/netx factory
for creating a new HTTP transport, since the functions signatures
are not directly compatible.

Refactoring is part of ooni/probe#1505.
@bassosimone bassosimone requested a review from hellais as a code owner June 30, 2021 13:51
@bassosimone
Copy link
Contributor Author

The CI failure is like:

--- FAIL: TestOBFS4DialerWorks (15.02s)
Error:     obfs4_test.go:20: dial tcp 192.95.36.142:443: i/o timeout
--- FAIL: TestOBFS4DialerWorksWithContextExpiration (131.03s)
Error:     obfs4_test.go:136: the goroutine did not call close
FAIL

This seems to be an unrelated problem with obfs4 bridges.

@bassosimone
Copy link
Contributor Author

The bridge is indeed currently offline according to https://metrics.torproject.org/rs.html#details/D9C805C955CB124D188C0D44F271E9BE57DE2109

bassosimone added a commit that referenced this pull request Jul 1, 2021
bassosimone added a commit that referenced this pull request Jul 1, 2021
@bassosimone bassosimone merged commit 6895946 into master Jul 1, 2021
@bassosimone bassosimone deleted the sandbox-sbs branch July 1, 2021 13:26
ainghazal pushed a commit to ainghazal/probe-cli that referenced this pull request Mar 8, 2022
ainghazal pushed a commit to ainghazal/probe-cli that referenced this pull request Mar 8, 2022
With this factory, we want to construct ourselves the TLS dialer
so that we can use a dialer wrapper that always sets timeouts when
reading, addressing ooni/probe#1609.

As a result, we cannot immediately replace the i/e/netx factory
for creating a new HTTP transport, since the functions signatures
are not directly compatible.

Refactoring is part of ooni/probe#1505.
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

Successfully merging this pull request may close these issues.

1 participant