Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
openvpn-client
Advanced tools
Create an OpenVPN client instance, using "openvpn" command.
$ npm install openvpn-client
OpenVPNClient represents an instance of openvpn running as client It passes the array of options passed to the constructor as arguments to the openvpn command. Apart from that, it supports writing to a temporary authentication file that is then passed as --auth-user-pass argument.
The class is not exposed publicly, but instantiated through other exported functions.
function (buffer)
When data are received from the server.
function ()
When connection to server is initialized successfully.
function (exitCode)
When connection to server is closed.
Argument: vpnOpts The arguments passed to openvpn command.
Pass a username and password to use as authentication.
If this function is used, then the --auth-user-pass argument is added automatically.
parameters:
Start OpenVPN process.
It returns a Promise that is fulfilled when "Inititialization Sequence Completed" message is received from the server.
Instead of promises you can use callbacks by passing a callback function.
parameters:
# Kill the OpenVPN process.
disconnect: ->
new Promise (resolve, reject) =>
@proc.kill()
@proc.on 'exit', ->
resolve()
Default array of options. Any options passed to subsequent functions are merged with this array.
Create an openvpn client.
Create an OpenVPNClient that connects immediately, and return a disposer that disconnects the client.
It will setup authentication based on the first parameter, and it will return a disposer that when cleaned up disconnects the process. Use this function when a connection is needed for a specific period of time.
Use it in combination with bluebird's resource management through Promise.using function.
If you're having any problem, please raise an issue on GitHub and the Resin.io team will be happy to help.
Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning.
The project is licensed under the MIT license.
FAQs
Create OpenVPN client instances.
The npm package openvpn-client receives a total of 47 weekly downloads. As such, openvpn-client popularity was classified as not popular.
We found that openvpn-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.