clb-quic-demo icon indicating copy to clipboard operation
clb-quic-demo copied to clipboard

请教图片域名和备选的域名不一致能匹配上吗?确定使用了quic?

Open yangwangzhong opened this issue 4 years ago • 4 comments

private static String[] imageUrls= {
        "https://stgwhttp2.kof.qq.com/1.jpg",
        "https://stgwhttp2.kof.qq.com/2.jpg",
        "https://stgwhttp2.kof.qq.com/3.jpg",
        "https://stgwhttp2.kof.qq.com/4.jpg",
        "https://stgwhttp2.kof.qq.com/5.jpg",
        "https://stgwhttp2.kof.qq.com/6.jpg",
        "https://stgwhttp2.kof.qq.com/7.jpg",
        "https://stgwhttp2.kof.qq.com/8.jpg",
        "https://stgwhttp2.kof.qq.com/01.jpg",
        "https://stgwhttp2.kof.qq.com/02.jpg",
        "https://stgwhttp2.kof.qq.com/03.jpg",
        "https://stgwhttp2.kof.qq.com/04.jpg",
        "https://stgwhttp2.kof.qq.com/05.jpg",
        "https://stgwhttp2.kof.qq.com/06.jpg",
        "https://stgwhttp2.kof.qq.com/07.jpg",
        "https://stgwhttp2.kof.qq.com/08.jpg"
};

private static synchronized CronetEngine getCronetEngine(Context context) {
    // Lazily create the Cronet engine.
    if (cronetEngine == null) {
        CronetEngine.Builder myBuilder = new CronetEngine.Builder(context);
        // Enable caching of HTTP data and
        // other information like QUIC server information, HTTP/2 protocol and QUIC protocol.
        cronetEngine = myBuilder
                .enableHttpCache(CronetEngine.Builder.HTTP_CACHE_DISABLED, 100 * 1024)
                .addQuicHint("stgwhttps.kof.qq.com", 443, 443)
                //.enableHttp2(true)
                .enableQuic(true)
                .build();
        //    .setUserAgent("clb_quic_demo")
    }
    return cronetEngine;
}

备选机制是URL匹配,或者是符合Google相关域名后缀匹配上才能使用,看log,并没有用上quic

yangwangzhong avatar Feb 12 '20 05:02 yangwangzhong

另外,想问一下https://game.qzone.qq.com,这个域名也用了quic吗?用Chrome访问,抓包显示不是Quic, 为啥不行?是quic的版本问题吗?我使用的版本为Q046,麻烦大佬解答🙏

yangwangzhong avatar Feb 12 '20 06:02 yangwangzhong

我看log也是没走quic。是不是已经关了quic的服务?

jenics avatar Feb 14 '20 05:02 jenics

另外,想问一下https://game.qzone.qq.com,这个域名也用了quic吗?用Chrome访问,抓包显示不是Quic, 为啥不行?是quic的版本问题吗?我使用的版本为Q046,麻烦大佬解答🙏

腾讯看样子是quic/39 ,现在最新的chrome已是quic/46,不兼容下面的版本了。

jenics avatar Feb 20 '20 05:02 jenics

也可以用q43,后面更新的版本我们会在今年上半年更新

tk1061178 avatar Mar 05 '21 12:03 tk1061178