{"id":21690117,"url":"https://github.com/cdnbye/cbsignal_redis","last_synced_at":"2026-03-07T12:03:08.933Z","repository":{"id":43074053,"uuid":"394692237","full_name":"cdnbye/cbsignal_redis","owner":"cdnbye","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-13T07:54:53.000Z","size":12937,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-15T20:54:57.565Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/cdnbye.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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-10T14:51:16.000Z","updated_at":"2023-09-24T10:02:22.000Z","dependencies_parsed_at":"2024-11-25T17:32:50.229Z","dependency_job_id":"74c4c8b7-2fe7-4827-af16-be444b9624a0","html_url":"https://github.com/cdnbye/cbsignal_redis","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/cdnbye/cbsignal_redis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdnbye%2Fcbsignal_redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdnbye%2Fcbsignal_redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdnbye%2Fcbsignal_redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdnbye%2Fcbsignal_redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdnbye","download_url":"https://codeload.github.com/cdnbye/cbsignal_redis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdnbye%2Fcbsignal_redis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30212490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T09:02:10.694Z","status":"ssl_error","status_checked_at":"2026-03-07T09:02:08.429Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-25T17:29:14.618Z","updated_at":"2026-03-07T12:03:03.915Z","avatar_url":"https://github.com/cdnbye.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n### build\r\nMake sure that the golang development environment is installed\r\n```bash\r\ngit clone https://github.com/cdnbye/cbsignal_redis.git\r\ncd cbsignal\r\nmake\r\n```\r\nor directly use compiled linux file [cbsignal](https://github.com/cdnbye/cbsignal_redis/releases) .\r\n\r\n### deploy\r\nMake sure you have set up redis server, then edit `config.yaml`:\r\n```yaml\r\nredis:\r\n  host: REDIS_IP\r\n  port: 6379\r\n  dbname: 0\r\n  is_cluster: false\r\n```\r\nUpload binary file, admin.sh and config.yaml to server, create `cert` directory with `signaler.pem` and `signaler.key`, then start service:\r\n```bash\r\nchmod +x admin.sh\r\nsudo ./admin.sh start\r\n```\r\n\r\n### test\r\n```\r\nimport Hls from 'cdnbye';\r\nvar hlsjsConfig = {\r\n    p2pConfig: {\r\n        wsSignalerAddr: 'ws://YOUR_SIGNAL',\r\n        // Other p2pConfig options provided by hlsjs-p2p-engine\r\n    }\r\n};\r\n// Hls constructor is overriden by included bundle\r\nvar hls = new Hls(hlsjsConfig);\r\n// Use `hls` just like the usual hls.js ...\r\n```\r\n\r\n### Get real-time information of signal service\r\n```\r\nGET /info\r\n```\r\nResponse:\r\n```\r\nStatus: 200\r\n\r\n{\r\n  \"ret\": 0,\r\n  \"data\": {\r\n      \"version\"\r\n      \"current_connections\"\r\n      \"cluster_mode\"\r\n      \"num_goroutine\"\r\n      \"num_per_map\"\r\n  }\r\n}\r\n```\r\n\r\n### Cluster Mode\r\nRedis list is used to communicate between all nodes. You just need to add more instances to the same local network.\r\n\r\n## Run by Docker\r\nThe default redis address in default config is 127.0.0.1:6379\r\n```sh\r\nsudo docker run --net host --restart=unless-stopped -d cdnbye/cbsignal_redis:latest\r\n```\r\n\r\n## Run by Docker with your own Config\r\n```sh\r\nmkdir config \u0026\u0026 cd config\r\ntouch config.yaml\r\n```\r\nThen cony your config to config.yaml, you can copy your SSL cert to this directory, then:\r\n```sh\r\nsudo docker run --net host --restart=unless-stopped -d -v \"$(pwd)\"/config:/cbsignal_redis/config  cdnbye/cbsignal_redis:latest\r\n```\r\n\r\n## Related projects\r\n* [cbsignal_node](https://github.com/cdnbye/cbsignal_node) - High performance CDNBye signaling service written in node.js\r\n\r\n### go语言版的 CDNBye 信令服务器，可用于Web、安卓、iOS SDK等所有CDNBye产品\r\n#### 编译二进制文件\r\n请先确保已安装golang开发环境\r\n```bash\r\ngit clone https://github.com/cdnbye/cbsignal_redis.git\r\ncd cbsignal\r\nmake\r\n```\r\n或者直接使用已经编译好的linux可执行文件 [cbsignal](https://github.com/cdnbye/cbsignal_redis/releases)\r\n\r\n#### 部署\r\n首先确保内网中已经有redis服务, 编辑 `config.yaml`:\r\n```yaml\r\nredis:\r\n  host: REDIS_IP\r\n  port: 6379\r\n  dbname: 0\r\n  is_cluster: false\r\n```\r\n将编译生成的二进制文件、admin.sh和config.yaml上传至服务器，并在同级目录创建`cert`文件夹，将证书和秘钥文件分别改名为`signaler.pem`和`signaler.key`放入cert，之后启动服务：\r\n```bash\r\nchmod +x admin.sh\r\necho -17 \u003e /proc/$(pidof cbsignal)/oom_adj     # 防止进程被OOM killer杀死\r\nsudo ./admin.sh start\r\n```\r\n\r\n### 测试\r\n```\r\nimport Hls from 'cdnbye';\r\nvar hlsjsConfig = {\r\n    p2pConfig: {\r\n        wsSignalerAddr: 'ws://YOUR_SIGNAL',\r\n        // Other p2pConfig options provided by hlsjs-p2p-engine\r\n    }\r\n};\r\n// Hls constructor is overriden by included bundle\r\nvar hls = new Hls(hlsjsConfig);\r\n// Use `hls` just like the usual hls.js ...\r\n```\r\n\r\n### 通过API获取信令服务的实时信息\r\n```\r\nGET /info\r\n```\r\n响应:\r\n```\r\nStatus: 200\r\n\r\n{\r\n  \"ret\": 0,\r\n  \"data\": {\r\n      \"version\"\r\n      \"current_connections\"\r\n      \"cluster_mode\"\r\n      \"num_goroutine\"\r\n      \"num_per_map\"\r\n  }\r\n}\r\n```\r\n\r\n### 集群模式\r\n节点之间采用Redis list进行通信，只需要在同一个内网中部署更多实例即可。\r\n\r\n## 通过Docker部署\r\n默认配置连接redis地址是127.0.0.1:6379\r\n```sh\r\nsudo docker run --net host --restart=unless-stopped -d cdnbye/cbsignal_redis:latest\r\n```\r\n\r\n## 通过Docker部署并自定义配置\r\n```sh\r\nmkdir config \u0026\u0026 cd config\r\ntouch config.yaml\r\n```\r\nconfig.yaml是你的自定义配置，可以在此配置证书文件等，然后运行：\r\n```sh\r\nsudo docker run --net host --restart=unless-stopped -d -v \"$(pwd)\"/config:/cbsignal_redis/config  cdnbye/cbsignal_redis:latest\r\n```\r\n\r\n## 相关项目\r\n* [cbsignal_node](https://github.com/cdnbye/cbsignal_node) - 基于node.js开发的高性能CDNBye信令服务\r\n\r\n\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdnbye%2Fcbsignal_redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdnbye%2Fcbsignal_redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdnbye%2Fcbsignal_redis/lists"}