feat: implement HTTPS proxy tunneling, SSL verification, and srcset s…#301
Open
poria-lang wants to merge 1 commit intoxroche:masterfrom
Open
feat: implement HTTPS proxy tunneling, SSL verification, and srcset s…#301poria-lang wants to merge 1 commit intoxroche:masterfrom
poria-lang wants to merge 1 commit intoxroche:masterfrom
Conversation
…upport This commit addresses several long-standing functional and security issues: 1. HTTPS Proxy Support: Implemented the HTTP CONNECT method in src/htslib.c. HTTrack now correctly tunnels HTTPS traffic through proxies instead of bypassing them. Added a 30s handshake timeout using select() for stability. 2. SSL Security: Enabled peer certificate verification in src/htslib.c using SSL_VERIFY_PEER. Added system default CA path loading to prevent MITM attacks on HTTPS mirrors. 3. Modern Web Support: Added srcset attribute parsing in src/htsparse.c to support modern responsive image downloading. 4. Stability: Moved proxy tunnel metadata to a fixed 256-byte buffer in htsopt.h to prevent memory fragmentation during long-running crawls. Fixed: xroche#179, xroche#300 (Proxy Bypass), xroche#235 (srcset support)
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.
This commit addresses several long-standing functional and security issues:
HTTPS Proxy Support: Implemented the HTTP CONNECT method in src/htslib.c. HTTrack now correctly tunnels HTTPS traffic through proxies instead of bypassing them. Added a 30s handshake timeout using select() for stability.
SSL Security: Enabled peer certificate verification in src/htslib.c using SSL_VERIFY_PEER. Added system default CA path loading to prevent MITM attacks on HTTPS mirrors.
Modern Web Support: Added srcset attribute parsing in src/htsparse.c to support modern responsive image downloading.
Stability: Moved proxy tunnel metadata to a fixed 256-byte buffer in htsopt.h to prevent memory fragmentation during long-running crawls.
Fixed: #179, #300 (Proxy Bypass), #235 (srcset support)