File tree Expand file tree Collapse file tree 2 files changed +99
-30
lines changed
Expand file tree Collapse file tree 2 files changed +99
-30
lines changed Original file line number Diff line number Diff line change 1+ name : Release Build
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ build :
10+ name : Build and Release
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ goos : [windows, linux, darwin]
15+ goarch : [386, amd64]
16+ include :
17+ - goos : windows
18+ ext : .exe
19+ - goos : linux
20+ ext : ' '
21+ - goos : darwin
22+ ext : ' '
23+
24+ steps :
25+ - name : Checkout code
26+ uses : actions/checkout@v4
27+
28+ - name : Set up Go
29+ uses : actions/setup-go@v4
30+ with :
31+ go-version : ' 1.22.1'
32+
33+ - name : Build binary
34+ env :
35+ GOOS : ${{ matrix.goos }}
36+ GOARCH : ${{ matrix.goarch }}
37+ CGO_ENABLED : 0
38+ run : |
39+ output_name=convnetgo-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}
40+ go build -ldflags="-s -w" -o "$output_name"
41+
42+ - name : Upload artifacts
43+ uses : actions/upload-artifact@v3
44+ with :
45+ name : binaries
46+ path : convnetgo-*
47+
48+ release :
49+ needs : build
50+ runs-on : ubuntu-latest
51+ steps :
52+ - name : Download artifacts
53+ uses : actions/download-artifact@v3
54+ with :
55+ name : binaries
56+ path : dist
57+
58+ - name : Create Release
59+ uses : softprops/action-gh-release@v1
60+ with :
61+ files : dist/*
62+ generate_release_notes : true
63+ env :
64+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ ConvnetGo 是一个基于 Go 语言开发的 P2P 网络连接工具,支持 Win
44
55## 功能特点
66
7- - 支持 Windows 和 Linux 系统
7+ - 支持 Windows、Linux 和 macOS 系统
8+ - 支持多架构:32位(386)和64位(amd64)
89- 基于 WebRTC 的 P2P 连接
910- TAP 虚拟网卡支持
1011- 自动重连机制
@@ -23,6 +24,30 @@ ConvnetGo 是一个基于 Go 语言开发的 P2P 网络连接工具,支持 Win
2324### Linux
2425- 需要 root 权限来创建和配置 TAP 设备
2526
27+ ## 构建说明
28+
29+ ### 本地构建
30+
31+ 项目提供了跨平台构建脚本:
32+
33+ - Windows平台运行 ` 编译全平台.bat `
34+ - 编译后的文件将保存在 ` build ` 目录下
35+
36+ ### 自动发布流程
37+
38+ 项目使用GitHub Actions实现自动化构建和发布:
39+
40+ 1 . 创建新的发布标签:
41+ ``` bash
42+ git tag v1.0.0
43+ git push origin v1.0.0
44+ ```
45+
46+ 2 . 推送标签后,GitHub Actions将自动:
47+ - 构建所有平台的二进制文件
48+ - 创建GitHub Release
49+ - 上传构建产物
50+
2651## 配置说明
2752
2853配置文件 ` convnet.json ` 包含以下主要参数:
@@ -95,35 +120,15 @@ convnetgo
95120- 支持 NAT 穿透
96121- 使用 TCP 长连接保持会话
97122
98- ### 安全机制
99-
100- 1 . ** 数据加密**
101- - 使用 AES-CBC 模式加密敏感数据
102- - 随机生成 IV (初始化向量)
103- - 采用 PKCS7 填充标准
104- - Base64 编码传输加密数据
105-
106- 2 . ** 身份认证**
107- - 支持双重身份认证机制
108- - 私有身份(UUID)用于本地认证
109- - 公开身份(PublicID)用于 P2P 连接
110-
111- 3 . ** TURN 服务器安全**
112- - 使用 realm 域隔离
113- - 动态生成的认证密钥
114- - 基于用户名和密码的访问控制
115- - TURN 凭证通过 AES-CBC 加密传输
116-
117- ## 注意事项
123+ ### 依赖项
118124
119- 1 . 首次运行会自动生成配置文件
120- 2 . Windows 系统必须预先安装 TAP 驱动
121- 3 . 确保配置的端口范围在防火墙中已开放
122- 4 . 服务端需要同时开放 TCP 和 UDP 端口
123- 5 . 建议妥善保存生成的 UUID,它是客户端的唯一标识
125+ - Go 1.22.1 或更高版本
126+ - 主要依赖包:
127+ - github.com/pion/webrtc/v4
128+ - github.com/pion/turn/v2
129+ - github.com/google/gopacket
130+ - github.com/labstack/echo
124131
125- ## TODO 功能
132+ ## 许可证
126133
127- - 黑名单功能
128- - 端口屏蔽
129- - 密码访问控制
134+ [ MIT License] ( LICENSE )
You can’t perform that action at this time.
0 commit comments