Skip to content

feat: return the vanillaFallback option as an alternative for failing requests#441

Merged
barjin merged 2 commits intomasterfrom
feat/vanilla-fallback
May 5, 2026
Merged

feat: return the vanillaFallback option as an alternative for failing requests#441
barjin merged 2 commits intomasterfrom
feat/vanilla-fallback

Conversation

@barjin
Copy link
Copy Markdown
Member

@barjin barjin commented May 5, 2026

The vanillaFallback option has been noop in a few of the latest versions of impit. The changes from this PR return this feature to support, e.g., servers with old TLS stacks that uncover some of the emulation discrepancies and cause the requests to fail.

Closes #205

@barjin barjin self-assigned this May 5, 2026
@github-actions github-actions Bot added this to the 140th sprint - Tooling team milestone May 5, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label May 5, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores the vanilla_fallback path in impit so impersonated requests can retry with a non-fingerprinted client when connection setup fails, addressing failures like the TLS/cipher-suite incompatibility reported in #205.

Changes:

  • Adds an optional vanilla_client alongside the existing base/H3 clients.
  • Refactors request sending to build a reusable PreparedRequest and retry connect failures through the vanilla client.
  • Adds ImpitError::is_connect_error() and aligns the Rust builder default for vanilla_fallback with the documented false default.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
impit/src/impit.rs Adds vanilla fallback client construction and retry logic in the main request path.
impit/src/errors.rs Adds a helper to detect connect errors for gating fallback retries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread impit/src/impit.rs
Comment on lines +489 to +493
let prepared = PreparedRequest {
method: method.clone(),
url: request.url.clone(),
headers: header_map,
body: request.body,
@barjin barjin merged commit c05b09d into master May 5, 2026
57 checks passed
@barjin barjin deleted the feat/vanilla-fallback branch May 5, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConnectionReset / SelectedUnusableCipherSuiteForVersion on aspx page

3 participants