{"id":20064381,"url":"https://github.com/cedws/openvpn-mgmt-go","last_synced_at":"2025-05-05T18:30:39.731Z","repository":{"id":63150363,"uuid":"563967923","full_name":"cedws/openvpn-mgmt-go","owner":"cedws","description":"Provides an API for connecting to, sending commands to, and receiving messages from an OpenVPN management socket","archived":false,"fork":false,"pushed_at":"2022-12-25T02:54:31.000Z","size":37,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T22:34:47.552Z","etag":null,"topics":["go","openvpn"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/cedws/openvpn-mgmt-go","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cedws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-09T17:59:20.000Z","updated_at":"2024-01-12T02:15:29.000Z","dependencies_parsed_at":"2023-01-30T21:30:34.250Z","dependency_job_id":null,"html_url":"https://github.com/cedws/openvpn-mgmt-go","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedws%2Fopenvpn-mgmt-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedws%2Fopenvpn-mgmt-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedws%2Fopenvpn-mgmt-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedws%2Fopenvpn-mgmt-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cedws","download_url":"https://codeload.github.com/cedws/openvpn-mgmt-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224458420,"owners_count":17314660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","openvpn"],"created_at":"2024-11-13T13:45:55.756Z","updated_at":"2024-11-13T13:45:56.487Z","avatar_url":"https://github.com/cedws.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openvpn-mgmt-go\nProvides an API for connecting to, sending commands to, and receiving messages from an OpenVPN management socket.\n\n## Example\n```go\npackage main\n\nimport (\n\topenvpn \"github.com/cedws/openvpn-mgmt-go\"\n\t\"github.com/cedws/openvpn-mgmt-go/command\"\n\t\"github.com/cedws/openvpn-mgmt-go/message\"\n)\n\nfunc main() {\n\tsocket, err := openvpn.DialUnix(\"/run/openvpn/server/management.sock\")\n\tif err != nil {\n\t\t// ...\n\t}\n\n\tplugin := AuthPlugin{socket}\n\tplugin.Init()\n}\n\ntype AuthPlugin struct {\n\tsocket *openvpn.Socket\n}\n\nfunc (a *AuthPlugin) Init() {\n\ta.socket.OnClientConnect(a.onClientConnect)\n\ta.socket.Start()\n}\n\nfunc (a *AuthPlugin) onClientConnect(c message.ClientConnect) {\n\t// allow the connecting client\n\ta.socket.Dispatch(command.ClientAuthNt{c.ClientID, c.KeyID})\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedws%2Fopenvpn-mgmt-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcedws%2Fopenvpn-mgmt-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedws%2Fopenvpn-mgmt-go/lists"}