Reputation: 891
Is there a way to start the TCP server that will listen port using Firefox WebExtension? I know that exist way to start server with XUL/XPCOM extension, but it is obsolete and will not be supported (deprecated) from November 2017. The same question interests and about google chrome.
Upvotes: 1
Views: 1316
Reputation: 1052
With the removal of XPCOM, add-ons access to UDP and TCP sockets will disappear, which will cause problems for a number of add-ons.
– Adam Roach
This is being tracked at Firefox bug FF#1435798 (libdweb):
It's been discussed and everyone seems to like the idea.
if somebody is motivated to work on this, sketching out a design that meets the requirements outlined above would be the first step.
we are all for a well thought out API and that's the next step for someone to take on.
You can keep an eye on their progress for it, or lend a hand, at the Git repo.
Of course, as the other answerer notes, a native host / buddy software component is the only workaround at this time; you've got to run some kind of privileged/native code to open sockets until or unless libdweb
gets released.
Upvotes: 1
Reputation: 77541
No, a Chrome Extension / Firefox WebExtension cannot open a socket to listen.
However, you could have a separate Native Host component that does it for you. It will need to be installed separately.
Upvotes: 1