admin管理员组

文章数量:1289415

Is it possible to connect openVPN programmatically from the Chrome extension API? All I've found in Chrome extensions API docs are chrome.proxy and chrome.socket.

I belive it is possible to run external program using NPAPI and this extenral program will create nessesary openVPN connection.

UPD: It seems that OpenVPN have TCP/Socket management interface ( see .php/open-source/documentation/miscellaneous/79-management-interface.html ) So it is rather easy to connect it from Chrome extension programmatically.

Is it possible to connect openVPN programmatically from the Chrome extension API? All I've found in Chrome extensions API docs are chrome.proxy and chrome.socket.

I belive it is possible to run external program using NPAPI and this extenral program will create nessesary openVPN connection.

UPD: It seems that OpenVPN have TCP/Socket management interface ( see http://openvpn/index.php/open-source/documentation/miscellaneous/79-management-interface.html ) So it is rather easy to connect it from Chrome extension programmatically.

Share Improve this question edited Jan 16, 2014 at 23:21 Kirzilla asked Jan 16, 2014 at 22:56 KirzillaKirzilla 16.6k27 gold badges88 silver badges131 bronze badges 2
  • 1 NPAPI could do it, but chrome has announced they are going to kill NPAPI support sometime in 2014. At this point, the only thing that can run an external program on Chrome is a protocol handler. – vcsjones Commented Jan 16, 2014 at 22:59
  • my guess is several "high profile" NPAPI plugins will get whitelisted, like Java and Silverlight. – vcsjones Commented Jan 16, 2014 at 23:20
Add a ment  | 

1 Answer 1

Reset to default 3

@vcsjones is correct... the proper way would be with NPAPI or a protocol handler. However, there is another method.

In the past, when I have needed to execute native code with a browser extension, I embed a small HTTP server into a native application that can be called from the browser extension. This allows me to write whatever I need to, while the browser extension is nothing but a control for that native application. You could then easily write something to control OpenVPN.

本文标签: javascriptConnect OpenVPN in Chrome extensionStack Overflow