• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

m-lab / ndt7-client-go / 60
100%
main: 88%

Build:
Build:
LAST BUILD BRANCH: netreplica-branch2
DEFAULT BRANCH: main
Ran 29 May 2019 10:32AM UTC
Jobs 1
Files 9
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 May 2019 10:30AM UTC coverage: 100.0%. Remained the same
60

Pull #13

travis-ci

web-flow
mlabns: make implementation more flexible

To this end, expose implementation details that allow to override
the way in which a request is created and serviced.

This is mainly driven by the following OONI needs. When a OONI client
is behind a proxy (e.g. Tor's SOCKS5 proxy), it needs to adjust its
behaviour to still be able to perform ndt7 tests correctly.

To this end, it needs:

1. to contact mlabns using the proxy. In OONI we honour the HTTP_PROXY
environment variable but we also have more specific proxy settings that
are configured through a specialized http.Client. To allow for OONI to
do the latter, this PR exposes the HTTPRequestor publicly, so that we
can override the default with our specialized client. (I can hear an
argument that it's possible to do all of this by just using the proxy
environment variable; yet, we use the specialized client also for
other functionality, including (1) measuring and logging everything
that happens, because we're concerned about censorship and we want
therefore to log what happens at low level; (2) possibly overwriting
DNS resolution to use DoH or alternative name servers. As such we
actually need to have HTTPRequestory public and I don't see how we
can get away with just the HTTP_PROXY environment variable).

2. to modify the mlabns http.Request before it's issued so that it
can append the proper query string arguments. To this end, it needs
to replace the default HTTPRequestMaker with one that calls the
original and then changes the query.

My initial solution to solve the above problems have been vendoring
mlabns, but that's sub-optimal and I'd rather have a more flexible
implementation here. I can also see how others may want to have this
similar kind of flexibility for their packages and/or tests.

See also https://github.com/ooni/probe-engine/commit/dfc0e04dc
Pull Request #13: mlabns: make implementation more flexible

4 of 4 new or added lines in 1 file covered. (100.0%)

395 of 395 relevant lines covered (100.0%)

1.09 hits per line

Jobs
ID Job ID Ran Files Coverage
1 60.1 29 May 2019 10:32AM UTC 0
100.0
Travis Job 60.1
Source Files on build 60
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #60
  • Pull Request #13
  • PR Base - master (#58)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc