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

upstream proxy support https proxy mode #73

Merged
merged 2 commits into from
May 24, 2024

Conversation

blackhu
Copy link
Contributor

@blackhu blackhu commented May 23, 2024

No description provided.

Copy link
Owner

@lqqyt2423 lqqyt2423 left a comment

Choose a reason for hiding this comment

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

提交pr前要自己测试通过才行

if proxyUrl.Scheme == "https" {
tlsConfig := &tls.Config{
ServerName: proxyUrl.Hostname(), // 设置TLS握手的服务器名称
InsecureSkipVerify: proxy.Opts.SslInsecure
Copy link
Owner

Choose a reason for hiding this comment

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

这个方法里没有proxy变量

// 包装原始连接为TLS连接
tlsConn := tls.Client(conn, tlsConfig)
// 执行TLS握手
if err := tlsConn.Handshake(); err != nil {
Copy link
Owner

Choose a reason for hiding this comment

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

应该用tlsConn.HandshakeContext(ctx)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已经修复完成,并本地测试通过

@lqqyt2423 lqqyt2423 merged commit b252e64 into lqqyt2423:main May 24, 2024
@lqqyt2423
Copy link
Owner

感谢pr

@blackhu blackhu deleted the add_features branch May 24, 2024 03:08
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