简体   繁体   English

TIdTCPClient Android 未连接到本地 PC 上的 TIdTCPServer

[英]TIdTCPClient Android not connecting to TIdTCPServer on local PC

Using Rad Studio (Delphi) 10.3.2, I have a TCPServer app on my local PC and created an app running on an Android phone to connect using the local IP address, but I get "Connect timed out".使用 Rad Studio (Delphi) 10.3.2,我在本地 PC 上有一个 TCPServer 应用程序,并创建了一个在 Android 手机上运行的应用程序,以使用本地 IP 地址进行连接,但我得到“连接超时”。 Both are connected to the same local network via 192.168.1.x range addresses.两者都通过 192.168.1.x 范围地址连接到同一个本地网络。 I can ping the phone device from my PC.我可以从我的 PC ping 电话设备。 I can connect to the TCPServer from another Windows PC on the network, so that's working.我可以从网络上的另一台 Windows PC 连接到 TCPServer,这样就可以了。

I don't understand what could be getting in the way.我不明白会发生什么。 Is there something in Android preventing connections to a local IP address? Android 中是否有东西阻止连接到本地 IP 地址? I have the Android Manifest for my app allowing INTERNET access but not sure if there is another one for accessing the local network.我的应用程序有 Android 清单,允许 INTERNET 访问,但不确定是否还有另一个可以访问本地网络。

I also tried connecting from the phones Chrome browser but nothing arrives at all at the TCP Server.我还尝试从手机 Chrome 浏览器连接,但 TCP 服务器上什么也没有。

It turns out it was caused by the 1.1.1.1 DNS app that I had installed on the phone.原来这是由我在手机上安装的 1.1.1.1 DNS 应用程序引起的。 Disable that and then local IP connections are possible.禁用它,然后本地 IP 连接是可能的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM