FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

first attempt at adding proxy support by AndrewFromMelbourne · Pull Request #757 · cpp-netlib/cpp-netlib · GitHub

first attempt at adding proxy support - #757

Open
AndrewFromMelbourne wants to merge 1 commit into
cpp-netlib:0.11-develfrom
AndrewFromMelbourne:0.11-devel-with-proxy
Open

first attempt at adding proxy support#757
AndrewFromMelbourne wants to merge 1 commit into
cpp-netlib:0.11-develfrom
AndrewFromMelbourne:0.11-devel-with-proxy

Conversation

Copy link
Copy Markdown

Hi Dean, as discussed here is my first attempt at adding proxy support into cpp-netlib. If you have any guidance it would be appreciated.

Note: there are some changes related to chunking as well.

Thanks,

Andrew Duncan.

deanberris left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm ambivalent about the SSL implementation -- I suspect we'd rather not support intercepting the connection for SSL requests. There's going to be a lot of questions about how secure intercepting SSL connections is, and I suspect it's a security risk that I'm not willing to let in.

Do you have thoughts about alternatives, or literature that will enlighten me about dealing with SSL in HTTP through proxies?

if (connect_via_proxy())
{
tcp_host = *proxy_host_;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This could be more compact as:

string_type tcp_host = connect_via_proxy() ? *proxy_host_ : host_;


if (connect_via_proxy()) {
tcp_port = boost::lexical_cast<boost::uint16_t>(*proxy_port_);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Same potential approach here.

boost::uint16_t tcp_port = connect_via_proxy() ? ...;

If yoyu're doing this a lot of times in the same function, I suggest doing it once and storing the bool.

}
else {
socket_->async_handshake(asio::ssl::stream_base::client, handler);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Is the strategy for SSL connections to intercept them and pass them through the proxy? Can you educate me on whether this is something that's actually secure/supported? How can the client know that the request made it through to the correct host for the domain it originally wanted to connect to?

Copy link
Copy Markdown

@AndrewFromMelbourne status?

Copy link
Copy Markdown
Author

HI @anonimal I haven't had a chance to get back to this. I will need to make some time to get back to it

Copy link
Copy Markdown
Member

Hi @AndrewFromMelbourne -- do you think you'll find the time to get this updated soon?

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL