从Android应用访问Chromebook的localhost?
I have a Chromebook that I've set up in Developer Mode, with a crouton-installed version of Linux running alongside. Within the Linux crouton
, I'm running a simple web server.
我有一个我在开发者模式下设置的Chromebook,并且安装了一个crouton安装的Linux版本。在Linux crouton中,我正在运行一个简单的Web服务器。
My question is whether it's possible to access that server using any Android apps that are also running on that Chromebook?
我的问题是,是否可以使用Chromebook上运行的任何Android应用访问该服务器?
Android apps have been installable natively on ChromeOS for some time, but everything that I've read says that they run in some kind of sandbox. ChromeOS
itself is pretty tight with its firewall rules as well.
Android应用程序已经在ChromeOS上原生安装了一段时间,但我读过的所有内容都说它们运行在某种沙盒中。 ChromeOS本身的防火墙规则也很紧张。
Just to get a start, I'm trying to use the Android version of the Chrome browser to load up a page that's running on a web server in the Linux crouton. I've tried localhost
,127.0.0.1
, and the Chromebook's current IP address.
为了开始,我正在尝试使用Android版本的Chrome浏览器来加载在Linux程序包中的Web服务器上运行的页面。我试过localhost,127.0.0.1和Chromebook的当前IP地址。
I followed the instructions at https://developer.android.com/topic/arc/index.html to enable Developer Mode on the Android
side and also, I think, loosen up those firewall rules on the ChromeOS
side.
我按照https://developer.android.com/topic/arc/index.html上的说明启用了Android方面的开发者模式,我认为,放宽了ChromeOS方面的防火墙规则。
Is there some secret sauce that I'm missing? Is this even possible at all?
有什么秘密酱我不见了吗?这甚至可能吗?
2 个解决方案
#1
0
I had the exact same question and found this: https://developer.android.com/topic/arc/index.html#network
我有完全相同的问题,发现这个:https://developer.android.com/topic/arc/index.html#network
It seems that in essence there is no IP traffic allowed from local Chrome to the Android web servers..
从本质上来说,从本地Chrome到Android网络服务器,似乎没有IP流量。
Update (thanks jlb for the ping) However, you can run ifconfig
in crouton. And then you can access your content via that IP address. I wonder if Firefox takes that shortcut for you..
更新(感谢ping的jlb)但是,你可以在crouton中运行ifconfig。然后,您可以通过该IP地址访问您的内容。我想知道Firefox是否为您提供了这条捷径...
更多相关文章
- 搭建linux服务器并部署java web项目(CentOS7+tomcat+Mysql)
- Linux网络编程-客户端与服务器端通信(Echo)
- Linux服务器权限管理实践——添加用户只访问某些文件目录
- 一·创建Linux服务器(基于阿里云)
- Linux安装SVN服务器
- Linux服务器下用svn创建多个项目
- Linux 系统下 DNS 服务器的架设
- 如果后台的SVN服务器IP地址更改了,如何修改客户端的连接url呢?
- Linux下各类TCP网络服务器的实现源代码