{"id":16738251,"url":"https://github.com/tonyseek/openvpn-status","last_synced_at":"2025-06-29T22:34:29.852Z","repository":{"id":33987578,"uuid":"37739400","full_name":"tonyseek/openvpn-status","owner":"tonyseek","description":"Parse OpenVPN status logs in Python","archived":false,"fork":false,"pushed_at":"2023-09-19T13:08:27.000Z","size":93,"stargazers_count":84,"open_issues_count":13,"forks_count":32,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-13T19:53:24.680Z","etag":null,"topics":["openvpn","openvpn-monitor","python"],"latest_commit_sha":null,"homepage":"https://openvpn-status.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tonyseek.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-19T18:37:40.000Z","updated_at":"2025-05-08T21:51:16.000Z","dependencies_parsed_at":"2024-06-18T21:12:17.496Z","dependency_job_id":"925a2422-b0a5-460f-84a2-de1e142cc46a","html_url":"https://github.com/tonyseek/openvpn-status","commit_stats":{"total_commits":53,"total_committers":2,"mean_commits":26.5,"dds":"0.018867924528301883","last_synced_commit":"6eb97d1f7bef7be871a49efa1a150183ab5fc880"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/tonyseek/openvpn-status","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyseek%2Fopenvpn-status","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyseek%2Fopenvpn-status/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyseek%2Fopenvpn-status/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyseek%2Fopenvpn-status/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tonyseek","download_url":"https://codeload.github.com/tonyseek/openvpn-status/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonyseek%2Fopenvpn-status/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262678693,"owners_count":23347415,"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":["openvpn","openvpn-monitor","python"],"created_at":"2024-10-13T00:29:50.273Z","updated_at":"2025-06-29T22:34:29.781Z","avatar_url":"https://github.com/tonyseek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"|Build Status| |Coverage Status| |PyPI Version| |Wheel Status|\n\nOpenVPN Status\n==============\n\n.. summary-begin\n\n**openvpn-status** is a Python library. It parses OpenVPN status log and turns\nit into Python data structure for you.\n\n.. summary-end\n\nIt is compatible with Python `2.7`, `3.6` to `3.10`, and PyPy.\n\n\nInstallation\n------------\n\n.. code-block:: bash\n\n    pip install openvpn-status\n\nDon't forget to put it in ``setup.py`` / ``requirements.txt``.\n\n\nGetting Started\n---------------\n\nYou could configure your OpenVPN server to log for client status. In usual it\ncould be achieved by adding ``status /path/to/openvpn-status.log`` line to\n``/etc/openvpn/openvpn.conf``. For example::\n\n    proto udp\n    port 1194\n    dev tun0\n    status /var/run/openvpn-status.log\n\nOnce OpenVPN server running, the log file will be created and written. It looks\nlike::\n\n    OpenVPN CLIENT LIST\n    Updated,Thu Jun 18 08:12:15 2015\n    Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since\n    foo@example.com,10.10.10.10:49502,334948,1973012,Thu Jun 18 04:23:03 2015\n    bar@example.com,10.10.10.10:64169,1817262,28981224,Thu Jun 18 04:08:39 2015\n    ROUTING TABLE\n    Virtual Address,Common Name,Real Address,Last Ref\n    192.168.255.134,foo@example.com,10.10.10.10:49502,Thu Jun 18 08:12:09 2015\n    192.168.255.126,bar@example.com,10.10.10.10:64169,Thu Jun 18 08:11:55 2015\n    GLOBAL STATS\n    Max bcast/mcast queue length,0\n    END\n\nNow we could parse log file with this library:\n\n.. code-block:: python\n\n    from openvpn_status import parse_status\n\n    with open('/var/run/openvpn-status.log') as logfile:\n        status = parse_status(logfile.read())\n\n    print(status.updated_at)  # datetime.datetime(2015, 6, 18, 8, 12, 15)\n\n    foo_client = status.client_list['169.254.0.1']\n    print(foo_client.common_name)  # foo@example.com\n    print(foo_client.bytes_received)  # 334.9 kB\n    print(foo_client.bytes_sent)  # 2.0 MB\n    print(int(foo_client.bytes_sent))  # 2097152\n\n\nMore details are in the `API reference`_.\n\n\nContributing\n------------\n\nIf you want to report bugs or request features, please feel free to open\nissues on GitHub_.\n\nOf course, pull requests are always welcome.\n\n\n.. _`API reference`: https://openvpn-status.readthedocs.io/en/latest/api.html\n.. _GitHub: https://github.com/tonyseek/openvpn-status/issues\n\n.. |Build Status| image:: https://img.shields.io/travis/tonyseek/openvpn-status.svg\n   :target: https://travis-ci.org/tonyseek/openvpn-status\n   :alt: Build Status\n.. |Coverage Status| image:: https://img.shields.io/coveralls/tonyseek/openvpn-status.svg\n   :target: https://coveralls.io/r/tonyseek/openvpn-status\n   :alt: Coverage Status\n.. |Wheel Status| image:: https://img.shields.io/pypi/wheel/openvpn-status.svg\n   :target: https://warehouse.python.org/project/openvpn-status\n   :alt: Wheel Status\n.. |PyPI Version| image:: https://img.shields.io/pypi/v/openvpn-status.svg\n   :target: https://pypi.python.org/pypi/openvpn-status\n   :alt: PyPI Version\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonyseek%2Fopenvpn-status","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonyseek%2Fopenvpn-status","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonyseek%2Fopenvpn-status/lists"}