https://www.linkedin.com/pulse/proxying-web-traffic-via-ssh-mark-el-khoury
Essentially your local machines creates a SOCK5 proxy which connects to a remote server via SSH (using either username/password or SSH PKI Cert/Key combination).
The SOCK5 proxy handles sending the HTTP request via the SSH tunnel.
The remote server will automatically process the HTTP request and handle sending it to its intended destination.
The upstream (i.e. the endpoint being requested) will see the request coming from the SSH server and presume that's where it originated.