https://github.com/midoks/go-p2p-server
go p2p server
https://github.com/midoks/go-p2p-server
Last synced: 9 months ago
JSON representation
go p2p server
- Host: GitHub
- URL: https://github.com/midoks/go-p2p-server
- Owner: midoks
- License: mit
- Created: 2021-11-03T20:28:48.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-09T08:26:50.000Z (about 4 years ago)
- Last Synced: 2025-01-31T10:51:16.694Z (over 1 year ago)
- Language: Go
- Size: 29.8 MB
- Stars: 6
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-p2p-server
Web P2P 服务器,依托[cdnbye](https://www.cdnbye.com)的源码和[klink.tech](https://klink.tech)页面而开发的服务器。
# 前端
- https://github.com/midoks/hlsjs-p2p-free
# 应用地址
- https://gop2p.cachecha.com
## 接入
```
var hlsjsConfig = {
debug: true,
// Other hlsjsConfig options provided by hls.js
p2pConfig: {
announce: "https://gop2p.cachecha.com",
wsSignalerAddr: 'wss://gop2p.cachecha.com/ws',
logLevel: 'debug',
// Other p2pConfig options if applicable
}
};
// Hls constructor is overriden by included bundle
var hls = new Hls(hlsjsConfig);
// Use hls just like the usual hls.js ...
hls.loadSource(contentUrl);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED,function() {
video.play();
});
```
## 快速安装
```
curl -fsSL https://raw.githubusercontent.com/midoks/go-p2p-server/master/scripts/install.sh | sh
```
## 快速开发
```
curl -fsSL https://raw.githubusercontent.com/midoks/go-p2p-server/master/scripts/install_dev.sh | sh
```