7 Commits
Author SHA1 Message Date
vex1023 3dd1eacfde pcurl regression suite (35 cases) + 3 bug fixes
Fixes found by the suite:
- timeout error mapping: 'operation timed out' did not match 'timeout' -> exit 7 instead of 28
- invalid --impersonate value now exits 2 (usage error), was falling into connect-error 7
- -F multipart: primp files expects {field: path}; plain form fields via data=
- -j/--json implies POST even with empty body (curl modern semantics)
- -I/--head implies -i (headers shown), matching curl

tests/pcurl-regression.sh: 35 checks covering GET/POST/form/JSON/multipart,
headers, redirects, methods, --fail, TLS, fingerprint UA, env proxy,
error exit codes, flag combining.
2026-10-01 11:13:12 +08:00
vex1023 31a88fc7e3 pcurl: comprehensive Chinese help (examples, env vars, exit codes, curl diffs) 2026-10-01 10:56:11 +08:00
vex1023 99e03c9d14 pcurl: -d implies form-urlencoded content type (curl semantics) 2026-10-01 10:52:53 +08:00
vex1023 b48a3216bf Add pcurl: curl-like CLI backed by primp (Chrome TLS fingerprint)
- curl-compatible subset: -X/-d/-H/-F/-o/-L/-k/-s/-i/-I/-j/--max-time/--proxy
- Default impersonate chrome_146 (primp 2.x); --no-fingerprint to opt out
- Env proxy default (PRIMP_PATCH_PROXY/HTTPS_PROXY); curl exit codes
- Registered as console script 'pcurl' + python -m primp_patch.curl
2026-10-01 10:52:07 +08:00
vex1023 a9a0f47bf7 Merge GitHub-initialized LICENSE commit (keep MIT vex1023 version) v0.2.0 2026-10-01 10:04:25 +08:00
vex1023 63b9e2ae0d primp-patch v0.2.0: six-layer Python HTTP stack → primp (browser TLS fingerprint)
- One-line patch() covering requests / urllib3 / http.client / urllib / httpx (sync+async) / aiohttp
- Zero source modification — pure monkeypatch, survives upstream upgrades
- Auto-drop python-* User-Agents that contradict the impersonated Chrome fingerprint
- Session(proxy=None) env-proxy fallback (PRIMP_PATCH_PROXY / HTTPS_PROXY)
- PRIMP_PATCH_AUTO=1 opt-in auto-activation; idempotent patch/unpatch
- 16/16 regression tests passing; openai SDK verified end-to-end
2026-10-01 09:59:01 +08:00
openbot 442241f746 Initial commit 2026-10-01 09:58:49 +08:00