Expose post-3.49-2 engine options in the GUI#31
Merged
Conversation
The GUI shipped a 1998 default UA string, "Mozilla/4.5 (compatible; HTTrack 3.0x; Windows 98)", and emitted it via -F for every new project, overriding the engine's own default. The engine (3.49-11) now defaults to an honest crawler identity, so align the GUI's new-project default with it. Only affects fresh projects; existing profiles keep their saved UserID. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The engine (3.49-8+) accepts a scheme-prefixed proxy argument, -P socks5://[user:pass@]host[:port], and tunnels both HTTP and HTTPS origins through it automatically. The GUI had no way to select it. Add a "Proxy type" dropdown (HTTP / SOCKS5) to the advanced proxy Configure dialog, reusing the single existing proxy address/port/auth fields. The selection round-trips through COptionTab10::m_proxytype, persists as the ProxyType profile key, and the shell prepends the socks5:// scheme to the -P argument. HTTP stays the default, so the emitted command line is unchanged for existing projects. New LANG keys (LANG_PROXYTYPE, LANG_PROXYTYPETIP) are wired here; their translations are added engine-side in lang.def/lang/*.txt (see hand-over note). English display is covered by the .rc caption meanwhile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The engine (3.49-10) can preload a Netscape cookies.txt before crawling. Add a "Load cookies from file" path field to the Spider tab, persist it as the CookiesFile profile key, and emit --cookies-file <path> when set. LANG keys LANG_COOKIEFILE / LANG_COOKIEFILETIP are wired; translations follow engine-side (hand-over note). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The engine (3.49-10) can space out downloads by a random per-file delay. Add a "Pause between files" field (MIN[:MAX] seconds) to the Flow Control tab, persist it as PauseFiles, and emit --pause <value> when set. This is distinct from the pre-existing -G pause-after-N-bytes throttle on Limits. LANG keys LANG_PAUSEFILES / LANG_PAUSEFILESTIP wired; translations follow engine-side. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The engine (3.49-10) split the -%u URL-hack into independently disableable parts. Add three checkboxes to the Links tab (keep www. prefix / keep double slashes / keep query order) that emit --keep-www-prefix, --keep-double-slashes and --keep-query-order, persisted as KeepWww / KeepSlashes / KeepQueryOrder. All default off, so the emitted command line is unchanged unless the user opts out. LANG keys and tooltips wired; translations follow engine-side. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The engine (3.49-10) can drop selected query-string keys from the dedup naming. Add a "Strip query keys" field to the Experts tab, persist it as StripQuery, and emit --strip-query <keys> when set. LANG keys LANG_STRIPQUERY / LANG_STRIPQUERYTIP wired; translations follow engine-side. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…bels Follow-up to the option-exposure work, from GUI review: - Add a "..." Browse button next to the cookies-file field that opens a file picker (CFileDialog), reusing the existing filter idiom. - Label the pause field "Pause between files (s):" to disambiguate it from the pre-existing byte-based "Pause after downloading .. B" on Limits. - Give the strip-query field an inline example, "Strip query keys (e.g. sid,ref):", since its tooltip is not yet available. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 15, 2026
xroche
added a commit
to xroche/httrack
that referenced
this pull request
Jul 15, 2026
The web GUI was frozen before the engine gained SOCKS5 proxying, --cookies-file, --pause, --strip-query, and the three --keep-* URL-hack opt-outs. Wire each into the option tabs, the generated httrack command, the winprofile.ini persistence, and the reload remap so they reach parity with WinHTTrack (xroche/httrack-windows#31). The SOCKS5 selector reuses the single proxy field and prepends socks5:// to -P; it is gated on a non-empty host so a SOCKS5-selected-but-blank config can't emit a stray scheme token. winprofile.ini key names match WinHTTrack so projects round-trip across both GUIs. Labels/tooltips reuse the LANG_ strings already added in #588. Signed-off-by: Xavier Roche <roche@httrack.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds GUI controls for the user-facing options the engine gained since 3.49-2, plus a
stale-default fix. Six commits, one per concern:
dialog. Reuses the single proxy address/port/auth; the shell prepends
socks5://tothe
-Pargument. Persists asProxyType.--cookies-file— "Load cookies from file" path field on the Spider tab.--pause— "Pause between files" (MIN[:MAX]seconds) field on the Flow Control tab.--keep-www-prefix,--keep-double-slashes,--keep-query-order.--strip-query— "Strip query keys" field on the Experts tab.Mozilla/4.5 (compatible; HTTrack 3.0x; Windows 98)toMozilla/5.0 (compatible; HTTrack; +https://www.httrack.com/).Why
These options were unreachable from the GUI, forcing users onto a hand-edited command
line. The UA default was a 1998 fabricated string that overrode the engine's modern
honest identifier on every new project. Closes #30.
How
Each option follows the same seam: a control on its
OptionTabN(+resource.hid andWinHTTrack.rcdialog entry), a member with DDX, aCShellOptionsfield set incompute_options()and emitted inlance(), and save/load in bothWrite_profilebranches +
Read_profile. All toggles/fields default off/empty, so the emitted commandline is unchanged for existing projects. Value options are emitted as their documented
long flags; the SOCKS scheme is prepended to the existing
-Pstring.New labels/tooltips reference new
LANG_*keys (defined incpp_lang.h). Theirtranslated values are added engine-side in
lang.def+lang/*.txt(they ship from theengine checkout via CI); English display is covered by the
.rccaptions until then, andother languages fall back to English — no blank-label regression for English users.
Built and validated by CI (no local MFC toolchain); the change is mechanical and split
per feature so any single item can be reverted independently.
Not included
--why(-%Y) is a diagnose-and-exit filter check rather than a mirror setting; left fora future "test a URL against the rules" button. webhttrack parity and the engine-side
lang.def/translation additions are handed off separately.🤖 Generated with Claude Code