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 HTTP proxy support #56

Merged
merged 1 commit into from
Jul 13, 2021
Merged

Add HTTP proxy support #56

merged 1 commit into from
Jul 13, 2021

Conversation

kareali
Copy link
Contributor

@kareali kareali commented Jul 13, 2021

Motivation

  • Adding HTTP proxy support to allow localproxy to used TCP tunneling to connect using TCP tunneling.

Modifications

Change summary

  1. Refactored the tcp_proxy_config into a separate header file and renamed it to LocalproxyConfig to make it easier to use with the new
    component. And added some field descriptions.
  2. Added a field for the tcp_adapter_proxy class for the HttpsProxyAdapter.
  3. Separated out the TCP socket definition from the websocket stream definition to make it accessible.
  4. Added implementation for HttpsProxyAdapter class.
  5. Added integration for HttpsProxyAdapter errors and boost errors
  6. Added code that starts an HTTP server that I can use to test against
  7. Added unit test cases for the public methods in the HttpsProxyAdapter class
  8. Added a wrapper around Boost websocket stream so that the caller won't have to worry about the underlying websocket stream type which will vary based on whether the web proxy connection is over TLS or not.
  9. Updated the HttpsProxyAdapter to perform the SSL handshake with the web proxy before sending HTTP CONNECT when needed.
  10. Updated the main function to accept https_proxy URLs with HTTPS protocol.
  11. Adjusted the unit tests.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Motivation:
Adding HTTP proxy support to allow localproxy to used TCP tunneling to
connect using TCP tunneling.

Modifications:
1. Refactored the tcp_proxy_config into a separate header file and renamed it to LocalproxyConfig to make it easier to use with the new
   component. And added some field descriptions.
2. Added a field for the tcp_adapter_proxy class for the HttpsProxyAdapter.
3. Separated out the TCP socket definition from the websocket stream definition to make it accessible.
4. Added implementation for HttpsProxyAdapter class.
5. Added integration for HttpsProxyAdapter errors and boost errors
6. Added code that starts an HTTP server that I can use to test against
7. Added unit test cases for the public methods in the HttpsProxyAdapter class
8. Added a wrapper around Boost websocket stream so that the caller won't have to worry about the underlying websocket stream type which will vary based on whether the web proxy connection  is over TLS or not.
9. Updated the HttpsProxyAdapter to perform the SSL handshake with the web proxy before sending HTTP CONNECT when needed.
10. Updated the main function to accept https_proxy URLs with HTTPS protocol.
11. Adjusted the unit tests.
@kareali kareali merged commit f35c804 into master Jul 13, 2021
@kareali kareali deleted the http-proxy-support branch July 15, 2021 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants