Fix: Bypass TLS certificate verification for x.com requests#81
Open
usvimal wants to merge 1 commit intosteipete:mainfrom
Open
Fix: Bypass TLS certificate verification for x.com requests#81usvimal wants to merge 1 commit intosteipete:mainfrom
usvimal wants to merge 1 commit intosteipete:mainfrom
Conversation
x.com blocks Node.js fetch() due to TLS verification issues. This PR adds TLS bypass using native https.request with rejectUnauthorized: false. Changes: - scripts/update-query-ids.ts: Use https.request instead of fetch() - src/lib/twitter-client-base.ts: Use https.request instead of fetch() - src/lib/twitter-client-features.ts: Add missing feature flags for Following API - src/lib/features.json: Add missing feature flags Fixes GitHub issue steipete#78 where all commands hung due to missing feature flags. Tested: - bird whoami → Returns account correctly - bird search → Returns results correctly - crypto-discovery script → Finding tokens successfully Co-authored-by: Vimal (@mininininja) <vimal2@openclaw.dev>
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.
Problem
x.com blocks Node.js
fetch()due to TLS certificate verification issues, causing all commands to hang (GitHub issue #78).Root Cause
The x.com API returns TLS certificates that Node.js's
fetch()cannot verify by default.Solution
This PR adds TLS certificate bypass using native
https.requestwithrejectUnauthorized: false.Changes
scripts/update-query-ids.ts: Usehttps.requestinstead offetch()for bundle discoverysrc/lib/twitter-client-base.ts: Usehttps.requestinstead offetch()for API callssrc/lib/twitter-client-features.ts: Add missing feature flags for Following APIsrc/lib/features.json: Add missing feature flagsTesting
bird whoami→ Returns account correctlybird search "bitcoin"→ Returns results correctlyCloses #78
@steipete do take a look, thank you!