Repository navigation
v1.3.19
v1.3.18 -> v1.3.19
Summary
This hotfix extends manual human verification to page downloads with a session-scoped cache so users are not re-prompted across requests. It also skips interactive prompts in headless Linux environments and delegates shared browser checks upstream.
翻譯
此 hotfix 將手動真人驗證擴展至頁面下載並加入會話級快取,避免使用者在同一請求脈絡下重複受詢。同時在無圖形介面的 Linux 環境略過互動視窗提示,並將共用的瀏覽器檢查委派至上游套件。
Changes
FEAT
- Add manual human verification to
download_file(render: true) (@pardnchiu) [4618997]- Reuse existing session decisions with the configured challenge wait
- Prompt on
ErrChallengeRequiredand skip as 403 when declined - Reset session challenge state and skip as 403 on
ErrChallengeClosed
- Persist challenge verification decisions across calls per session (@pardnchiu) [4618997]
- Cache enabled or declined decisions by
SessionIDfor 30 minutes after last use - Refresh the expiry window on each subsequent read
- Evict the cached entry when
ResetChallengeis called
- Cache enabled or declined decisions by
翻譯
- 為
download_file(render: true)新增手動真人驗證流程- 沿用既有 session 決定並套用設定的驗證等待時間
- 遇到
ErrChallengeRequired時詢問使用者,拒絕則以 403 略過 - 遇到
ErrChallengeClosed時重設 session 驗證狀態並以 403 略過
- 依 session 跨次保留真人驗證決定
- 以
SessionID快取同意或略過狀態,於最後一次使用後保留 30 分鐘 - 每次讀取時刷新到期時間
- 呼叫
ResetChallenge時清除快取項目
- 以
FIX
- Skip manual verification prompts on headless Linux and WSL (@pardnchiu) [32ee309, 4618997]
- Return false from
askChallengewhen running under WSL - Require
DISPLAYorWAYLAND_DISPLAYon non-WSL Linux before prompting
- Return false from
翻譯
- 在無圖形介面的 Linux 與 WSL 環境略過手動驗證提示
- 於 WSL 下執行時由
askChallenge直接回傳 false - 非 WSL 的 Linux 需具備
DISPLAY或WAYLAND_DISPLAY才進行詢問
- 於 WSL 下執行時由
REFACTOR
- Extract challenge helpers and delegate page checks to
go-browser(@pardnchiu) [4618997]- Move challenge text loading, prompting, and decline handling into
challenage.go - Replace local URL, error-title, and Chrome profile helpers with
go-browser
- Move challenge text loading, prompting, and decline handling into
翻譯
- 抽離驗證輔助函式並將頁面檢查委派至
go-browser- 將驗證提示文字載入、詢問與拒絕處理移至
challenage.go - 以
go-browser取代本地網址、錯誤頁標題與 Chrome 設定檔判斷輔助函式
- 將驗證提示文字載入、詢問與拒絕處理移至
CHORE
- Bump
github.com/pardnchiu/go-browserfromv0.3.7tov0.3.8(@pardnchiu) [4618997]
翻譯
- 將
github.com/pardnchiu/go-browser從v0.3.7升級至v0.3.8
Scope
internal/tools/fetchPage/— FEAT, FIX, REFACTOR (challenage.go,downloadFile.go,fetchPage.go)internal/tools/types/— FEAT (executor.go)go.mod,go.sum— CHORE (go-browserv0.3.8)
Generated by SKILL