当前位置:网站首页>Solve the problem that the 5+APP real machine test cannot access the background (same local area network)
Solve the problem that the 5+APP real machine test cannot access the background (same local area network)
2022-08-02 04:06:00 【Gawk papa】
项目描述
客户端,基于H5Plus使用MUI框架开发的APP,The operating environment is the real machine test of Xiaomi mobile phone.
服务端,使用SpringBoot搭建的项目,运行环境为SpringBoot内置Tomcat,部署端口为8090.
问题分析
电脑和手机连接同一个WiFi,The phone clicks the button,触发Ajax请求,Can't access deployed on laptopSpringBoot后台.
原Ajax请求地址,使用的是localhost
,打开电脑cmd窗口,输入ipconfigInquire about the computeripv4地址,修改localhostFor the computer private networkIP.
mui.ajax("http://192.168.1.215:8090/coding/send",{
data:{
user:telephone.value,
},
dataType:'json',//服务器返回json格式数据
type:'post',//HTTP请求类型
timeout:10000,//超时时间设置为10秒;
headers:{
'Content-Type':'application/x-www-form-urlencoded'},
注: The best way here,is written aloneIP配置文件,This way you only need to change the configuration file each timeIP就可以了.
After updating the mobile phone code,重试Ajax请求.Still unable to communicate with the background,Ajax返回abort
错误,此时防火墙已经关闭.
Turn on what the phone is connected toWiFi设置,Find the phone at this timeIP地址,在电脑的cmd窗口中ping一下,可以ping通,But just can't access the backend,The packet capture tool did not catch any packets.
此时,Both the mobile phone and the computer are in the same local area network,The firewall is not blocking the request,Tencent Computer Manager has been closed.继续在cmd窗口使用netstat -na
查看TCP的192.168.1.215:8090Whether there is a connection status,并没有找到8090端口的TCP连接.
原因分析
It is found by querying that the router has oneAP隔离模式,Because the router is not my home,So it is impossible to determine whether the route is enabledAP隔离模式,But the real machine test results andAPIsolation is very similar.
APIsolation is a routing pattern.APIsolation refers to after opening,The individual connected devices cannot communicate with each other,起到隔离的作用,to ensure the safety of different users.《详细见 百度百科AP隔离》
解决方案
方案 1(极不推荐) Break the condition that the mobile phone and the computer are in the same local area network,使用NAT做内网穿透,Mobile phones and computers can be in different local areas,You can directly access the background in the public network,Haven't tried this approach,个人觉得比较麻烦.
方案 2(推荐) 在上述问题的基础上(Connect your phone and computer to the same oneWiFi路由器上,constituted in the same LAN condition),如果有条件,Try turning off the routerAP隔离.
方案 3(推荐) Turn on the mobile hotspot on the computer,The mobile phone is connected to the hotspot in the same LAN condition.
方案 4(推荐) Turn on the mobile hotspot on your phone,The computer is connected to the hotspot in the same LAN condition.
注: Every option hereIP地址都不一样.
All programs need to pay attention to the following points:
- Turn off the computer firewall or add inbound rules in the control panel
- Ajax请求IPThe address needs to be changed to that of the current computerIP地址
- 修改完了IP,Don't forget to sync to your Android phone
如果连接成功,使用netstat -an
Yes, mobile phones and computers can be found8090one of the portsTCP连接的;同时,在SpringBootThe background will also record.
边栏推荐
- 财产清查概述、 全面清查的情况、局部清查的情况、财产清查的方法、财产清查结果的处理
- 云安全笔记:云原生全链路加密
- hackmyvm: may walkthrough
- Basic use of v-on, parameter passing, modifiers
- SQL注入(6)
- 管理会计(对内)指引、管理会计要素及其具体内容(可能考,考前记一下,推荐记一下四个大点即可)、
- 阿里云MySQL5.7安装以及部分主要问题(总和)
- hackmyvm: again walkthrough
- CTF introductory notes ping
- 17. JS conditional statements and loops, and data type conversion
猜你喜欢
CTF introductory notes ping
考(重点理解哪些属于其他货币资金)、其他货币资金的内容、其他货币资金的账务处理(银行汇票存款、银行本票存款、信用卡存款、信用证保证金存款、存出投资款、外埠存款)
Introduction to PHP (self-study notes)
链动2+1无限循环系统,2022年起盘成功率超高的模式
hackmyvm: kitty walkthrough
hackmyvm-hopper预排
What are the killer super powerful frameworks or libraries or applications for PHP?
Pycharm打包项目为exe文件
Offensive and defensive world - novice MISC area 1-12
redis未授权访问(4-unacc)
随机推荐
After Alibaba Cloud sets up domain name resolution redirection, I cannot use Chrome to access it
Shuriken: 1 vulnhub walkthrough
hackmyvm-random walkthrough
财产清查概述、 全面清查的情况、局部清查的情况、财产清查的方法、财产清查结果的处理
Offensive and defensive world - novice MISC area 1-12
12. What is JS
政府会计的概念、政府会计标准体系、政府会计的特点(会形成小考点)、政府会计要素及其确认和计量、政府预算会计要素、政府财务会计要素
PHP Foundation March Press Announcement Released
Mysql创建索引
学IT,找工作——反转链表
考(重点理解哪些属于其他货币资金)、其他货币资金的内容、其他货币资金的账务处理(银行汇票存款、银行本票存款、信用卡存款、信用证保证金存款、存出投资款、外埠存款)
(2) 顺序结构、对象的布尔值、选择结构、循环结构、列表、字典、元组、集合
The shooting range that web penetration must play - DVWA shooting range 1 (centos8.2+phpstudy installation environment)
ES6 three-dot operator, array method, string extension method
真·杂项:资本论阅读笔记(随缘更新)
一次代码审计的笔记(CVE-2018-12613 phpmyadmin文件包含漏洞)
xxe of CTF
(1) the print () function, escape character, binary and character encoding, variables, data type, the input () function, operator
CTF入门笔记之SQL注入
二舅为什么能刷屏?这三件事对企业公关的启示