postmanlabs / newman

Newman is a command-line collection runner for Postman
https://www.postman.com
Apache License 2.0
6.78k stars 1.15k forks source link

Is there a way to forcibly connect to IPv4 or IPv6 ? #3196

Open sweepkim opened 5 months ago

sweepkim commented 5 months ago
  1. Newman Version (can be found via newman -v): 6.1.0
  2. OS details (type, version, and architecture): Ubuntu 18.04 64bit
  3. Are you using Newman as a library, or via the CLI?: Library
  4. Did you encounter this recently, or has this bug always been there: Recently Required
  5. Expected behaviour: Hope to set ip type version for each request.
  6. Command / script used to run Newman: newman.run
  7. Sample collection, and auxiliary files (minus the sensitive details): Not required
  8. Screenshots (if applicable):

As far as I know, If the OS supports Dual Stack(IPv4 and IPv6), the newman supports both IPv4 and IPv6 connection. However, Is there a way to forcibly connect to IPv4 or IPv6 when sending a request ? For example, If the target server supports IPv4, It is necessary to forcibly connect IPv6 to see if the settings for additional IPv6 support are correct. If it's connected to IPv4, It will be difficult to check the IPv6 connection status.

If I can set host or family in newman library, It's helpful to define IP type. https://nodejs.org/api/http.html#agentgetnameoptions