Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

first attempt at adding proxy support#757

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
AndrewFromMelbourne wants to merge1 commit intocpp-netlib:0.11-devel
base:0.11-devel
Choose a base branch
Loading
fromAndrewFromMelbourne:0.11-devel-with-proxy

Conversation

AndrewFromMelbourne

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.

Copy link
Member

@deanberrisdeanberris left a comment

Choose a reason for hiding this comment

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

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
Member

Choose a reason for hiding this comment

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

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
Member

Choose a reason for hiding this comment

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

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
Member

Choose a reason for hiding this comment

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

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?

@anonimal
Copy link

@AndrewFromMelbourne status?

@AndrewFromMelbourne
Copy link
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

@deanberris
Copy link
Member

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

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@deanberrisdeanberrisdeanberris requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@AndrewFromMelbourne@anonimal@deanberris

[8]ページ先頭

©2009-2025 Movatter.jp