{"id":13800049,"url":"https://github.com/fiorix/go-diameter","last_synced_at":"2025-05-15T05:04:45.682Z","repository":{"id":10122240,"uuid":"12191706","full_name":"fiorix/go-diameter","owner":"fiorix","description":"Diameter stack and Base Protocol (RFC 6733) for the Go programming language","archived":false,"fork":false,"pushed_at":"2025-01-30T12:43:27.000Z","size":2726,"stargazers_count":263,"open_issues_count":42,"forks_count":158,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-04-03T03:52:28.920Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mmcorona/Heroes","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fiorix.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,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-08-18T07:08:41.000Z","updated_at":"2025-04-02T14:24:24.000Z","dependencies_parsed_at":"2023-01-11T22:45:14.551Z","dependency_job_id":"db17ead4-dabb-48ea-94fe-d4d0d2db87ab","html_url":"https://github.com/fiorix/go-diameter","commit_stats":{"total_commits":480,"total_committers":31,"mean_commits":"15.483870967741936","dds":"0.30833333333333335","last_synced_commit":"121fcc78a6d4076fafcb1398856a0156c849b7bf"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiorix%2Fgo-diameter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiorix%2Fgo-diameter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiorix%2Fgo-diameter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiorix%2Fgo-diameter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fiorix","download_url":"https://codeload.github.com/fiorix/go-diameter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166861,"owners_count":21058481,"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":[],"created_at":"2024-08-04T00:01:08.729Z","updated_at":"2025-04-10T06:17:58.638Z","avatar_url":"https://github.com/fiorix.png","language":"Go","funding_links":[],"categories":["Protocols","Developer Resources"],"sub_categories":["Diameter","Go Libraries"],"readme":"# Diameter Base Protocol\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/fiorix/go-diameter)](https://goreportcard.com/report/github.com/fiorix/go-diameter)\n[![Test Status](https://github.com/fiorix/go-diameter/actions/workflows/test.yaml/badge.svg)](https://github.com/fiorix/go-diameter/actions/workflows/test.yaml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/fiorix/go-diameter/v4.svg)](https://pkg.go.dev/github.com/fiorix/go-diameter/v4)\n[![Latest](https://img.shields.io/github/v/tag/fiorix/go-diameter.svg?sort=semver\u0026style=flat-square\u0026label=latest)](https://github.com/fiorix/go-diameter/tags)\n\nPackage [go-diameter](https://pkg.go.dev/github.com/fiorix/go-diameter/v4) is an\nimplementation of the\nDiameter Base Protocol [RFC 6733](http://tools.ietf.org/html/rfc6733)\nand a stack for the [Go programming language](https://go.dev/).\n\n### Status\n\nThe current implementation is solid and works fine for general purpose\nclients and servers. It can send and receive messages efficiently as\nwell as build and parse AVPs based on dictionaries.\n\nSee the API documentation at https://pkg.go.dev/github.com/fiorix/go-diameter/v4\n\n## Features\n\n- Comprehensive XML dictionary format\n- Embedded dictionaries:\n  \t* Base Protocol [RFC 6733](https://tools.ietf.org/html/rfc6733)\n  \t* Credit Control [RFC 4006](http://tools.ietf.org/html/rfc4006)\n  \t* Network Access Server [RFC 7155](http://tools.ietf.org/html/rfc7155)\n  \t* 3GPP specific AVPs from [TS 32.299 version 12.7.0](http://www.etsi.org/deliver/etsi_ts/132200_132299/132299/12.07.00_60/ts_132299v120700p.pdf)\n  \t* 3GPP S6a specific commands and AVPs from\n  \t  \t[RFC 5516](https://tools.ietf.org/html/rfc5516) and\n  \t  \t[TS 129 272](http://www.etsi.org/deliver/etsi_ts/129200_129299/129272/10.09.00_60/ts_129272v100900p.pdf)\n- Human readable AVP representation (for debugging)\n- TLS, IPv4 and IPv6 support for both clients and servers\n- Stack based on [net/http](https://pkg.go.dev/net/http) for simplicity\n- Ships with sample client, server, snoop agent and benchmark tool\n- [State machines](http://tools.ietf.org/html/rfc6733#section-5.6) for CER/CEA and DWR/DWA for clients and servers\n- TCP and SCTP support. SCTP support relies on kernel SCTP implementation and external github.com/ishidawataru/sctp\n  package and is currently tested and enabled for Go 1.8+ and x86 Linux\n  \n## Getting started\n\nThe easiest way to get started is by trying out the client and server example programs.\n\nWith Go 1.11 and newer (preferred), you can start the client and server already:\n\n```\nexport GO111MODULE=on\ngo run github.com/fiorix/go-diameter/v4/examples/server\ngo run github.com/fiorix/go-diameter/v4/examples/client -hello\n```\n\nWithout modules, use standard procedure:\n\n```\ngo get github.com/fiorix/go-diameter/examples/...\ngo run github.com/fiorix/go-diameter/examples/server\ngo run github.com/fiorix/go-diameter/examples/client -hello\n```\n\nSource code is your best friend. Check out other examples and test cases.\n\n## Performance\n\nClients and servers written with the go-diameter package can be quite\nperformant if done well. Besides Go benchmarks, the package ships with\na simple benchmark tool to help testing servers and identifying bottlenecks.\n\nIn the examples directory, the server has a pprof (http server) that\nallows the `go pprof` tool to profile the server in real time. The client\ncan perform benchmarks using the `-bench` command line flag.\n\nFor better performance, avoid logging diameter messages. Although logging\nis very useful for debugging purposes, it kills performance due to a number\nof conversions to make messages look pretty. If you run benchmarks on the\nexample server, make sure to use the `-s` (silent) command line switch.\n\nTLS degrades performance a bit, as well as reflection (Unmarshal). Those are\nimportant trade offs you might have to consider.\n\nBesides this, the source code (and sub-packages) have function benchmarks\nthat can help you understand what's fast and isn't. You will see that\nparsing messages is much slower than writing them, for example. This is\nbecause in order to parse messages it makes numerous dictionary lookups\nfor AVP types, to be able to decode them. Encoding messages require less\nlookups and is generally simpler, thus faster.\n\n## Contribute\n\nIn case you want to add new AVPs, please add them to `diam/dict/testdata` xml\nfiles. Then regenerate the go models using `./autogen.sh` you will find at \n`diam` folder. This will modify files at `diam/dict` to include your changes.\n\nBefore submitting PR, please run `make test` to test your changes. Or do it \nmanually:\n\n```\n\tgo test ./...\n```\n\nYou also have the option to run the test using a Linux VM through Docker (this\nis not mandatory). To do so, run `make test_docker`. Runing test on Linux  can \nbe useful in case you add `sctp` tests. Note you will need to install\ndocker and docker-compose.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiorix%2Fgo-diameter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiorix%2Fgo-diameter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiorix%2Fgo-diameter/lists"}