pull/330/head
laoyuyu 6 years ago
parent 343848b557
commit d61417537b
  1. 10
      Aria/src/main/java/com/arialyy/aria/core/download/FtpDirDownloadTarget.java
  2. 16
      Aria/src/main/java/com/arialyy/aria/core/download/FtpDownloadTarget.java
  3. 10
      Aria/src/main/java/com/arialyy/aria/core/upload/BaseNormalTarget.java
  4. 7
      DEV_LOG.md
  5. 13
      README.md
  6. 4
      app/src/main/AndroidManifest.xml
  7. 6
      app/src/main/java/com/arialyy/simple/test/TestFTPActivity.java
  8. 2
      build.gradle

@ -79,6 +79,16 @@ public class FtpDirDownloadTarget extends BaseGroupTarget<FtpDirDownloadTarget>
}
}
}
if (mTaskEntity.getUrlEntity().isFtps) {
if (TextUtils.isEmpty(mTaskEntity.getUrlEntity().storePath)) {
ALog.e(TAG, "证书路径为空");
return false;
}
if (TextUtils.isEmpty(mTaskEntity.getUrlEntity().keyAlias)) {
ALog.e(TAG, "证书别名为空");
return false;
}
}
return b;
}

@ -17,10 +17,12 @@ package com.arialyy.aria.core.download;
import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import com.arialyy.aria.core.common.ftp.FTPSConfig;
import com.arialyy.aria.core.common.ftp.FtpDelegate;
import com.arialyy.aria.core.inf.AbsTaskEntity;
import com.arialyy.aria.core.inf.IFtpTarget;
import com.arialyy.aria.util.ALog;
import com.arialyy.aria.util.CommonUtil;
import java.net.Proxy;
@ -61,6 +63,20 @@ public class FtpDownloadTarget extends BaseNormalTarget<FtpDownloadTarget>
return new FTPSConfig<>(this);
}
@Override protected boolean checkEntity() {
if (mTaskEntity.getUrlEntity().isFtps){
if (TextUtils.isEmpty(mTaskEntity.getUrlEntity().storePath)){
ALog.e(TAG, "证书路径为空");
return false;
}
if (TextUtils.isEmpty(mTaskEntity.getUrlEntity().keyAlias)){
ALog.e(TAG, "证书别名为空");
return false;
}
}
return super.checkEntity();
}
/**
* 设置文件保存文件夹路径
*

@ -80,6 +80,16 @@ abstract class BaseNormalTarget<TARGET extends AbsUploadTarget>
mEntity.save();
mTaskEntity.save();
}
if (mTaskEntity.getUrlEntity().isFtps) {
if (TextUtils.isEmpty(mTaskEntity.getUrlEntity().storePath)) {
ALog.e(TAG, "证书路径为空");
return false;
}
if (TextUtils.isEmpty(mTaskEntity.getUrlEntity().keyAlias)) {
ALog.e(TAG, "证书别名为空");
return false;
}
}
return b;
}

@ -1,9 +1,10 @@
## 开发日志
+ v_3.4.8
- 组合任务新增`updateUrls(List<String>)`用于修改组合子任务的url,[see](https://aria.laoyuyu.me/aria_doc/api/task_handle.html#%E6%9B%B4%E6%96%B0%E4%BB%BB%E5%8A%A1url)
- 组合任务新增`updateUrls(List<String>)`用于修改组合子任务的url,[see](https://aria.laoyuyu.me/aria_doc/api/update_url.html)
- 出于安全考虑,FTP数据库去掉密码的保存
- 增加FTPS支持 [see]()
- 增加速度限制支持[see]()
- 增加FTPS支持 [see](https://aria.laoyuyu.me/aria_doc/download/ftps.html)
- 增加速度限制支持[see](https://aria.laoyuyu.me/aria_doc/api/speed_handle.html)
- 增加内存空间不足验证
+ v_3.4.7
- 修复分块任务异常操作导致的问题
+ v_3.4.6

@ -11,6 +11,7 @@ Aria有以下特点:
- 支持HTTP任务组\FTP文件夹,断点续传下载
- 支持HTTP表单上传
- 支持文件FTP断点续传上传
- 支持FTPS/SFTP断点续传,[see](https://aria.laoyuyu.me/aria_doc/download/ftps.html)
+ 支持https地址下载
- 在配置文件中很容易就可以设置CA证书的信息
+ 支持[多线程分块下载](https://aria.laoyuyu.me/aria_doc/start/config.html),能更有效的发挥机器IO性能
@ -31,8 +32,8 @@ Aria有以下特点:
[![Download](https://api.bintray.com/packages/arialyy/maven/AriaApi/images/download.svg)](https://bintray.com/arialyy/maven/AriaApi/_latestVersion)
[![Download](https://api.bintray.com/packages/arialyy/maven/AriaCompiler/images/download.svg)](https://bintray.com/arialyy/maven/AriaCompiler/_latestVersion)
```java
compile 'com.arialyy.aria:aria-core:3.4.7'
annotationProcessor 'com.arialyy.aria:aria-compiler:3.4.7'
compile 'com.arialyy.aria:aria-core:3.4.8'
annotationProcessor 'com.arialyy.aria:aria-compiler:3.4.8'
```
如果出现android support,请将 `compile 'com.arialyy.aria:aria-core:<last-version>'`替换为
```
@ -100,8 +101,12 @@ protected void onCreate(Bundle savedInstanceState) {
### 版本日志
+ v_3.4.7
- 修复分块任务异常操作导致的问题
+ v_3.4.8
- 组合任务新增`updateUrls(List<String>)`用于修改组合子任务的url,[see](https://aria.laoyuyu.me/aria_doc/api/update_url.html)
- 出于安全考虑,FTP数据库去掉密码的保存
- 增加FTPS支持 [see](https://aria.laoyuyu.me/aria_doc/download/ftps.html)
- 增加速度限制支持[see](https://aria.laoyuyu.me/aria_doc/api/speed_handle.html)
- 增加内存空间不足验证
[更多版本记录](https://github.com/AriaLyy/Aria/blob/master/DEV_LOG.md)

@ -17,9 +17,9 @@
<!--android:name=".download.group.DownloadGroupActivity"-->
<!--android:name=".test.AnyRunActivity"-->
<!--android:name=".test.TestFTPDirActivity"-->
<!--android:name=".test.TestFTPActivity"-->
<!--android:name=".download.SingleTaskActivity"-->
<activity
android:name=".download.SingleTaskActivity"
android:name=".test.TestFTPActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

@ -6,6 +6,7 @@ import android.util.Log;
import android.view.View;
import com.arialyy.annotations.Upload;
import com.arialyy.aria.core.Aria;
import com.arialyy.aria.core.common.ProtocolType;
import com.arialyy.aria.core.common.RequestEnum;
import com.arialyy.aria.core.upload.UploadTask;
import com.arialyy.aria.util.ALog;
@ -83,9 +84,8 @@ public class TestFTPActivity extends BaseActivity<ActivityTestBinding> {
.setUploadUrl(URL)
.setExtendField("韩寒哈大双")
.asFtps()
.setStorePath("/mnt/sdcard/Download/server.crt")
.setAlias("www.laoyuyu.me")
.setStorePass("123456")
//.setStorePath("/mnt/sdcard/Download/server.crt")
//.setAlias("www.laoyuyu.me")
.start();
//Uri uri = Uri.parse("ftp://z:z@dygod18.com:21211/[电影天堂www.dy2018.com]猩球崛起3:终极之战BD国英双语中英双字.mkv");
//ALog.d(TAG, "sh = " + uri.getScheme() + ", user = " + uri.getUserInfo() + ", host = " + uri.getHost() + ", port = " + uri.getPort() + " remotePath = " + uri.getPath());

@ -39,7 +39,7 @@ task clean(type: Delete) {
ext {
userOrg = 'arialyy'
groupId = 'com.arialyy.aria'
publishVersion = '3.4.7'
publishVersion = '3.4.8'
// publishVersion = '1.0.3' //FTP插件
repoName='maven'
desc = 'android 下载框架'

Loading…
Cancel
Save