I want to create a TCP server and listen on it. I need access to the tab content, so I need a chrome extension. Sadly, only chrome apps can create TCP servers.
Is it a valid/good concept to create a TCP server in a chrome app and let the app communicate with an extension (is this even possible?)?
If not, what would be my alternatives? The only idea I have is to change from server model to client model and let the extension connect to an external server. This solution would be poor in my situation, so I try to avoid it as best as I can.
What I want to achieve is that I can build a chrome extension that modifies/refreshes content with remote access (nothing malicious). External programs should be able to connect to the extension (or: the app) and send their commands to it.
Yes it's a good idea.
1°) You should create a Chrome App Web Server (based on https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/webserver for example, or any other HTTP s)
2°) Then you should request it from any javascripted web page via XmlHttpRequest.
+++: No need for Chrome Extension. Should work with any modern browser on Windows / Mac / Linux with Chrome 33+ installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With