服务器套接字:无端口转发
感谢您提前的任何答复。
无论如何,我制作了一个 Android 应用程序(这不是 Android 问题),它连接到您的计算机,以便您可以监视它。好吧,我已经准备好了计算机的服务器,客户端可以通过手机访问它,它工作得很好。问题是,你必须向前移动,但并不是每个人都知道如何做到这一点。有没有一种方法可以让您以编程方式实现它,这样您就不必向前移植? 再次感谢!
Thanks for any answers in advance.
Anyways, I made an android application, (This isn't an android question), and it connects to your computer so you can monitor it. Well I have the server for the computer ready to the client from the phone can access it, it works perfectly. The problem is, You have to port forward, and not everybody knows how to do that. Is there a way so you can programmatically make it so you do not have to port forward?
Thanks again!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的意思是您必须在路由器上设置端口转发(因为您使用带有宽带连接的路由器)?
不可以。
您需要在互联网上的某个地方设置一个双方都可以连接的中间服务器,然后通过该服务器转发数据。
You mean you had to set up port forwarding on your router (because you're using a router with your broadband connection)?
No.
You would need to set up a intermediary server on the internet somewhere that both could connect to, then forward the data through that.
您可以让两者都连接到您自己的服务器。比任何其他方法都更痛苦,但保证有效。
我不确定 droid 的具体情况,但您也许可以通过其 IP 直接访问 droid。
否则,您可以设置一个简单的教程程序,其中包含有关如何转发的具体说明。您甚至可以编写一个小程序来直接访问某些流行供应商的端口转发。也许只是一个要求密码并连接并自动完成所有操作的小事情。对于某些供应商来说,这不会太困难。
You can have both connect to a server of yours. More of a pain than any other method, but guaranteed to work.
I'm not sure about the specifics of the droid, but you may be able to access the droid directly through its IP.
Otherwise you could set up a simple tutorial program, with specific instructions on how to port forward. You could even make a little program to access certain popular vendors port forwarding directly. Maybe just a little thing that asks for a password and connects and does everything automatically. Wouldn't be horribly difficult with some vendors.