[Cronet Feature request] How to set up DNS,Timeout and Proxy?

567 views
Skip to first unread message

Donghua News

unread,
Aug 15, 2021, 2:56:33 AM8/15/21
to net-dev
1. How to set DNS interfaces like Okhttp for Cronet to use DNS over HTTPS;
2. How to set HTTP proxy for Cronet
3. How to set TimeOut for each request.

Santosh Kumar Dhanyamraju

unread,
Oct 20, 2021, 11:02:46 AM10/20/21
to net-dev, ag2s20...@gmail.com
>>> 1. How to set DNS interfaces like Okhttp for Cronet to use DNS over HTTPS;
One way to set this is by "HostResolverRules" experimental option.

Dan Stahr

unread,
Nov 8, 2021, 5:08:11 AM11/8/21
to net-dev, Santosh Kumar Dhanyamraju, ag2s20...@gmail.com
2. Cronet will respect system wide proxy settings but we don't currently provide an API to change proxies on per-request or per-engine basis (https://crbug.com/418111).
3. Cronet doesn't support setting timeouts for requests individually. You can find some details why it's the case in code comments and this mail thread. You can implement your own timeout logic on top of Cronet, cancelling the UrlRequest if it's not completed in a timely fashion.

Anirudh Gupta

unread,
Sep 18, 2022, 5:22:46 PM9/18/22
to net-dev, Dan Stahr, Santosh Kumar Dhanyamraju, ag2s20...@gmail.com
"Cronet will respect system wide proxy settings"
Do you mean the user configurable proxy settings in the Android's Settings app? or something else...

Dan Stahr

unread,
Sep 20, 2022, 4:09:27 AM9/20/22
to Anirudh Gupta, net-dev, Santosh Kumar Dhanyamraju, ag2s20...@gmail.com
Yes, that's what I was referring to.
--
Dan Stahr | Software Engineer | dans...@google.com | +44 (0)738 4871125
Reply all
Reply to author
Forward
0 new messages