ios 9.x - ipv6 Test not work.. (CURLE_COULDNT_CONNECT) · Issue #594 · curl/curl · GitHub
Skip to content You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert ios 9.x - ipv6 Test not work.. (CURLE_COULDNT_CONNECT) #594 New issue Copy link New issue Copy link Closed Closed ios 9.x - ipv6 Test not work.. (CURLE_COULDNT_CONNECT) #594 Copy link Description masteage opened on Jan 8, 2016 Issue body actions setting curl version v7.39.0 , v7.40.0 device iPhone 5s , ios 9.1 Xcode version 6.4 wifi Mac OS X El Capitan shared wifi (NAT64) error CURLE_COULDNT_CONNECT (7) state version info data curl_version_info_data->features (573980) ,CURL_VERSION_IPV6 == false.
CURLOPT_IPRESOLVE default (CURL_IPRESOLVE_WHATEVER) url ipv6 able (other ios native api use test) question how to solve this.. Activity bagder commented on Jan 8, 2016 bagder on Jan 8, 2016 Member More actions Are you running a program that works fine otherwise on other platforms (like native mac) ? CURLE_COULDNT_CONNECT means libcurl failed to establish a TCP connection to the remote host (and port). Are you sure you're supposed to be able to without using a proxy or any other similar means?
Can you telnet to that host + port from the same machine that curl fails to work on? Can you generate a full VERBOSE-enabled log for when you do this and show us? I don't think we have many iPhone users among or developers so I think you're left a bit on your own to further debug this. But me knowingly, it should just work fine on iOS as well. Have you gotten this to work with any other libcurl version? masteage commented on Jan 8, 2016 masteage on Jan 8, 2016 Author More actions (1) normal network is no problem (live ios (iphone,ipad..) project) (2) test network setting https://developer.apple.com/library/tvos/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW16 (3) version version is not problem (ipv4 network env is no problem) bagder commented on Jan 8, 2016 bagder on Jan 8, 2016 Member More actions if ipv4 works and ipv6 doesn't, that sounds more like an OS issue then anything else to me. libcurl really doesn't do much difference between IP versions and CURLE_COULDNT_CONNECT means that connect() returned a failure.
What else can we do? masteage commented on Jan 8, 2016 masteage on Jan 8, 2016 Author More actions thanks, your answer. i will more test ... (other network , os, device) masteage commented on Jan 8, 2016 masteage on Jan 8, 2016 Author More actions (1) how to check ipv6 able? curl_version_info->features & CURL_VERSION_IPV6 check is (2) if ipv6 check is “curl_version_info->features & CURL_VERSION_IPV6” , this value when change? [lib time change(setting) or runtime change?] (3) hot to set ipv6 able ? in code able ? (etc) curl_version_info->features value (ipv6 not work state) 573980 (false values) CURL_VERSION_IPV6 CURL_VERSION_KERBEROS4 CURL_VERSION_GSSNEGOTIATE CURL_VERSION_DEBUG CURL_VERSION_ASYNCHDNS CURL_VERSION_SPNEGO CURL_VERSION_IDN CURL_VERSION_SSPI CURL_VERSION_CONV CURL_VERSION_CURLDEBUG CURL_VERSION_HTTP2 CURL_VERSION_GSSAPI CURL_VERSION_KERBEROS5 (my code) curl_easy_setopt(curl, CURLOPT_URL, url); header = curl_slist_append( header , "Content-Type: text/html"); curl_easy_setopt( curl , CURLOPT_HTTPHEADER , header ); curl_easy_setopt( curl , CURLOPT_WRITEFUNCTION, func); curl_easy_setopt( curl , CURLOPT_WRITEHEADER, strRecvHeader); curl_easy_setopt( curl , CURLOPT_WRITEDATA, strRecvBody); curl_easy_setopt( curl , CURLOPT_POSTFIELDS , strData.c_str() ); curl_easy_setopt( curl , CURLOPT_POST , true ); curl_easy_setopt( curl, CURLOPT_TIMEOUT, 10); res = curl_easy_perform(curl); bagder commented on Jan 8, 2016 bagder on Jan 8, 2016 Member More actions The CURL_VERSION_IPV6 bit is set if libcurl "supports IPv6".
With that set, it can resolve host names to IPv6 addresses. Without it, it can't so it can't do IPv6 at all. So if your libcurl is built without IPv6 support, the problem is not exactly what you've said (since you can't use IPv6) and again it would've showed in the VERBOSE log you have not shown us. You need a libcurl built to support IPv6 in order to use IPv6. bagder commented on Jan 11, 2016 bagder on Jan 11, 2016 Member More actions A libcurl without IPv6 support cannot speak IPv6. bagder closed this as completed on Jan 11, 2016 masteage commented on Jan 12, 2016 masteage on Jan 12, 2016 Author More actions (1) ios device is not VERBOSE log. (simulator is log has) (2) simulator log (normal case) * Trying 80.67 .6 .
50. .. * Connected to curl . haxx . se ( 80.67 . 6.50 ) port 80 ( #0 ) > POST / HTTP / 1.1 Host : curl . haxx . se Accept : * / * Content - Type : text / html Content - Length : 1388 Expect : 100 - continue < HTTP / 1.1 100 Continue < HTTP / 1.1 200 OK < Date : Tue , 12 Jan 2016 01 : 25 : 45 GMT < Server : Apache < Upgrade : h2c < Connection : Upgrade < Last - Modified : Mon , 11 Jan 2016 03 : 05 : 02 GMT < ETag : "bda-5290634075674" < Accept - Ranges : bytes < Content - Length : 3034 < Vary : Accept - Encoding < Content - Type : text / html < * Connection #0 to host curl.haxx.se left intact bagder commented on Jan 12, 2016 bagder on Jan 12, 2016 Member More actions But that "normal case" shows it only using IPv4...
An IPv6 capable curl would be more likely to say this: $ curl -v curl.haxx.se * Rebuilt URL to: curl.haxx.se/ * Trying 2a00:1a28:1200:9::2... * Connected to curl.haxx.se (2a00:1a28:1200:9::2) port 80 (#0) > GET / HTTP/1.1 > Host: curl.haxx.se > User-Agent: curl/7.46.0 > Accept: */* > < HTTP/1.1 200 OK < Date: Tue, 12 Jan 2016 07:41:29 GMT < Server: Apache masteage commented on Jan 12, 2016 masteage on Jan 12, 2016 Author More actions (1) yes, "normal case" is using IPv4 (ios simulator) (2) i used cocos2s-x's curl lib (ios device is not enabled) (3) my build lib - ios device is not enabled setting , why ??? i just default build. (from v0.7.40) i386 , x86_64 is "checking whether to enable IPv6... yes" armv7 , arm64 is "checking whether to enable IPv6... no" bagder commented on Jan 12, 2016 bagder on Jan 12, 2016 Member More actions When it says 'no', load the config.log file and search for the ipv6 test and you'll see what it tried to do and what failed.
I think the problem is that when you cross-compile, that test doesn't really work. I would probably recommend you to manually edit lib/curl_config.h after configure has run and enable IPv6 there. bagder commented on Jan 12, 2016 bagder on Jan 12, 2016 Member More actions I will actually switch the default for that for the next curl version. bagder added a commit that references this issue on Jan 12, 2016 configure: assume IPv6 works when cross-compiled 4bed87f masteage commented on Jan 12, 2016 masteage on Jan 12, 2016 Author More actions thanks, your answer. my default setting is bug. add "--enable-ipv6" is solution. and, change default setting thanks. flyingsky commented on Aug 20, 2016 flyingsky on Aug 20, 2016 More actions @masteage Is you app approved after change?
I use https://github.com/sinofool/build-libcurl-ios to build curl with openssl, it can pass the DNS64/NAT64 local settings. But it's still rejected on Apple review ipv6 environment. SpringMT commented on Sep 2, 2016 SpringMT on Sep 2, 2016 More actions @flyingsky Is Apple review still rejected? reasten commented on Feb 8, 2017 reasten on Feb 8, 2017 More actions Under IPV6 environment, curl returns ok while running on simulators, but curl returns error while running on real iPhone device.I added the following code in my program to check IPV6 features: curl_version_info_data *d=curl_version_info(CURLVERSION_NOW); printf("feature=%04x, CURL_VERSION_IPV6=%d\n ",d->features, CURL_VERSION_IPV6); The results shows the followings: (1) CURL_VERSION_IPV6=1 under both emulators and real devices (2) the lo
The rest of this page is on the live site.