[common] add '--xff' / 'geo-bypass' option
This commit is contained in:
@@ -273,11 +273,6 @@ def build_parser():
|
||||
dest="extractor_sources", metavar="PATH", action="append",
|
||||
help="Load external extractors from PATH",
|
||||
)
|
||||
general.add_argument(
|
||||
"-a", "--user-agent",
|
||||
dest="user-agent", metavar="UA", action=ConfigAction,
|
||||
help="User-Agent request header",
|
||||
)
|
||||
general.add_argument(
|
||||
"--clear-cache",
|
||||
dest="clear_cache", metavar="MODULE",
|
||||
@@ -480,6 +475,11 @@ def build_parser():
|
||||
help=("Maximum number of retries for failed HTTP requests "
|
||||
"or -1 for infinite retries (default: 4)"),
|
||||
)
|
||||
networking.add_argument(
|
||||
"-a", "--user-agent",
|
||||
dest="user-agent", metavar="UA", action=ConfigAction,
|
||||
help="User-Agent request header",
|
||||
)
|
||||
networking.add_argument(
|
||||
"--http-timeout",
|
||||
dest="timeout", metavar="SECONDS", type=float, action=ConfigAction,
|
||||
@@ -490,6 +490,13 @@ def build_parser():
|
||||
dest="proxy", metavar="URL", action=ConfigAction,
|
||||
help="Use the specified proxy",
|
||||
)
|
||||
networking.add_argument(
|
||||
"--xff",
|
||||
dest="geo-bypass", metavar="VALUE", action=ConfigAction,
|
||||
help=("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")
|
||||
)
|
||||
networking.add_argument(
|
||||
"--source-address",
|
||||
dest="source-address", metavar="IP", action=ConfigAction,
|
||||
|
||||
Reference in New Issue
Block a user