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

m-lab / ndt7-client-go / 65
89%
main: 88%

Build:
Build:
LAST BUILD BRANCH: netreplica-branch2
DEFAULT BRANCH: main
Ran 29 May 2019 03:10PM UTC
Jobs 1
Files 9
Run time 1s
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 03:08PM UTC coverage: 100.0%. Remained the same
65

push

travis-ci

web-flow
mlabns: make implementation more flexible (#13)

* 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

* Avoid publicly exposing ... (continued)

401 of 401 relevant lines covered (100.0%)

1.09 hits per line

Jobs
ID Job ID Ran Files Coverage
1 65.1 29 May 2019 03:10PM UTC 0
100.0
Travis Job 65.1
Source Files on build 65
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #65
  • 0f066cf3 on github
  • Prev Build on master (#66)
  • Next Build on master (#71)
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