{"id":18561878,"url":"https://github.com/sir-go/utm5-urfa-api","last_synced_at":"2025-08-28T02:42:51.763Z","repository":{"id":144671968,"uuid":"545458753","full_name":"sir-go/utm5-urfa-api","owner":"sir-go","description":"json-rpc api-proxy for urfa-protocol","archived":false,"fork":false,"pushed_at":"2023-07-12T16:05:57.000Z","size":279,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-15T17:09:57.910Z","etag":null,"topics":["api","go","json-rpc","network","protocol","urfa"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sir-go.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-04T12:10:13.000Z","updated_at":"2023-07-18T09:17:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d32ea20-9e00-4a1d-8506-ac9b37a32f9b","html_url":"https://github.com/sir-go/utm5-urfa-api","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sir-go/utm5-urfa-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-go%2Futm5-urfa-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-go%2Futm5-urfa-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-go%2Futm5-urfa-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-go%2Futm5-urfa-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sir-go","download_url":"https://codeload.github.com/sir-go/utm5-urfa-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-go%2Futm5-urfa-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272424349,"owners_count":24932893,"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","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api","go","json-rpc","network","protocol","urfa"],"created_at":"2024-11-06T22:08:09.123Z","updated_at":"2025-08-28T02:42:51.693Z","avatar_url":"https://github.com/sir-go.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON-RPC API proxy for URFA-protocol (UTM5 billing)\n[![Go](https://github.com/sir-go/utm5-urfa-api/actions/workflows/go.yml/badge.svg)](https://github.com/sir-go/utm5-urfa-api/actions/workflows/go.yml)\n\n## Task\nThe Netup UTM5 billing system has a rich API based on a proprietary binary protocol.\n\nWe need some Web API for interacting with the billing kernel.\n\n## The solution\nWe researched the binary protocol and made the go library implements the most needed functions.\n\nAlso, we developed the JSON-RPC API-proxy service with the basic-auth.\n\nAll of the RPC functions are described in the `api.xml` file on the URFA server.\n\nNot all of the functions are implemented yet, but `internal/urfa/fn/_tmpl.go` contains the skeleton for extending\nthe functionality if needed.\n\n## Test\n```bash\ngo test -v ./...\ngosec -exclude G402,G401,G501 ./...\n```\n\n## Docker\n```bash\nocker build -t urfa-api .\ndocker run -d --name urfa-api -p 8081:8483 urfa-api -h localhost:8483\n```\n\n## Build\n```bash\ngo mod download\ngo build -o urfa-api ./cmd/api\n```\n\n## Flags\n`-c \u003cconfig file path\u003e` - path to `*.yml` config file \n`-h \u003chostname:port\u003e` - address and port on which the service will run\n\n## Config\nExample config:\n```yaml\n# array of billing servers connections\nbillings:\n\n#  billing server with the 'test.' prefix\n  test:\n#   URFA server host:port\n    addr: 192.168.122.168:11758\n#   path to the client certificate\n    cert: urfa.crt\n\n#  billing server with the 'tv.' prefix\n  tv:\n#   URFA server host:port\n    addr: 192.168.28.135:11758\n#   path to the client certificate\n    cert: urfa.crt\n```\n\n`urfa.crt` contains the client certificate (PEM) that can be grabbed from the desktop client `utm_admin` \nand needed for SSL wrapping on the transport layer.\n\n## Usage\n```bash\n./urfa-api -c conf.yml\n```\n\nRequest example:\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 3,\n  \"method\": \"test.rpcf_get_userinfo\",\n  \"params\": {\n    \"user_id\": 920\n  }\n}\n```\nThe method must have the prefix equal to the billing name in the config.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsir-go%2Futm5-urfa-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsir-go%2Futm5-urfa-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsir-go%2Futm5-urfa-api/lists"}