-
Notifications
You must be signed in to change notification settings - Fork 945
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
Supports forwarding requests to the backend RS via HTTPS #1215
Conversation
cc14514
commented
Feb 1, 2025
- Supports forwarding requests to the backend RS via HTTPS protocol using either one-way or two-way authentication.
- Supports passive health checks for HTTPS and TLS protocols.
1d6870e
to
24b11a7
Compare
bfe_tls/bfe_testkeys_test.go
Outdated
func TestKeysDecode(t *testing.T) { | ||
chain := append(BFE_R_CA_CRT.Bytes(), BFE_I_CA_CRT.Bytes()...) | ||
|
||
// 解码 PEM 数据 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请改为英文注释
bfe_tls/bfe_verify_hooks_test.go
Outdated
"time" | ||
) | ||
|
||
// 创建 CN 证书 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请改为英文注释
bfe_tls/bfe_verify_hooks_test.go
Outdated
return cert | ||
} | ||
|
||
// 创建带 SAN 的证书 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请改为英文注释
bfe_tls/bfe_verify_hooks_test.go
Outdated
} | ||
} | ||
) | ||
// 测试验证 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请改为英文注释
0cb7eb1
to
b9e10eb
Compare
bfe_balance/backend/health_check.go
Outdated
return def | ||
} | ||
|
||
// add by liangc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
去掉这样的注释
bfe_balance/backend/health_check.go
Outdated
} | ||
|
||
doCheckFn = func(conn net.Conn) checkRtn { | ||
// TLS Check >>>>>>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“>>>>>>>” 的意思是?
bfe_balance/backend/health_check.go
Outdated
if *checkConf.Schem == "tls" { // https or tls | ||
return checkRtn{true, nil} | ||
} | ||
// TLS Check <<<<<<< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个注释的意思?
bfe_balance/backend/health_check.go
Outdated
} | ||
// TLS Check <<<<<<< | ||
|
||
// HTTPS Check vvvvvvvvvvvvv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“vvvvvvvvvvvvv”的意思?
bfe_balance/backend/health_check.go
Outdated
break | ||
} | ||
} | ||
//data, err = ioutil.ReadAll(conn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这行代码还要吗?
bfe_balance/backend/health_check.go
Outdated
buf = make([]byte, bufSz) | ||
total = 0 | ||
) | ||
//TODO: if timeout , how to handle ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个todo解决了吗?
// compareHttpsConf compares two BackendHTTPS configurations and determines whether they are identical. | ||
// Return: | ||
// - bool: Returns true if all fields in src and dst are identical, otherwise false. | ||
func compareHttpsConf(src, dst *cluster_conf.BackendHTTPS) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
函数名设计的不合理。
从返回值看,改为httpsConfsAreSame更好。
先不修改了吧
Signed-off-by: liangchuan <liangchuan@yf-networks.com>
Signed-off-by: liangchuan <liangchuan@yf-networks.com>
Signed-off-by: liangchuan <liangchuan@yf-networks.com>
Signed-off-by: liangchuan <liangchuan@yf-networks.com>
5f945cc
to
56387dc
Compare