2017-10-10 201 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记录。谢谢我们的工程师。

谢谢谢尔盖。