Skip to content

Commit

Permalink
update to 2.52
Browse files Browse the repository at this point in the history
修复使用代理时百度云登录超时的bug
任务列表UI调整,把删除按钮统一放右边
linux教程调整
  • Loading branch information
monkeyWie committed Apr 27, 2018
1 parent 09cb9d9 commit 26105d9
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .guide/common/ca/linux/read.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### linux安装证书
本教程以chrome浏览器为例,firefox的可以参考[火狐浏览器安装证书](https://github.com/monkeyWie/proxyee-down/blob/master/.guide/common/ca/firefox/read.md)
1. 右击软件托盘,点证书目录会跳转到对应目录
1. 右击软件托盘,点证书目录会跳转到对应目录,若没显示托盘可以在**软件安装目录/main/ssl**中找到证书。

2. 打开chrome,进入设置->高级->管理证书,选择授权中心然后点击导入,然后选择第一步证书目录中的ca.crt文件。在弹出的信任证书框中把三个复选框都勾上,点击确定即可。
![](https://github.com/monkeyWie/proxyee-down/raw/master/.guide/common/ca/linux/imgs/2-1.png)

Expand Down
1 change: 1 addition & 0 deletions .guide/common/ca/read.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@

- [windows安装证书](https://github.com/monkeyWie/proxyee-down/blob/master/.guide/common/ca/windows/read.md)
- [mac安装证书](https://github.com/monkeyWie/proxyee-down/blob/master/.guide/common/ca/mac/read.md)
- [linux安装证书](https://github.com/monkeyWie/proxyee-down/blob/master/.guide/common/ca/linux/read.md)
- [火狐浏览器安装证书](https://github.com/monkeyWie/proxyee-down/blob/master/.guide/common/ca/firefox/read.md)
3 changes: 1 addition & 2 deletions .guide/linux/read.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ xxx/bin/java -jar -Dfile.encoding=GBK -Xms256m -Xmx512m ./proxyee-down.jar
![10](https://github.com/monkeyWie/proxyee-down/raw/master/.guide/linux/imgs/10.png)

## 证书安装
- [查看](https://github.com/monkeyWie/proxyee-down/blob/master/.guide/common/ca/linux/read.md)
[查看](https://github.com/monkeyWie/proxyee-down/blob/master/.guide/common/ca/linux/read.md)

## SwitchyOmega插件安装与设置

[查看](https://github.com/monkeyWie/proxyee-down/blob/master/.guide/common/switchy/read.md)

## 完成
Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>proxyee-down</artifactId>
<groupId>lee.study</groupId>
<version>2.51</version>
<version>2.52</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>proxyee-down</artifactId>
<groupId>lee.study</groupId>
<version>2.51</version>
<version>2.52</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>lee.study</groupId>
<artifactId>proxyee-down</artifactId>
<version>2.51</version>
<version>2.52</version>
<packaging>pom</packaging>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion sniff/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>proxyee-down</artifactId>
<groupId>lee.study</groupId>
<version>2.51</version>
<version>2.52</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class BdyIntercept extends ResponseTextIntercept {

@Override
public boolean match(HttpResponse httpResponse, HttpProxyInterceptPipeline pipeline) {
return HttpUtil.checkUrl(pipeline.getHttpRequest(), "^(pan|yun).baidu.com.*$")
return HttpUtil.checkUrl(pipeline.getHttpRequest(), "^(pan|yun).baidu.com/(disk/home|s/|share/link).*$")
&& isHtml(httpResponse, pipeline);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ public void afterResponse(Channel clientChannel, Channel proxyChannel, HttpRespo
}
contentBuf = PooledByteBufAllocator.DEFAULT.buffer();
}
httpResponse.headers().set(HttpHeaderNames.CONTENT_TYPE,"text/html;charset=utf-8");
//直接调用默认拦截器,跳过下载拦截器
pipeline.getDefault()
.afterResponse(clientChannel, proxyChannel, httpResponse, pipeline);
httpResponse.headers().set(HttpHeaderNames.CONTENT_TYPE, "text/html;charset=utf-8");
httpResponse.headers().remove(HttpHeaderNames.TRANSFER_ENCODING);
} else {
isMatch = false;
pipeline.afterResponse(clientChannel, proxyChannel, httpResponse);
Expand All @@ -68,8 +66,17 @@ public void afterResponse(Channel clientChannel, Channel proxyChannel, HttpConte
GZIPOutputStream outputStream = new GZIPOutputStream(baos);
outputStream.write(temp);
outputStream.finish();
hookHttpContent.content().writeBytes(baos.toByteArray());
byte[] bts = baos.toByteArray();
//修改响应头Content-length
pipeline.getHttpResponse().headers().set(HttpHeaderNames.CONTENT_LENGTH, bts.length);
pipeline.getDefault()
.afterResponse(clientChannel, proxyChannel, pipeline.getHttpResponse(), pipeline);
hookHttpContent.content().writeBytes(bts);
} else {
//修改响应头Content-length
pipeline.getHttpResponse().headers().set(HttpHeaderNames.CONTENT_LENGTH, contentBuf.readableBytes());
pipeline.getDefault()
.afterResponse(clientChannel, proxyChannel, pipeline.getHttpResponse(), pipeline);
hookHttpContent.content().writeBytes(contentBuf);
}
ReferenceCountUtil.release(contentBuf);
Expand Down
10 changes: 9 additions & 1 deletion sniff/src/main/resources/hookjs/bdyHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ var initHookInterval = setInterval(function () {
} else if (selectFileList.length > 1) {
downloadType = 'batch';
}
if (selectFileList.length >= 1000) {
alert("由于百度云的限制,批量下载选中的文件数量不能超过1000,请分批下载");
return;
}
if (!checkFileName(selectFileList)) {
alert("文件夹名称不能包含+号,请修改名称后再下载");
return;
Expand Down Expand Up @@ -932,6 +936,10 @@ var initHookInterval = setInterval(function () {
alert('获取选中文件失败,请刷新重试');
return;
}
if (selectFileList.length >= 1000) {
alert("由于百度云的限制,批量下载选中的文件数量不能超过1000,请分批下载");
return;
}
if (!checkFileName(selectFileList)) {
alert("文件夹名称不能包含+号,请修改名称后再下载");
return;
Expand Down Expand Up @@ -1522,4 +1530,4 @@ var initHookInterval = setInterval(function () {
}());

})();
}, 200);
}, 200);
2 changes: 1 addition & 1 deletion ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>proxyee-down</artifactId>
<groupId>lee.study</groupId>
<version>2.51</version>
<version>2.52</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion ui/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
app.version=2.51
app.version=2.52
spring.profiles.active=prd
view.server.port = 8999
tomcat.server.port = 26339
Expand Down
4 changes: 2 additions & 2 deletions ui/view/src/components/TaskList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@
</el-col>
<el-col :span="3">
<div class="task-list-icon">
<i v-if="task.status==7" class="el-icon-task-folder"
@click="openTaskDir(task)"></i>
<i v-if="task.status!=7"
:class="iconClass(task)"
@click="controlTask(task)"></i>
<i class="el-icon-task-delete" @click="deleteTask(task)"></i>
<i v-if="task.status==7" class="el-icon-task-folder"
@click="openTaskDir(task)"></i>
</div>
</el-col>
</el-row>
Expand Down
2 changes: 1 addition & 1 deletion update/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>lee.study</groupId>
<artifactId>proxyee-down-update</artifactId>
<packaging>jar</packaging>
<version>2.51</version>
<version>2.52</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down

0 comments on commit 26105d9

Please sign in to comment.