docs: 清理 C/C++ 客户端中加密相关的残留引用
- docs(c-client): 移除 OpenSSL 加密库依赖说明 - 移除 README 中的 OpenSSL 依赖和 AES-128-CBC 解密功能说明 - 更新编译命令,移除 -lssl -lcrypto - main.c 注释移除 decrypt 提及 - docs(cpp-client): 移除 OpenSSL 加密库依赖说明 - 移除 README 中的 OpenSSL 依赖和 AES 解密功能说明 - 更新编译命令,移除 -lssl -lcrypto - docs(README): 更新 C/C++ 客户端说明 - 移除 libcurl + OpenSSL 的描述 - 更新编译命令,移除加密库链接 说明:项目已确认不使用配置加密功能,所有加密相关代码和配置已清理完毕。
This commit is contained in:
@@ -354,22 +354,22 @@ var value = client.Get("database.host");
|
||||
|
||||
### C 客户端
|
||||
|
||||
适用于嵌入式或高性能场景,依赖 libcurl + OpenSSL。
|
||||
适用于嵌入式或高性能场景,依赖 libcurl。
|
||||
|
||||
**编译**
|
||||
|
||||
```bash
|
||||
gcc -o demo kenaito-conf-c-client/main.c -lcurl -lssl -lcrypto
|
||||
gcc -o demo kenaito-conf-c-client/main.c -lcurl
|
||||
```
|
||||
|
||||
### C++ 客户端
|
||||
|
||||
依赖 libcurl + OpenSSL,C++17。
|
||||
依赖 libcurl,C++17。
|
||||
|
||||
**编译**
|
||||
|
||||
```bash
|
||||
g++ -std=c++17 -o demo kenaito-conf-cpp-client/main.cpp -lcurl -lssl -lcrypto -lpthread
|
||||
g++ -std=c++17 -o demo kenaito-conf-cpp-client/main.cpp -lcurl -lpthread
|
||||
```
|
||||
|
||||
### Lua 客户端
|
||||
|
||||
@@ -1,35 +1,33 @@
|
||||
# Kenaito Config Center C Client
|
||||
|
||||
C 语言的配置中心客户端 SDK,使用 libcurl + OpenSSL。
|
||||
C 语言的配置中心客户端 SDK,使用 libcurl。
|
||||
|
||||
## 依赖
|
||||
|
||||
- libcurl
|
||||
- OpenSSL
|
||||
|
||||
### macOS
|
||||
|
||||
```bash
|
||||
brew install curl openssl
|
||||
brew install curl
|
||||
```
|
||||
|
||||
### Ubuntu/Debian
|
||||
|
||||
```bash
|
||||
apt-get install libcurl4-openssl-dev libssl-dev
|
||||
apt-get install libcurl4-openssl-dev
|
||||
```
|
||||
|
||||
## 编译
|
||||
|
||||
```bash
|
||||
cd kenaito-conf-c-client-demo
|
||||
gcc -o demo ../kenaito-conf-c-client/main.c -lcurl -lssl -lcrypto
|
||||
gcc -o demo ../kenaito-conf-c-client/main.c -lcurl
|
||||
./demo
|
||||
```
|
||||
|
||||
## 功能
|
||||
|
||||
- AES-128-CBC 解密(与 Go/Java/Python 客户端兼容)
|
||||
- HTTP POST 拉取配置
|
||||
- 配置缓存
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ int main() {
|
||||
char *response = http_post_json(url, payload);
|
||||
if (response) {
|
||||
printf("Response received (%zu bytes)\n", strlen(response));
|
||||
/* In production: parse JSON, decrypt, store configs */
|
||||
/* In production: parse JSON, store configs */
|
||||
printf("First 200 chars: %.200s\n", response);
|
||||
free(response);
|
||||
} else {
|
||||
|
||||
@@ -1,36 +1,34 @@
|
||||
# Kenaito Config Center C++ Client
|
||||
|
||||
C++ 语言的配置中心客户端 SDK,使用 libcurl + OpenSSL。
|
||||
C++ 语言的配置中心客户端 SDK,使用 libcurl。
|
||||
|
||||
## 依赖
|
||||
|
||||
- libcurl
|
||||
- OpenSSL
|
||||
- C++17
|
||||
|
||||
### macOS
|
||||
|
||||
```bash
|
||||
brew install curl openssl
|
||||
brew install curl
|
||||
```
|
||||
|
||||
### Ubuntu/Debian
|
||||
|
||||
```bash
|
||||
apt-get install libcurl4-openssl-dev libssl-dev
|
||||
apt-get install libcurl4-openssl-dev
|
||||
```
|
||||
|
||||
## 编译
|
||||
|
||||
```bash
|
||||
cd kenaito-conf-cpp-client-demo
|
||||
g++ -std=c++17 -o demo ../kenaito-conf-cpp-client/main.cpp -lcurl -lssl -lcrypto -lpthread
|
||||
g++ -std=c++17 -o demo ../kenaito-conf-cpp-client/main.cpp -lcurl -lpthread
|
||||
./demo
|
||||
```
|
||||
|
||||
## 功能
|
||||
|
||||
- AES-128-CBC 解密
|
||||
- HTTP POST 拉取配置
|
||||
- 定时同步
|
||||
- 变更回调
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
{
|
||||
"config.test": "sdasdas是大大6667777888",
|
||||
"database.host": "127.0.0.1",
|
||||
"database.name": "kenaito_conf",
|
||||
"database.password": "1234567",
|
||||
"database.password": "123",
|
||||
"database.port": "3306",
|
||||
"database.user": "root",
|
||||
"jwt.expireHours": "24",
|
||||
"jwt.secret": "kenaito-conf-jwt-secret-2026",
|
||||
"kenaito.config.encrypt-secret": "c4c20a0c6e991b26c34b0cefe78252c8",
|
||||
"kenaito.config.global-encrypt-secret": "6879c141d108fb37a24d547611c80095",
|
||||
"latest.fetch.timestamp": "1792052626435",
|
||||
"latest.fetch.timestamp": "1792133386219",
|
||||
"server.port": "8084"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"config.test": "sdasdas是大大6667777888", "database.host": "127.0.0.1", "database.name": "kenaito_conf", "database.password": "123456789", "database.port": "3306", "jwt.expireHours": "24", "jwt.secret": "kenaito-conf-jwt-secret-2026", "latest.fetch.timestamp": "1792133044244", "server.port": "8084"}
|
||||
Reference in New Issue
Block a user