org.hl7.fhir.core icon indicating copy to clipboard operation
org.hl7.fhir.core copied to clipboard

Add https-proxy param to validator-cli

Open dotasek opened this issue 2 years ago • 1 comments

This adds a https-proxy param to the validator CLI to allow the use of a https proxy. Proxy username and password will remain unchanged.

Example params:

-proxy localhost:8080 -https-proxy localhost:8080

dotasek avatar Jul 28 '22 20:07 dotasek

Codecov Report

Base: 31.16% // Head: 9.74% // Decreases project coverage by -21.41% :warning:

Coverage data is based on head (37029b9) compared to base (2de7220). Patch coverage: 12.24% of modified lines in pull request are covered.

Additional details and impacted files
@@              Coverage Diff              @@
##             master     #888       +/-   ##
=============================================
- Coverage     31.16%    9.74%   -21.42%     
- Complexity      629    13191    +12562     
=============================================
  Files           131     2443     +2312     
  Lines         13836   974423   +960587     
  Branches       2336   289955   +287619     
=============================================
+ Hits           4312    94972    +90660     
- Misses         9023   842865   +833842     
- Partials        501    36586    +36085     
Impacted Files Coverage Δ
...in/java/org/hl7/fhir/utilities/npm/NpmPackage.java 51.68% <0.00%> (+25.53%) :arrow_up:
...ain/java/org/hl7/fhir/validation/ValidatorCli.java 0.00% <0.00%> (ø)
...java/org/hl7/fhir/validation/cli/utils/Params.java 0.00% <0.00%> (ø)
...l7/fhir/validation/instance/InstanceValidator.java 56.85% <0.00%> (ø)
...r/r4b/utils/client/network/FhirRequestBuilder.java 60.00% <20.00%> (ø)
...ir/r5/utils/client/network/FhirRequestBuilder.java 58.26% <20.00%> (ø)
.../org/hl7/fhir/r5/conformance/ProfileUtilities.java 51.71% <100.00%> (ø)
...ir/utilities/xhtml/HierarchicalTableGenerator.java 68.86% <100.00%> (+68.86%) :arrow_up:
...c/main/java/org/hl7/fhir/utilities/FileFormat.java 11.11% <0.00%> (-66.67%) :arrow_down:
...rg/hl7/fhir/r4b/openapi/MediaTypeObjectWriter.java 60.00% <0.00%> (ø)
... and 2380 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jul 28 '22 20:07 codecov[bot]

Testing Steps:

  1. Setup mitmproxy Download: https://docs.mitmproxy.org/stable/overview-installation/ Setup Guide: https://randomprogrammingstuff.wordpress.com/2020/04/06/java-route-traffic-thru-mitmproxy/

  2. Paste the content of bp.txt into a json file to use it as the sample resource to validate against.

  3. Run validations against the sample resource uisng the following command lin arguments.

  • The class name is org.hl7.fhir.validation.ValidatorCli

  • no proxy: [file name].json Expected result: No requests

  • http proxy: -proxy localhost:8080 [file name].json Expected result: only http requests image image

  • https proxy -https-proxy localhost:8080 [file name].json Expected result: only https requests image

  • http + https proxy -proxy localhost:8080 -https-proxy localhost:8080 [file name].json image image

Hankych avatar Nov 17 '22 14:11 Hankych