[common] add '--xff' / 'geo-bypass' option

This commit is contained in:
Mike Fährmann
2026-02-04 18:23:03 +01:00
parent b329e6e472
commit 947085c6e3
6 changed files with 324 additions and 6 deletions

View File

@@ -970,6 +970,26 @@ Description
instead of the extractor's ``root`` domain.
extractor.*.geo-bypass
----------------------
Type
``string``
Default
``"auto"``
Example
* ``"JP"``
* ``"105.48.0.0/12"``
Description
Use fake IPs as
`X-Forwarded-For <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-For>`__
header to try bypassing geographic restrictions.
| Can be either an
`ISO 3166-2 <https://en.wikipedia.org/wiki/ISO_3166-2>`__
country code
| or an IP block in CIDR notation.
extractor.*.headers
-------------------
Type

View File

@@ -21,6 +21,7 @@
"ciphers" : null,
"tls12" : true,
"browser" : null,
"geo-bypass" : null,
"proxy" : null,
"proxy-env" : true,
"source-address": null,

View File

@@ -25,7 +25,6 @@
-d, --destination PATH Target location for file downloads
-D, --directory PATH Exact location for file downloads
-X, --extractors PATH Load external extractors from PATH
-a, --user-agent UA User-Agent request header
--clear-cache MODULE Delete cached login sessions, cookies, etc. for
MODULE (ALL to delete everything)
--compat Restore legacy 'category' names
@@ -90,8 +89,13 @@
-R, --retries N Maximum number of retries for failed HTTP
requests or -1 for infinite retries (default:
4)
-a, --user-agent UA User-Agent request header
--http-timeout SECONDS Timeout for HTTP connections (default: 30.0)
--proxy URL Use the specified proxy
--xff VALUE Use a fake 'X-Forwarded-For' HTTP header to try
bypassing geographic restrictions. Can be an IP
block in CIDR notation or a two-letter ISO
3166-2 country code
--source-address IP Client-side IP address to bind to
-4, --force-ipv4 Make all connections via IPv4
-6, --force-ipv6 Make all connections via IPv6