Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl in iOS 13 & cellular & HTTPS is very slow in first connect #5678

Closed
yuanjilee opened this issue Jul 13, 2020 · 9 comments
Closed

curl in iOS 13 & cellular & HTTPS is very slow in first connect #5678

yuanjilee opened this issue Jul 13, 2020 · 9 comments

Comments

@yuanjilee
Copy link

yuanjilee commented Jul 13, 2020

I did this

I have try Wifi or HTTP or blew iOS 13, it's normal and fast.

Only timeout in first or second connect, after connected, the network request is recover OK.

I expected the following

I expected the specific situation have a normal but not always timeout in first connect.

curl/libcurl version

V7.71.1 (I have try the newest version)

[curl -V output]

operating system

log : Request URL is https://office.project.sumpay.cn/api/approval/group-templates/for/me, method GET
log : Request URL is https://office.project.sumpay.cn/api/approvals/waiting/count, method GET
*   Trying 192.168.11.31:443...
*   Trying 192.168.11.31:443...
* Connected to office.project.sumpay.cn (192.168.11.31) port 443 (#0)
* ALPN, offering http/1.1
* Connected to office.project.sumpay.cn (192.168.11.31) port 443 (#0)
* ALPN, offering http/1.1
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* ALPN, server did not agree to a protocol
* Server certificate: office.project.sumpay.cn
* Server certificate: Encryption Everywhere DV TLS CA - G1
* Server certificate: DigiCert Global Root CA
> GET /api/approvals/waiting/count HTTP/1.1


Host: office.project.sumpay.cn

Accept: */*

Content-type:application/json

User-Agent:Worktile-Enterprise

access-token:3ce9f2a927aa4242adcd0e1a9d2e2603

app-key:65dddfa99d3d42758fd9c02ea6554e41

client-version:7.3.0

device-id:33C1907B-7780-49B2-8643-C7B490C50582

signature:528b4c9f

store-from:AppStore

timestamp:1594360614

version:1



* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* ALPN, server did not agree to a protocol
* Server certificate: office.project.sumpay.cn
* Server certificate: Encryption Everywhere DV TLS CA - G1
* Server certificate: DigiCert Global Root CA
> GET /api/approval/group-templates/for/me HTTP/1.1


*   Trying 192.168.11.31:443...
*   Trying 192.168.11.31:443...
* Connection failed
* Connection failed
* connect to 192.168.11.31 port 443 failed: Operation timed out
* connect to 192.168.11.31 port 443 failed: Operation timed out
* Failed to connect to office.project.sumpay.cn port 443: Operation timed out
* Failed to connect to office.project.sumpay.cn port 443: Operation timed out
* Closing connection 0
* Closing connection 0
@jay
Copy link
Member

jay commented Jul 13, 2020

It looks like a network issue, not a curl issue.

@yuanjilee
Copy link
Author

It looks like a network issue, not a curl issue.

I have the same guess first. But I have a lot of test, the issue only occur in the specific situation. with same condition, but on Android, or iOS < 13, or with Wifi or HTTP, all this situation is OK, but iOS 13 & cellular & HTTPS the first connect failed. I am trying to figure out if Apple does something in iOS 13. do someone have the same case?

@carenas
Copy link
Contributor

carenas commented Jul 13, 2020

192.168.11.31 is an internal (RFC1918 reserved IP) which shouldn't be routable in the public internet (what you should get when connected by cellular) resulting in "connection timeout".

@bagder
Copy link
Member

bagder commented Jul 13, 2020

If the only difference is the iOS version, then I blame the OS. I'm not aware of anything we need to do special as of iOS 13, but then I'm also not very knowledgeable about Apple details.

@yuanjilee
Copy link
Author

192.168.11.31 is an internal (RFC1918 reserved IP) which shouldn't be routable in the public internet (what you should get when connected by cellular) resulting in "connection timeout".

Yes, I used VPN to access internal network, and i have exclude the problem of VPN.

@yuanjilee
Copy link
Author

If the only difference is the iOS version, then I blame the OS. I'm not aware of anything we need to do special as of iOS 13, but then I'm also not very knowledgeable about Apple details.

I find Requirements for trusted certificates in iOS 13 and macOS 10.15, but my certificates conform all the requirements. I am continue trying.

@hetz
Copy link

hetz commented Jul 16, 2020

I get same problem

@bagder
Copy link
Member

bagder commented Jul 17, 2020

Run the code with a debugger and find out where in the code and in which state curl is when it seems to be slow/idle?

I presume you build curl to use Secure Transport for this, or what TLS library do you use?

@jay jay added the needs-info label Jul 22, 2020
@bagder
Copy link
Member

bagder commented Sep 5, 2020

Nobody seems to work on this and we have not gotten more info. The questions asked are not answered after months. The issue sounds like an OS/network stack issue and not a curl issue. Closing.

@bagder bagder closed this as completed Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants