xh
xh copied to clipboard
Feature request: support forcing ipv4/ipv6
cURL
supports -4
/--ipv4
and -6
/--ipv6
flags. Quoting the curl(1)
manpage:
-4, --ipv4
This option tells curl to resolve names to IPv4 addresses only, and
not for example try IPv6.
Example:
curl --ipv4 https://example.com
See also --http1.1 and --http2. This option overrides -6, --ipv6.
-6, --ipv6
This option tells curl to resolve names to IPv6 addresses only, and
not for example try IPv4.
Example:
curl --ipv6 https://example.com
See also --http1.1 and --http2. This option overrides -4, --ipv4.
For testing purposes, having this feature would be really convenient.
I haven't verified it yet but It seems the HTTP library we are using (i.e reqwest) supports forcing either IPv4 or IPv6 by setting the client's local_address
, see https://github.com/seanmonstar/reqwest/issues/584#issuecomment-780916982.
@Seirdy would you be interested in opening a PR for this feature?
HTTPie issue: httpie/httpie#94
I haven't verified it yet but It seems the HTTP library we are using (i.e reqwest) supports forcing either IPv4 or IPv6 by setting the client's
local_address
, see seanmonstar/reqwest#584 (comment).@Seirdy would you be interested in opening a PR for this feature?
I would like to try it. 😄
On Sun, Sep 04, 2022 at 01:56:30PM -0700, Mohamed Daahir wrote: @.*** would you be interested in opening a PR for this feature?
Unfortunately, I'm not familiar with Rust.
-- Seirdy (https://seirdy.one)
Resolved in #276