1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 02:32:33 +01:00

add '-4/--force-ipv4' and '-6/--force-ipv6' command-line options

This commit is contained in:
Mike Fährmann 2024-11-08 16:37:14 +01:00
parent b6cf348658
commit 9e72968154
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 13 additions and 0 deletions

View File

@ -71,6 +71,8 @@
--http-timeout SECONDS Timeout for HTTP connections (default: 30.0)
--proxy URL Use the specified proxy
--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
--no-check-certificate Disable HTTPS certificate validation
## Downloader Options:

View File

@ -460,6 +460,17 @@ def build_parser():
dest="source-address", metavar="IP", action=ConfigAction,
help="Client-side IP address to bind to",
)
networking.add_argument(
"-4", "--force-ipv4",
dest="source-address", nargs=0, action=ConfigConstAction,
const="0.0.0.0",
help="Make all connections via IPv4",
)
networking.add_argument(
"-6", "--force-ipv6",
dest="source-address", nargs=0, action=ConfigConstAction, const="::",
help="Make all connections via IPv6",
)
networking.add_argument(
"--no-check-certificate",
dest="verify", nargs=0, action=ConfigConstAction, const=False,