forked from peterq/pan-light
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # server/pan-light-server.go
- Loading branch information
Showing
156 changed files
with
553,528 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,55 @@ | ||
## pan-light, 百度网盘不限速客户端 | ||
# pan-light | ||
|
||
``` | ||
_ _ _ _ | ||
| (_) | | | | | ||
_ __ __ _ _ __ | |_ __ _| |__ | |_ | ||
| '_ \ / _` | '_ \ | | |/ _` | '_ \| __| | ||
| |_) | (_| | | | | | | | (_| | | | | |_ | ||
| .__/ \__,_|_| |_| |_|_|\__, |_| |_|\__| | ||
| | __/ | | ||
|_| |___/ | ||
``` | ||
# pan-light | ||
|
||
> pan-light 是一款不限速的百度网盘客户端, 基于 golang + Qt5 开发. | ||
本项意义在于探究 golang 在图形界面客户端; web 服务端; 事件调度, websocket, p2p 长连接 等方面的应用和实践. | ||
欢迎广大 golang 开发者参与本项目. | ||
|
||
### 开发环境 | ||
1. golang环境 | ||
2. qt环境, 并设置环境变量 | ||
3. 安装proto buf | ||
[软件官网](https://pan-light.peterq.cn) | [在线体验](https://pan-light.peterq.cn/doc) | [技术文档](https://pan-light.peterq.cn/doc) | [交流群: 438604465](https://jq.qq.com/?_wv=1027&k=52HpwTS) | ||
|
||
## 特性 | ||
|
||
- 利用golang轻量级协程, 高并发分段下载, 可通过调节并发数达到最佳下载速度; 下载进度状态数据持久化到磁盘, 实现软件重启后可断点续传; | ||
- 客户端本地实现简单代理, 突破百度防盗链, 将网盘视频喂给qt视频播放组件, 从而在线播放视频 | ||
- 在线体验: 用户无需下载, 通过网页即可在线体验本软件部分功能; 该系统可应用于其他客户端产品的在线体验; | ||
- 在线体验原理: 闲置的个人pc, 通过 docker 开启若干个'虚拟机', 虚拟机内安装好了本软件以及vnc服务. | ||
用户打开网页, 在服务端的调度下, 网页通过 web rtc 和闲置pc建立p2p连接. | ||
闲置pc将会打通一条用户网页到docker内部'隧道'. 网页连接虚拟机vnc服务进行远程控制 | ||
|
||
## 关于 | ||
本项目是作者第一个完整的go语言实战项目. 希望对于一些找不到好的实战项目的go语言初学者能起到一点帮助, | ||
欢迎你们阅读项目技术文档, 源码, 并参与到项目开发. 但也正由于作者也是初学者且项目工作量挺大,个人精力有限等一些原因, 在代码严谨方面还有待后续跟进. | ||
比如,你会看到为了网络数据的传递方便, 项目用了大量的`map[string]interface{}`类型, 并且没有做严格类型判断; 有些低频竞争数据的锁也省掉了, 等等; 欢迎大家一起来完善. | ||
|
||
## 软件截图 | ||
 | ||
|
||
 | ||
|
||
 | ||
|
||
 | ||
|
||
## 其他 | ||
|
||
- 本项目花费了作者大量的时间和精力, 如果你觉得本项目对你有帮助, 帮忙点个star. | ||
|
||
- 在线体验系统的源码暂未push到github. 如果需要, 你可以打开在线体验页面, 按f12, 按控制台描述方式获取 | ||
|
||
- 作者QQ | ||
|
||
 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
_book/ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 在线演示系统 | ||
|
||
## 敬请期待 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# golang | ||
|
||
> 本项目使用的是go1.12 | ||
golang 官网 https://golang.org; | ||
|
||
墙内用户可在这里下载: https://golang.google.cn/dl/ | ||
|
||
> 为了加快下载go包速度, 建议使用go mod代理: | ||
将`export GOPROXY=https://goproxy.io` 加入到 `~/.bashrc`文件. | ||
这是一个免费公共代理, 更多信息, 可访问 https://goproxy.io/ 下面是官网截图, 有意思了 | ||
|
||
 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# 环境搭建 | ||
|
||
本项目需要以下开发环境 | ||
* golang 1.12 主要编程语言 | ||
* qt5 实现界面显示 | ||
* protobuf 实现数据序列化 | ||
* docker 实现在线演示'虚拟机' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# protobuf | ||
|
||
> protobuf 是google出品的一个跨语言数据序列化库. | ||
它由2个部分组成:一个是protoc程序, 用来将数据格式描述文件(proto文件)转换成需要的编程语言代码. | ||
另一部分就是编程语言运行的支持库, 比如golang中的 github.com/golang/protobuf/proto 包. | ||
这里我们先下载安装protoc程序 | ||
|
||
## 安装protoc | ||
|
||
```bash | ||
# 获取源码包 | ||
wget https://github.com/google/protobuf/archive/v3.5.0.tar.gz | ||
|
||
# 解压缩并进入源码目录 | ||
tar -zxvf v3.5.0.tar.gz | ||
cd protobuf-3.5.0 | ||
|
||
# 生成configure文件 | ||
./autogen.sh | ||
|
||
# 编译安装 | ||
./configure | ||
make | ||
make check | ||
make install | ||
``` | ||
|
||
## 相关资料 | ||
- [golang-protobuf快速上手指南](https://studygolang.com/articles/14337) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# qt5 | ||
|
||
## 下载 | ||
|
||
> Qt 是由c++构建的夸平台gui框架, 本项目使用的Qt \>= 5.11 版本. | ||
本项目gui部分基于qt quick, 也就是qml语言实现. 如果你不懂, 没关系, 作者也是第一次接触, | ||
很简单, 是JavaScript语法. 如果你会js, 入门只需半天 | ||
|
||
下载地址 http://download.qt.io/archive/qt/5.12/5.12.4/ | ||
也可以通过系统的包管理器安装 | ||
|
||
## 配置环境变量 | ||
|
||
将如下内容加入`~/.bashrc` | ||
|
||
```bash | ||
export QT_VERSION=5.11.3 # 你安装的qt的版本 | ||
export QT_DIR=/media/peterq/files/dev/env/qt # 你安装的qt的路径 | ||
``` | ||
|
||
这2个环境变量是 github.com/peterq/pan-light/qt 这个模块用来创建qt 的 c++ 到 golang 的中间代码的 | ||
|
||
## 相关资料 | ||
- [QML入门教程](https://blog.csdn.net/qq_40194498/article/details/79849807) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 下载器实现 | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 独立包实现 | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 并发下载 | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 断点续传 | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 速度统计 | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Qt & Go | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 用plugin加速编译 | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# qml异步调用go | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 方法互调 | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Go中使用Qt | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# pan-light | ||
|
||
``` | ||
_ _ _ _ | ||
| (_) | | | | | ||
_ __ __ _ _ __ | |_ __ _| |__ | |_ | ||
| '_ \ / _` | '_ \ | | |/ _` | '_ \| __| | ||
| |_) | (_| | | | | | | | (_| | | | | |_ | ||
| .__/ \__,_|_| |_| |_|_|\__, |_| |_|\__| | ||
| | __/ | | ||
|_| |___/ | ||
``` | ||
|
||
> pan-light 是一款不限速的百度网盘客户端, 基于 golang + Qt5 开发. | ||
本项意义在于探究 golang 在图形界面客户端; web 服务端; 事件调度, websocket, p2p 长连接 等方面的应用和实践. | ||
欢迎广大 golang 开发者参与本项目. | ||
|
||
[软件官网](https://pan-light.peterq.cn) | [在线体验](https://pan-light.peterq.cn/doc) | [技术文档](https://pan-light.peterq.cn/doc) | [交流群: 438604465](https://jq.qq.com/?_wv=1027&k=52HpwTS) | ||
|
||
## 特性 | ||
|
||
- 利用golang轻量级协程, 高并发分段下载, 可通过调节并发数达到最佳下载速度; 下载进度状态数据持久化到磁盘, 实现软件重启后可断点续传; | ||
- 客户端本地实现简单代理, 突破百度防盗链, 将网盘视频喂给qt视频播放组件, 从而在线播放视频 | ||
- 在线体验: 用户无需下载, 通过网页即可在线体验本软件部分功能; 该系统可应用于其他客户端产品的在线体验; | ||
- 在线体验原理: 闲置的个人pc, 通过 docker 开启若干个'虚拟机', 虚拟机内安装好了本软件以及vnc服务. | ||
用户打开网页, 在服务端的调度下, 网页通过 web rtc 和闲置pc建立p2p连接. | ||
闲置pc将会打通一条用户网页到docker内部'隧道'. 网页连接虚拟机vnc服务进行远程控制 | ||
|
||
## 关于 | ||
- 本项目是作者第一个完整的go语言实战项目. 希望对于一些找不到好的实战项目的go语言初学者能起到一点帮助, | ||
欢迎你们阅读项目技术文档, 源码, 并参与到项目开发. 但也正由于作者也是初学者且项目工作量挺大,个人精力有限等一些原因, 在代码严谨方面还有待后续跟进. | ||
比如,你会看到为了网络数据的传递方便, 项目用了大量的`map[string]interface{}`类型, 并且没有做严格类型判断; 有些低频竞争数据的锁也省掉了, 等等; 欢迎大家一起来完善. | ||
|
||
- 本文档所描述的操作都是基于linux的, 作者使用Ubuntu进行开发. 你也可以用windows开发不过需要你自己折腾. 折腾之后欢迎补充本文档 | ||
|
||
- 本项目花费了作者大量的时间和精力, 如果你觉得本项目对你有帮助, 帮忙点个star. | ||
|
||
- 在线体验系统的源码暂未push到github. 如果需要, 你可以打开在线体验页面, 按f12, 按控制台描述方式获取 | ||
|
||
- 作者QQ | ||
|
||
 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# pan-light | ||
|
||
- [环境搭建](DevEnv/introduction.md) | ||
- [golang](DevEnv/golang.md) | ||
- [qt5](DevEnv/qt5.md) | ||
- [protobuf](DevEnv/protobuf.md) | ||
|
||
- 开始 | ||
- [目录结构](Start/directory.md) | ||
- [项目初始化](Start/init.md) | ||
|
||
- [Qt & Go](LangBind/introduction.md) | ||
- [Go中使用Qt](LangBind/qt_in_go.md) | ||
- qml & go通信 | ||
- [方法互调](LangBind/qml/call.md) | ||
- [qml异步调用go](LangBind/qml/async.md) | ||
- [用plugin加速编译](LangBind/plugin.md) | ||
|
||
- [下载器实现](Downloader/introduction.md) | ||
- [独立包设计](Downloader/package.md) | ||
- [并发下载](Downloader/parallel.md) | ||
- [速度统计](Downloader/speed_count.md) | ||
- [断点续传](Downloader/point_continue.md) | ||
|
||
- [服务端相关](Server/introduction.md) | ||
- [频率限制器](Server/throttle.md) | ||
- [时间轮算法](Server/time_wheel.md) | ||
- [用户认证](Server/auth.md) | ||
- [参数处理](Server/param.md) | ||
- [错误处理](Server/error.md) | ||
|
||
- [在线演示系统](Demo/introduction.md) | ||
- rpc实现 | ||
- docker & vnc | ||
- web rtc | ||
- 即时通信 | ||
- 排队系统 | ||
- 匿名聊天-武侠角色 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 用户认证 | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 错误处理 | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 服务端相关 | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 参数处理 | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 频率限制器 | ||
|
||
## todo... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 时间轮算法 | ||
|
||
## todo... |
Oops, something went wrong.