Skip to content
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

Add --connect-to flag that allows to change dial target #905

Merged
merged 12 commits into from
Sep 12, 2024

Commits on Sep 11, 2024

  1. net: add DialRedirectFunc

    Add optional function to DialConfig that can be used to change dial network and address.
    mmatczuk committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    2368525 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0ed7caf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    def6a82 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b4e3555 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3285540 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b506341 View commit details
    Browse the repository at this point in the history
  7. command/run: add --connect-to flag

    HTTP client options:
    ...
        --connect-to <HOST1:PORT1:HOST2:PORT2>,... (env FORWARDER_CONNECT_TO)
            For a request to the given HOST1:PORT1 pair, connect to HOST2:PORT2 instead. This option is suitable to direct
            requests at a specific server, e.g. at a specific cluster node in a cluster of servers. This option is only
            used to establish the network connection and does not work when request is routed using an upstream proxy. It
            does NOT affect the hostname/port that is used for TLS/SSL (e.g. SNI, certificate verification) or for the
            application protocols. HOST1 and PORT1 may be the empty string, meaning any host/port. HOST2 and PORT2 may
            also be the empty string, meaning use the request's original host/port.
    mmatczuk committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    6ce811a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3e2e4a4 View commit details
    Browse the repository at this point in the history
  9. net: support blank host and port as specified by curl connect-to flag

    Implement the following
    
    "HOST1" and "PORT1" may be the empty string, meaning "any host/port".
    "HOST2" and "PORT2" may also be the empty string, meaning "use the request's original host/port".
    mmatczuk committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    2ca15a3 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    fd3a191 View commit details
    Browse the repository at this point in the history
  11. e2e: fix debug runs as httpbin does not have API server anymore

    httpbin-1  | invalid argument "headers,api:errors" for "--log-http" flag: unknown name: apiError: failed to update flags
    mmatczuk committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    82f36c9 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    3e22c2c View commit details
    Browse the repository at this point in the history