2017-10-10 156 views
0

我們無法通過應用程序測試。在Apple的請求下,我們將靜態IPv6地址添加到我們的服務器。隨着我們的申請,一切都爲我們解決,但又被拒絕了。問題依然存在。Delphi 10.1柏林idHTTP/IPv6/iOS/Socket錯誤#51網絡無法訪問

他們得到一個錯誤:Socket Error #51 Network is unreachable.

爲什麼他們不能在測試過程中連接到我們的服務器目前還不清楚?

我們做錯了什麼?我們需要支持IPv4和IPv6嗎?

我們使用下列部件

客戶:

  1. idHTTP
  2. IdSSLIOHandlerSocketOpenSSL

服務器:

  1. IdHTTPServer
  2. IdServerIOHandlerSSLOpenSSL

該服務器有一個靜態的IPv6地址,這是可用的。

我們處理以下方式連接:

try 
IdSSLIOHandlerSocketOpenSSL1.IPVersion := Id_IPv6; 
answerBuff := idHTTP1.Post('https://[xxxx:a0e0:bad:bad::53]:8001/', tmpPostRequestData); 
except 
IdSSLIOHandlerSocketOpenSSL1.IPVersion := Id_IPv4; 
answerBuff := idHTTP1.Post('https://xx.85.157.25:8001', tmpPostRequestData); 
end; 

我們不使用域名,只有直接地址。 服務器IPv6地址可用。請幫助別人。

原諒我們的英語。

+1

您應該設置'TIdHTTP'自己的'IPVersion'屬性而不是'SSLIOHandler'屬性。如果可以的話,由於'TIdHTTP'自動從傳入的URL中確定IP版本。只有在使用主機名時(如果不包含在括號中),您不需要在使用IP地址時手動指定'IPVersion'。請求IPv6地址時,您是否驗證設備是否連接到IPv6網絡?在您將應用程序提交給商店之前,您是否根據Apple的指導進行過任何本地測試? –

+0

@RemyLebeau - 非常感謝雷米。 以下是蘋果員工寫給我們的信息: –

+0

@RemyLebeau >在連接到IPv6網絡的Wi-Fi上運行iOS 11.0.2的iPhone 6上進行審覈時,我們在您的應用中發現了一個或多個錯誤。 --- Remy,我們有一個測試應用程序,將使用以下代碼: > IdSSLIOHandlerSocketOpenSSL1.IPVersion:= Id_IPv6; answerBuff:= idHTTP1。Post('https:// [2a03:a0e0:bad:bad :: 53]:8001 /',tmpPostRequestData); 該應用程序工作正常,有一個連接。但是如果我們發送一個Apple版本相同的版本,那麼由於某些原因,他們無法連接。 –

回答

0

我們有解決方案。

我們解決了Wi-Fi連接的問題。

  1. The roots of the problem were growing due to the use of SSL. Please note that the receiving side (server) must listen to your secure traffic on port 443. Accordingly, the client must also send traffic to this port, or do not specify the port in the URL.

  2. The second part of the problem was that after a lot of failure using the domain name, I despaired and refused to use the domain name to send requests, and tried to use direct IPv4, IPv6 address. It was a wrong decision. The problem is that SSL certificates are issued to the name of my domain, but not to the addresses of the tied servers.The firewall was cursing and did not let us go any further. Just use your domain name, and use correct ports.

不要忘記在您的donaim名稱中包含AAAA ns記錄。謝謝我們的工程師。

謝謝謝爾蓋。

相關問題