Chrome integration with command line tools

I'm trying to set up some integration between Chrome and various command line tools and create the systems that I have. Almost everything that I want to do in Chrome is supported by the extension API, so I decided that I would do the extension, configure the connection between it and my external tools and from there.

Unfortunately, I cannot find a reasonable way to receive messages in and out of Chrome. The only thing I could find that it would be plausible to work at all would be to represent the local web server as a message broker, having an extension connecting to it using WebSockets, and then using command line utilities. But in this case there are too many difficulties - basically this would mean creating a coherent IPC infrastructure.

Is there any reasonable way to do this?

+4
source share
1 answer

There is currently no way to allow external users to communicate outside of Chrome without the XHR / WebSockets / SocketAPI or any traditional methods such as image URLs, JavaScript URLs, etc.

If you want to do an enumeration, you can try creating an NPAPI plugin that writes protocol messages to disk / file (for example, how Apache WebServer works) and creates another stand-alone Python script / or any other scripting language that processes this, Thus, your API will basically read this file, which creates the NPAPI extension plugin.

+1
source

Source: https://habr.com/ru/post/1387899/


All Articles