简体   繁体   English

如何在Android热点之外访问本地服务器上的页面

[英]How to access a page on my local server outside my android hotspot

I have a JEE application running on apache server over port 8080 on my laptop. 我的笔记本电脑上通过端口8080在apache服务器上运行了一个JEE应用程序。

My laptop is connected to internet via android hotspot, port 8080 is not blocked by firewall on my laptop. 我的笔记本电脑通过android热点连接到互联网,端口8080未被笔记本电脑上的防火墙阻止。

How can I access a page from my server through a device outside my hotspot? 如何通过热点之外的设备从服务器访问页面?

IPConfig on my laptop: 我的笔记本电脑上的IPConfig:

ipv4:  192.168.43.95
default gateway: 192.168.43.1

I tried to use port forwarder app on my phone to configure port forwarding from port 8080 to IP 192.168.43.95 : port 8080 我试图在手机上使用端口转发器应用程序来配置从端口8080到IP 192.168.43.95的端口转发:端口8080

Port forwarder displayed my device(android) as 100.85.254.126. 端口转发器将我的设备(android)显示为100.85.254.126。

My public IP on my laptop is 101.222.171.254 (checked by typing 'what is my ip' on google) and this ip is same for android device serving the hotspot (sure the android device is acting as router). 我在笔记本电脑上的公共IP是101.222.171.254(通过在Google上键入“ what is my ip”进行检查),并且该IP地址与服务于该热点的android设备相同(请确保android设备充当路由器)。

I need to access pages on my server over internet (from device not in my hotspot), I tried accessing pages on my server over 100.85.254.126:8080 and 101.222.171.254:8080, I receive connection timed out in both the cases. 我需要通过Internet访问服务器上的页面(从不在我的热点中的设备),我尝试通过100.85.254.126:8080和101.222.171.254:8080访问服务器上的页面,在两种情况下我都收到连接超时。

Is there any way to get this to work? 有什么办法可以使它正常工作吗?

I think tou will need to forward your port 8080 on your router. 我认为tou将需要在路由器上转发端口8080。 I'm not sure. 我不确定。

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

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