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

engine, cli: http/https/socks5/tor/torsf/psiphon proxy #1955

Closed
bassosimone opened this issue Jan 6, 2022 · 2 comments · Fixed by ooni/probe-cli#1353
Closed

engine, cli: http/https/socks5/tor/torsf/psiphon proxy #1955

bassosimone opened this issue Jan 6, 2022 · 2 comments · Fixed by ooni/probe-cli#1353
Assignees
Labels
good first issue Good for newcomers GSoC GSoC related issues ooni/probe-cli ooni/probe-engine priority/high releaseBlocker This issue blocks releasing user feedback requests that have been added to the backlog as a direct result of user feedback or testing

Comments

@bassosimone
Copy link
Contributor

bassosimone commented Jan 6, 2022

We currently only support socks5 in miniooni. Users have asked us if we could enable also http/https support. We also need to expose a --proxy flag inside of ooniprobe. We should close this issue when we have a --proxy flag inside of ooniprobe where we can choose among the following options: tor, torsf, psiphon, socks5, http, https.

@bassosimone bassosimone added user feedback requests that have been added to the backlog as a direct result of user feedback or testing triage labels Jan 6, 2022
@bassosimone bassosimone self-assigned this Jan 6, 2022
@bassosimone bassosimone added good first issue Good for newcomers and removed triage labels Jan 25, 2022
@bassosimone bassosimone changed the title engine,cli: add support for http/https proxy engine, cli: add support for http/https proxy Jun 13, 2022
@bassosimone bassosimone changed the title engine, cli: add support for http/https proxy engine, cli: http/https/socks5 proxy Jun 13, 2022
@bassosimone bassosimone changed the title engine, cli: http/https/socks5 proxy engine, cli: http/https/socks5/tor/torsf/psiphon proxy Jun 13, 2022
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 3, 2022
This diff adds to miniooni support for using the torsf tunnel. Such a
tunnel consists of a snowflake pluggable transport in front of a custom
instance of tor and requires tor to be installed.

The usage is like:

```
./miniooni --tunnel=torsf [...]
```

The default snowflake rendezvous method is "domain_fronting". You can
select the AMP cache instead using "amp":

```
./miniooni --snowflake-rendezvous=amp --tunnel=torsf [...]
```

Part of ooni/probe#1955
bassosimone pushed a commit to ooni/probe-cli that referenced this issue Nov 15, 2022
This implements the bare minimum needed to have circumvention proxy support in OONI Probe CLI.

The reference issue is ooni/probe#1955. (Most of that issue is implemented, save for the fact that currently we do not have support for `http` and `https` proxies.)

While there, add to `Makefile` a rule for correctly building `ooniprobe` and `miniooni` for "this system" (i.e., the default `GOOS` and `GOARCH` on a system), because we needed this for testing this patch and we needed to figure out the commands instead.
bassosimone added a commit to ooni/probe-cli that referenced this issue Sep 19, 2023
This diff completes the work we have been doing for a few days
now and provides HTTP and HTTPS proxy support, in addition to
SOCKS5 support, for the engine-specific network.

We did this work in the context of ooni/probe#2531
and ooni/probe#1955.
bassosimone added a commit to ooni/probe-cli that referenced this issue Sep 19, 2023
This diff completes the work we have been doing for a few days now and
provides HTTP and HTTPS proxy support, in addition to SOCKS5 support,
for the engine-specific network.

We did this work in the context of
ooni/probe#2531 and
ooni/probe#1955.

BTW, the fact that tests used `measurexlite` and tracing is very nice
here. It means the idea to write `measurexlite` based on context and
tracing was good and could be used beyond its original design goals.
@bassosimone bassosimone added the releaseBlocker This issue blocks releasing label Oct 4, 2023
@bassosimone
Copy link
Contributor Author

I have implemented this functionality taking advantage of the recent split between HTTP code for measuring and HTTP code for communicating with the backend. The overall work is summarized here #2531 (comment). There is an outstanding pull request that attempted another approach at ooni/probe-cli#1162. The approach used there has some issues that I will need to document to the author, but potentially could allow us to dynamically change proxies. Therefore, I am marking this issue as done because we have the functionality, but continuing to work on ooni/probe-cli#1162 could potentially lead to greater benefits, considering that we're moving towards dynamically hopping proxies.

@bassosimone
Copy link
Contributor Author

Plot twist: while there is support for HTTP/HTTPS proxy, the fact that I could not refactor how the engine resolver works to use the new HTTP network code means that we have not landed the HTTP/HTTPS proxy functionality. To properly land it, we would need to refactor the engine resolver to use this code instead of the now-legacy proxy code in netxlite.

bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 9, 2023
By using netxlite.NewHTTPTransportWithOptions:

1. we remove an unnecessary usage of the quirky HTTP transport
used for measuring by ./legacy/netx et al (removing such unnecessary
usages is ooni/probe#2534);

2. we enable using HTTP/HTTPS proxies in miniooni and ooniprobe.

Closes ooni/probe#1955.
@bassosimone bassosimone reopened this Oct 9, 2023
bassosimone added a commit to ooni/probe-cli that referenced this issue Oct 9, 2023
By using netxlite.NewHTTPTransportWithOptions in
`./internal/engineresolver/factory.go`:

1. we remove an unnecessary usage of the quirky HTTP transport used for
measuring by ./legacy/netx et al (removing such unnecessary usages is
ooni/probe#2534);

2. we enable using HTTP/HTTPS proxies in miniooni and ooniprobe.

Closes ooni/probe#1955.
Murphy-OrangeMud pushed a commit to Murphy-OrangeMud/probe-cli that referenced this issue Feb 13, 2024
This diff completes the work we have been doing for a few days now and
provides HTTP and HTTPS proxy support, in addition to SOCKS5 support,
for the engine-specific network.

We did this work in the context of
ooni/probe#2531 and
ooni/probe#1955.

BTW, the fact that tests used `measurexlite` and tracing is very nice
here. It means the idea to write `measurexlite` based on context and
tracing was good and could be used beyond its original design goals.
Murphy-OrangeMud pushed a commit to Murphy-OrangeMud/probe-cli that referenced this issue Feb 13, 2024
By using netxlite.NewHTTPTransportWithOptions in
`./internal/engineresolver/factory.go`:

1. we remove an unnecessary usage of the quirky HTTP transport used for
measuring by ./legacy/netx et al (removing such unnecessary usages is
ooni/probe#2534);

2. we enable using HTTP/HTTPS proxies in miniooni and ooniprobe.

Closes ooni/probe#1955.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers GSoC GSoC related issues ooni/probe-cli ooni/probe-engine priority/high releaseBlocker This issue blocks releasing user feedback requests that have been added to the backlog as a direct result of user feedback or testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant