# go-tencentcloud自动添加ip **Repository Path**: user_ye/go-tencentcloud ## Basic Information - **Project Name**: go-tencentcloud自动添加ip - **Description**: 腾讯云服务器自动将外网ip添加到防火墙规则 目前只支持轻量服务器(后续会满足基础服务器) - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-06-19 - **Last Updated**: 2025-01-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 自动将当前外网ip添加到腾讯云防火墙 ### 配置文件 + 云端 + 目录: `src/conf/config.yaml` + 将 `config.yaml.example` 复制一份本地 `config.yaml` + 修改云服务器厂商的子账号的 `secretId` 和 `secretKey` + 客户端 + 目录: `src/client/config.yaml` + 将 `config.yaml.example` 复制一份本地 `config.yaml` + 修改为需要部署请求的云服务器的公网ip ### 生成公钥: + `ssh-keygen -t rsa -C "your_email@example.com"` + 需要将公钥文件放在目录 云端服务器 `authorized_keys` 下 且 文件名为: `用户.pub` ### 本地开发 `go mod tidy` ### 云端: + 修改配置 `conf/config.yaml` ### 编译 客户端 + `cd src/client` + `go build` + ### 编译 `go build -o 腾讯云服务器安全规则.exe main.go`