Giter Site home page Giter Site logo

Comments (9)

ssseasonnn avatar ssseasonnn commented on May 22, 2024

正常情况下不需要任何修改就支持https,如果你的连接是自己签发的证书,那需要你自己配置okhttp让它信任你自己的证书

from rxdownload.

everyline avatar everyline commented on May 22, 2024

不是自己签发的证书 ,是默认所有的证书 会下载失败 不支持https

from rxdownload.

everyline avatar everyline commented on May 22, 2024

如果是配置okhttp 信任自己的证书 需要怎么写

from rxdownload.

ssseasonnn avatar ssseasonnn commented on May 22, 2024

你能把你具体的报错信息贴出来吗?你说不支持https,你有把demo代码拉下来看吗?demo里就是https的下载链接

from rxdownload.

everyline avatar everyline commented on May 22, 2024

图片
Hostname 39.165.164.20 not verified:
certificate: sha256/MS2HqIvRWLHr0b6GGKPUzqB6xsUxE6t4SDhSH6I/jro=
DN: CN=yc.hngfyjy.com
subjectAltNames: [yc.hngfyjy.com]

from rxdownload.

ssseasonnn avatar ssseasonnn commented on May 22, 2024

https://blog.csdn.net/zzz_zzz_z/article/details/51824765, 这里有解决办法

from rxdownload.

ssseasonnn avatar ssseasonnn commented on May 22, 2024

fun Task.download(
header: Map<String, String> = RANGE_CHECK_HEADER,
maxConCurrency: Int = DEFAULT_MAX_CONCURRENCY,
rangeSize: Long = DEFAULT_RANGE_SIZE,
dispatcher: Dispatcher = DefaultDispatcher,
validator: Validator = SimpleValidator,
storage: Storage = SimpleStorage,
request: Request = RequestImpl, // 替换你自己的Request对象
watcher: Watcher = WatcherImpl
)

创建任务的时候,指定你自己的Request对象,在你自己的Request对象里面,添加okhttp信任所有证书的代码

from rxdownload.

everyline avatar everyline commented on May 22, 2024

https://39.165.164.20:8888/lingzhang_1.0_release.apk 就是这样的https 请求

from rxdownload.

everyline avatar everyline commented on May 22, 2024

ok 已经解决了 谢谢

from rxdownload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.