Skip to content

Expose the CONNECT-tunnel proxy mode in the GUI#32

Merged
xroche merged 1 commit into
masterfrom
feature/gui-proxy-connect-tunnel
Jul 16, 2026
Merged

Expose the CONNECT-tunnel proxy mode in the GUI#32
xroche merged 1 commit into
masterfrom
feature/gui-proxy-connect-tunnel

Conversation

@xroche

@xroche xroche commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Engine PR xroche/httrack#596 adds a connect:// proxy scheme: it drives the proxy with CONNECT for every request, plain HTTP included, so CONNECT-only proxies like Tor's HTTPTunnelPort work. The GUI's proxy type dropdown offered HTTP and SOCKS5, with no way to reach it.

This adds it as a third row of that dropdown, reusing the same address/port/auth fields, and maps the row to its scheme in compute_options() — the same shape the build dropdown at Shell.cpp:653 already uses to map its rows onto non-contiguous engine codes.

The row order is doing real work. The selection is persisted as the ProxyType profile key and shares its numbering with webhttrack's option10.html, where SOCKS5 is 1 and the tunnel is 2. Putting the tunnel row last keeps the combobox index equal to that code, so DDX_CBIndex keeps carrying it and existing profiles keep meaning what they meant. (The cost is that the dropdown lists the two HTTP modes non-adjacently, where webhttrack shows the tunnel in the middle — a cosmetic divergence, deliberately taken in exchange for not carrying a second index↔code mapping.)

An out-of-range code — hand-edited profile, or one written by a future build — selects HTTP in the dialog and emits a plain HTTP proxy.

HTTP stays the default, so the emitted command line is unchanged for existing projects.

LANG_PROXYTYPETIP is reworded engine-side by #596 to describe all three modes, so no new LANG key is needed here.

Engine-side dependency #596 is merged (2026-07-16). CI checks out httrack master with no pinned ref, so a rebuild picks it up.

Testing

CI builds the installer and smoke-runs the app (--version, exit 0) — that proves it links and launches, nothing more. This repo has no test suite, and CI never opens the proxy dialog, writes a profile, or inspects the generated argv. The dropdown round-trip through a saved profile and a real mirror through connect:// want a manual pass on the Win7 VM.

🤖 Generated with Claude Code

The engine gained a connect:// proxy scheme (xroche/httrack#596): it
drives the proxy with CONNECT for every request, including plain HTTP,
which is what CONNECT-only proxies such as Tor's HTTPTunnelPort require.
The GUI had HTTP and SOCKS5 but no way to pick it.

Add it as a third row of the existing proxy type dropdown, reusing the
address/port/auth fields as the other two do, and map the row to its
scheme in compute_options() -- the same shape the build dropdown already
uses to map its rows onto non-contiguous engine codes.

The row order is what fixes the stored value: the tunnel goes last so
that the index keeps matching the code webhttrack's option10.html and
existing profiles already use (0 = HTTP, 1 = SOCKS5, 2 = tunnel), and
DDX_CBIndex keeps carrying it. An out-of-range code, from a hand-edited
or newer profile, selects HTTP in the dialog and emits a plain HTTP
proxy.

HTTP remains the default, so the emitted command line is unchanged for
existing projects.

LANG_PROXYTYPETIP is reworded engine-side by the same PR to describe all
three modes; no new LANG key is needed here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@xroche
xroche force-pushed the feature/gui-proxy-connect-tunnel branch from 6217055 to 437d0a4 Compare July 16, 2026 15:58
@xroche
xroche merged commit fb69168 into master Jul 16, 2026
3 checks passed
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