
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
github.com/durgasomeswararao/go-openvpn-mgmt
Advanced tools
This repository contains a Go package that implements a client for the OpenVPN management interface.
This can be used to monitor and control an OpenVPN process running with its management port enabled.
Currently only a subset of the protocol is supported, primarily focused on monitoring status changes and cleanly shutting down or restarting connections. Patches that add additional functionality in a manner consistent with the existing features will be gratefully accepted.
go get github.com/apparentlymart/go-openvpn-mgmt/openvpn
First, we can import the package:
import (
"github.com/apparentlymart/go-openvpn-mgmt/openvpn"
)
The default imported package name is openvpn.
OpenVPN's management interface can be used in two different modes: either OpenVPN opens a TCP listen port and the management client connects to it, or the management client opens a TCP listen port and OpenVPN connects to it.
The default configuration is for the OpenVPN process to act as the TCP
server. Launch OpenVPN with the argument --management <listen-addr> <port>
to activate this mode, and then connect to it by passing the same address
and port to openvpn.Dial. For example:
eventCh := make(chan openvpn.Event, 10)
client, err := openvpn.Dial("127.0.0.1:6061", eventCh);
if err != nil {
panic(err)
}
// "client" is now connected to the OpenVPN process and can send
// it commands. "eventCh" can be read to get asynchronous events from
// OpenVPN.
The alternative configuration, with OpenVPN acting as the TCP client, can be
useful for processes that manage a number of separate OpenVPN instances running
as child processes, since they can all be commanded to connect to the same
listen port on the parent management process. Launch OpenVPN with the arguments
--management-client --management <remote-addr> <port> to activate this
mode, after creating a listen server using openvpn.ListenAndServe.
For example:
func main() {
log.Fatal(openvpn.ListenAndServe(
"127.0.0.1:6061",
openvpn.IncomingConnHandlerFunc(newConnection),
))
}
func newConnection(conn openvpn.IncomingConn) {
eventCh := make(chan openvpn.Event, 10)
client := conn.Open(eventCh)
// "client" is now connected to the OpenVPN process and can send
// it commands. "eventCh" can be read to get asynchronous events from
// OpenVPN.
}
For more usage information on both modes, see the reference documentation.
Copyright (c) 2016 Martin Atkins
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Unknown package
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.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.