Skip to content

Commit cafdfae

Browse files
author
Taois
committed
feat:更改目录
1 parent e76e50a commit cafdfae

File tree

15 files changed

+55
-12
lines changed

15 files changed

+55
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ go.work.sum
3030
# Editor/IDE
3131
.idea/
3232
# .vscode/
33+
/.claude/

mediaProxy/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ build:
3030
# 构建所有平台
3131
build-all: clean deps
3232
@echo "构建所有平台..."
33-
@chmod +x build.sh
34-
@./build.sh --all
33+
@chmod +x scripts/build.sh
34+
@./scripts/build.sh --all
3535

3636
# 构建指定平台
3737
# 用法: make build-platform PLATFORM=linux/amd64
3838
build-platform: clean deps
3939
@echo "构建平台: $(PLATFORM)"
40-
@chmod +x build.sh
41-
@./build.sh --platform $(PLATFORM)
40+
@chmod +x scripts/build.sh
41+
@./scripts/build.sh --platform $(PLATFORM)
4242

4343
# 开发模式构建(快速构建,不优化)
4444
dev:

mediaProxy/README.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,32 @@
1313
- 🔧 **灵活配置**: 支持动态调整线程数、分片大小等参数
1414
- 🔐 **安全认证**: 支持自定义认证密钥,保护API访问安全
1515

16+
## 项目结构
17+
18+
```text
19+
mediaProxy/
20+
├── base/ # 核心基础组件
21+
│ ├── client.go # HTTP 客户端封装(带重试机制等)
22+
│ └── emitter.go # 流式传输控制组件
23+
├── docs/ # 项目文档
24+
│ ├── BUILD_WINDOWS.md # Windows 编译指南
25+
│ └── README_DEV.md # 开发者与调试指南
26+
├── scripts/ # 构建与打包脚本
27+
│ ├── build.sh # Linux/macOS 跨平台编译脚本
28+
│ ├── build.bat/.ps1 # Windows 跨平台编译脚本
29+
│ ├── build_goproxy.ps1 # Android(ARM/ARM64) 专属编译脚本
30+
│ ├── update_jar.ps1 # 打包二进制文件到 custom_spider.jar 的脚本
31+
│ └── calc_md5.ps1 # 计算 jar 文件 MD5
32+
├── static/ # Web 前端静态资源
33+
│ └── index.html # 本地代理配置生成页面
34+
├── build/ # 跨平台编译输出目录 (由 build 脚本生成)
35+
├── dist/ # 跨平台发布包目录 (由 build 脚本生成)
36+
├── goProxy/ # Android 编译输出目录 (由 build_goproxy 脚本生成)
37+
├── proxy.go # 程序入口和主要代理逻辑
38+
├── custom_spider.jar # 包含 Android 二进制代理程序的 TVBox 插件包
39+
└── Dockerfile # Docker 构建配置
40+
```
41+
1642
## 快速开始
1743

1844
### 运行程序
@@ -84,13 +110,13 @@ curl -X POST "http://localhost:57574/" \
84110
#### 方法1: 使用构建脚本(推荐)
85111
```bash
86112
# Linux/macOS
87-
chmod +x build.sh
88-
./build.sh --all # 构建所有平台
89-
./build.sh --platform linux/amd64 # 构建指定平台
113+
chmod +x scripts/build.sh
114+
./scripts/build.sh --all # 构建所有平台
115+
./scripts/build.sh --platform linux/amd64 # 构建指定平台
90116

91117
# Windows
92-
build.bat # 构建所有平台
93-
build.bat -p windows/amd64 # 构建指定平台
118+
.\scripts\build.bat # 构建所有平台
119+
.\scripts\build.bat -p windows/amd64 # 构建指定平台
94120
```
95121

96122
#### 方法2: 使用Makefile
File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ go run proxy.go -debug -port 5575
7373
`mediaProxy` 目录下,直接运行提供的 PowerShell 脚本:
7474

7575
```powershell
76-
./build_goproxy.ps1
76+
.\scripts\build_goproxy.ps1
7777
```
7878

7979
**脚本主要工作**:
@@ -89,7 +89,7 @@ go run proxy.go -debug -port 5575
8989
`mediaProxy` 目录下,运行打包脚本:
9090

9191
```powershell
92-
./update_jar.ps1
92+
.\scripts\update_jar.ps1
9393
```
9494

9595
**脚本主要工作**:

mediaProxy/goProxy/goProxy-amd64

2.22 MB
Binary file not shown.

mediaProxy/goProxy/goProxy-arm

1.94 MB
Binary file not shown.

mediaProxy/goProxy/goProxy-arm64

1.93 MB
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ REM 支持多平台编译,优化二进制文件体积
66

77
title MediaProxy Build Script
88

9+
REM 切换到项目根目录
10+
cd /d "%~dp0.."
11+
912
REM 项目信息
1013
set APP_NAME=mediaProxy
1114
set BUILD_DIR=build
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ param(
1515
# Set error handling
1616
$ErrorActionPreference = "Stop"
1717

18+
# Set working directory to project root
19+
Set-Location "$PSScriptRoot\.."
20+
1821
# Project information
1922
$AppName = "mediaProxy"
2023
$BuildDir = "build"

0 commit comments

Comments
 (0)