Add GeeTest v3 support (v1.1.0) - #1
Merged
Merged
Conversation
Adds geetest(gt, challenge, url, options) to CapSkip (and so the AsyncCapSkip alias), wrapping CapSkip's method=geetest endpoint. The answer comes back as a JSON string in `request`. It stays verbatim in `code`, so code ported from another solver's API keeps working, and is also expanded into `challenge`, `validate`, and `seccode` for direct use — unlike every other captcha type, `code` alone is not directly usable here. An unparseable payload is passed through untouched rather than masked. Submit params are limited to the documented set (gt, challenge, pageurl, api_server, json, proxy, proxytype); all three required fields are checked locally so a missing value fails before the round-trip. GeeTest uses the longer recaptchaTimeout budget rather than defaultTimeout, since it is a real browser solve with internal retries. A caller-supplied timeout still wins. Also validates proxytype against the values CapSkip actually maps (HTTP, HTTPS, SOCKS5, SOCKS5H, case-insensitive) for every proxy-capable captcha type. SOCKS4 and other values previously reached the server and returned ERROR_BAD_PARAMETERS; they now raise ValidationException locally. Image captcha is excluded so it keeps its clearer "proxy not supported" message. TypeScript definitions cover geetest(), GeetestOptions, and the new SolveResult fields. Drops the "no cloud service" phrasing from the README intro; the sentence still makes the local / no-per-solve-fee point. Verified end-to-end against a live CapSkip instance, both from source and from the packed npm tarball: 5/5 GeeTest solves, with image captcha, reCAPTCHA v2, and Turnstile unaffected.
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.
Adds GeeTest v3 (slide) solving to the Node SDK, matching the GeeTest v3 API docs.
What's new
Available on
CapSkipand theAsyncCapSkipalias, with TypeScript definitions.Design notes
codekeeps the raw JSON string CapSkip returns, so code ported from another solver's API still works. The parsed fields are added alongside it — unlike every other captcha type,codealone is not directly usable for GeeTest. An unparseable payload is passed through untouched rather than masked.gt,challenge,pageurl,api_server,json,proxy,proxytype. All three required fields are checked locally, so a missing value fails before the round-trip instead of returningERROR_BAD_PARAMETERS/ERROR_PAGEURL.recaptchaTimeoutbudget rather thandefaultTimeout, since GeeTest is a real browser solve with internal retries. A caller-suppliedtimeoutstill wins. No new constructor option was added.apiServer/api_subdomainare accepted as aliases forapi_server.Also included
proxytypeis now validated against the values CapSkip actually maps —HTTP,HTTPS,SOCKS5,SOCKS5H, case-insensitive — for every proxy-capable captcha type.SOCKS4and other values previously reached the server and came back asERROR_BAD_PARAMETERS; they now raiseValidationExceptionlocally. Image captcha is excluded so it keeps its clearer "proxy is not supported" message.This touches reCAPTCHA and Turnstile as well as GeeTest, since they share the same submit path.
The README intro also drops its "no cloud service" phrasing; the sentence still makes the local / no-per-solve-fee point.
Testing
api_serverand its aliases, proxy handling, solution-field expansion, non-JSON payloads, the required-field checks, and every accepted/rejected proxy type.src/andtypes/ship correctly under thefilesallowlist. 5/5 GeeTest solves, averaging 13.4s.ApiExceptionrather than hanging.Docs
README, tutorial (new section 8), API reference, getting started, troubleshooting, and changelog all updated. Version bumped to 1.1.0 in both
package.jsonandsrc/index.js;geetestadded to the keywords.Note
The server also supports GeeTest v4 (
method=geetest_v4,captcha_id), which this PR does not add.