增加中国IP缓存

This commit is contained in:
2025-01-21 17:06:12 +08:00
parent 5028d24a32
commit 685b29a045
6 changed files with 241 additions and 100 deletions

View File

@@ -189,7 +189,7 @@ int _nice(int increment) {
}
// 判断命令是否存在
int command_exists(const char *command) {
int _command_exists(const char *command) {
const char *path_env = getenv("PATH");
if (!path_env) {
return 0; // 如果 PATH 不存在,返回不存在
@@ -221,7 +221,7 @@ int command_exists(const char *command) {
return 0; // 命令不存在
}
// 定义一个函数,执行命令并返回输出
// 执行命令并返回输出
char *_execute_command(const char *command) {
FILE *fp;
char buffer[1024];