-
Notifications
You must be signed in to change notification settings - Fork 0
docs: refactor sample config and add docsctrings to packages #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,53 +1,91 @@ | ||||||||||||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/xenOs76/https-wrench/refs/heads/main/https-wrench.schema.json | ||||||||||||
| # vim: set ts=2 sw=2 tw=0 fo=cnqoj | ||||||||||||
| --- | ||||||||||||
| # | ||||||||||||
| # HTTPS Wrench - sample configuration file | ||||||||||||
| # | ||||||||||||
|
|
||||||||||||
| # debug: Enables global debug mode to print additional diagnostic information. | ||||||||||||
| debug: false | ||||||||||||
|
|
||||||||||||
| # verbose: Enables verbose output, showing more details during execution. Required option. | ||||||||||||
| verbose: true | ||||||||||||
|
|
||||||||||||
| # caBundle: A PEM-encoded CA certificate bundle as a multiline string to be used for verifying server certificates. | ||||||||||||
| # When testing inside the devenv environment, the 'devenv up' command will create new self-signed certificates and | ||||||||||||
| # start a local, HTTPS-enabled Nginx server. | ||||||||||||
| # The server will take the certificate from $CAROOT/full-cert.pem. | ||||||||||||
| # If caBundle is not set, the requests made using this configuration file will fail with a TLS certificate verification error. | ||||||||||||
| # Add the content of $CAROOT/rootCA.pem to the variable caBundle to test the sample configuration against the local | ||||||||||||
| # webserver. | ||||||||||||
| # | ||||||||||||
| caBundle: | | ||||||||||||
| -----BEGIN CERTIFICATE----- | ||||||||||||
| MIIEbTCCAtWgAwIBAgIQJdy/eKgQx9G54MUxW+ow5zANBgkqhkiG9w0BAQsFADBP | ||||||||||||
| ... | ||||||||||||
|
|
||||||||||||
| # requests: List of HTTP requests to execute. Required option. | ||||||||||||
| requests: | ||||||||||||
| - name: httpBunComGet | ||||||||||||
| # name: The name of the request, used for display purposes. Required option. | ||||||||||||
| - name: SampleRequestAgainstLocalWebserver | ||||||||||||
|
|
||||||||||||
| # transportOverrideUrl: Override URL for the transport layer. Can be used to force a connection to a specific IP or proxy. Must start with https:// | ||||||||||||
| transportOverrideUrl: https://127.0.0.1:9443 | ||||||||||||
|
Comment on lines
+31
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment overstates the requirement for The comment says it "Must start with https://", but 📝 Suggested wording- # transportOverrideUrl: Override URL for the transport layer. Can be used to force a connection to a specific IP or proxy. Must start with https://
+ # transportOverrideUrl: Override URL/host:port for the transport layer (e.g. https://127.0.0.1:9443).
+ # Used to force the connection to a specific IP/proxy. Scheme defaults to https and port defaults to 443 if omitted.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
|
|
||||||||||||
| # enableProxyProtocolV2: Enables sending an HAProxy PROXY protocol v2 header. Requires 'transportOverrideUrl' to be set. | ||||||||||||
| enableProxyProtocolV2: false | ||||||||||||
|
|
||||||||||||
| transportOverrideUrl: https://cat.httpbun.com:443 | ||||||||||||
| clientTimeout: 3 | ||||||||||||
| # clientTimeout: The timeout for the HTTP client in seconds. | ||||||||||||
| clientTimeout: 5 | ||||||||||||
|
|
||||||||||||
| # insecure: If true, skips TLS certificate verification (InsecureSkipVerify). | ||||||||||||
| insecure: false | ||||||||||||
|
|
||||||||||||
| # requestDebug: If true, dumps the raw HTTP request to the output for debugging. | ||||||||||||
| requestDebug: false | ||||||||||||
|
|
||||||||||||
| # responseDebug: If true, dumps the raw HTTP response, including TLS connection details, for debugging. | ||||||||||||
| responseDebug: false | ||||||||||||
|
|
||||||||||||
| # printResponseBody: If true, prints the body of the HTTP response. | ||||||||||||
| printResponseBody: true | ||||||||||||
| printResponseHeaders: true | ||||||||||||
|
|
||||||||||||
| userAgent: wrench-custom-ua | ||||||||||||
| # responseBodyMatchRegexp: A regular expression to match against the response body. | ||||||||||||
| responseBodyMatchRegexp: ".*https-wrench-agent.*" | ||||||||||||
|
|
||||||||||||
| requestHeaders: | ||||||||||||
| - key: x-custom-header | ||||||||||||
| value: custom-header-value | ||||||||||||
| - key: x-api-key | ||||||||||||
| value: api-value | ||||||||||||
| # printResponseHeaders: If true, prints the headers of the HTTP response. | ||||||||||||
| printResponseHeaders: true | ||||||||||||
|
|
||||||||||||
| # responseHeadersFilter: A list of specific response headers to filter and display. | ||||||||||||
| responseHeadersFilter: | ||||||||||||
| - X-Powered-By | ||||||||||||
| - Via | ||||||||||||
| - Content-Type | ||||||||||||
| - Server | ||||||||||||
|
|
||||||||||||
| hosts: | ||||||||||||
| - name: httpbun.com | ||||||||||||
| uriList: | ||||||||||||
| - /headers | ||||||||||||
| - /status/302 | ||||||||||||
| - /status/404 | ||||||||||||
| - /status/503 | ||||||||||||
|
|
||||||||||||
| - name: httpBunPostCerts | ||||||||||||
|
|
||||||||||||
| # printResponseCertificates: If true, prints the TLS certificates returned in the response. | ||||||||||||
| printResponseCertificates: true | ||||||||||||
| printResponseBody: true | ||||||||||||
|
|
||||||||||||
| # requestMethod: The HTTP method to use for the request (e.g., GET, POST, PUT, DELETE). | ||||||||||||
| requestMethod: POST | ||||||||||||
|
|
||||||||||||
| # requestHeaders: A list of custom headers to send with the HTTP request. | ||||||||||||
| requestHeaders: | ||||||||||||
| - key: content-type | ||||||||||||
| # key: The name of the header. | ||||||||||||
| - key: Content-Type | ||||||||||||
| # value: The value of the header. | ||||||||||||
| value: application/json | ||||||||||||
| requestBody: '{"hello":"world"}' | ||||||||||||
| - key: X-Custom-Header | ||||||||||||
| value: custom-value | ||||||||||||
|
|
||||||||||||
| # requestBody: The body payload to send with the HTTP request. | ||||||||||||
| requestBody: "{\"key\": \"value\"}" | ||||||||||||
|
|
||||||||||||
| # userAgent: A custom User-Agent string to send with the request. | ||||||||||||
| userAgent: custom-https-wrench-agent/1.0 | ||||||||||||
|
|
||||||||||||
| # hosts: The target hosts to send the request to. Required option. | ||||||||||||
| hosts: | ||||||||||||
| - name: httpbun.com | ||||||||||||
| # name: The hostname (used for the Host header and TLS ServerName indication). Required option. | ||||||||||||
| - name: example.com | ||||||||||||
| # uriList: A list of URIs (paths) to request on this host. Must start with a forward slash (/). | ||||||||||||
| uriList: | ||||||||||||
| - /post | ||||||||||||
| - /status/503 | ||||||||||||
Uh oh!
There was an error while loading. Please reload this page.