Tag: captivenetwork

打开手机浏览器连接到节点服务器

我需要一个节点中间件,build议手机,我的应用程序是一个强制性的门户网站,所有的请求都通过iptables规则redirect到节点(快速)服务器IP和应用程序完美的作品,但手机浏览器不开始连接,我认为是接近但它不工作: app.use((req, res, next) => { let sites = [ 'localhost:3000', 'localhost', '10.0.0.1:3000', '10.0.0.1', '127.0.0.1', '127.0.0.1:3000' ]; if (sites.indexOf(req.get('host')) === -1) { res.redirect(302, '10.0.0.1'); } }); 我debugging它,像“clients3.google.com/generate_204”等网站的请求被捕获,redirect响应发送,所以我认为是有关标题或redirect代码,但… 还是有另一种方法可以轻松地(使用IPtables或在/etc/resolv.conf中)?

避免强制门户

我试图做一个设备没有互联网连接,redirect到它的无线连接到一个独特的页面,像海盗一样的任何连接。 我使用NodeJS服务器和dnsmasq将所有连接redirect到服务器。 这是完美的工作,但是当我尝试与Android或iOS智能手机连接时,它将其检测为强制门户,并且页面显示在身份validationpopup窗口中。 我看到设备尝试连接到一些IP,如果没有响应,则认为连接正在通过强制门户。 有没有办法避免这种情况? 非常感谢! 编辑:我发现页面的列表“白名单”: Android Captive Portal Detection: Domain names to white list: clients3.google.com iOS for iPhone: iPhone is more complicated, since it uses many different domain names, maybe for load balancing. It also changed its strategy using different domain names through different OS versions. iOS 6: Domain names to white list: […]