Compare commits

...

13 Commits

Author SHA1 Message Date
dexter
0faada1a13 UI增加视频广场,GB彻底重写,rtsp修复bug,engine消除内存泄露 2022-02-24 11:35:04 +08:00
dexter
3ffa4ab8b6 Merge pull request #30 from pdnews/3.0
添加 Dockerfile,并更新 Readme
2022-02-02 09:21:13 +08:00
杨树海
ac742d07cf 添加 Dockerfile,并更新 Readme 2022-02-01 21:19:44 +08:00
dexter
6df2a3b842 修复window编译错误 2022-01-16 23:57:45 +08:00
dexter
c38bd36ecc 修复rtsp插件和webrtc插件的bug,windows环境下实现错误写入fatal.log的功能 2022-01-16 13:17:52 +08:00
dexter
a769f1cbf4 修复启动时版本显示不对的问题 2022-01-10 09:11:33 +08:00
dexter
8ec0515f60 hls增加过滤功能,以及永久m3u8文件生成 2022-01-06 14:45:47 +08:00
dexter
e2113e03df 解决rtp包含多slice的情况 2022-01-03 22:52:46 +08:00
dexter
56bbc0ddf8 支持配置文件保存功能,增加HDL拉取远端FLV流的功能 2021-12-27 21:12:05 +08:00
dexter
563f966fe4 修复engine中stream在publish的时候有空指针错误 2021-12-20 13:45:41 +08:00
dexter
0e3befd285 rtsp列表API修复 2021-12-13 10:21:54 +08:00
dexter
e60871b55b 增加查看流数据的功能 2021-12-11 20:07:05 +08:00
dexter
785be6a939 修复gb28181中音频时间戳换算 2021-12-02 11:31:16 +08:00
11 changed files with 193 additions and 81 deletions

3
.gitignore vendored
View File

@@ -6,4 +6,5 @@ resource
/monibuca
node_modules
shutdown.bat
shutdown.sh
shutdown.sh
.m7s

View File

@@ -62,13 +62,21 @@ to submit your own plugin
| Protocol | Pusherpush-->Monibuca |Source-->Monibucapull|Monibuca-->Playerpull|Monibucapush-->Other Server
|---------| -------------|-------------| -------------|-------------|
|rtmp|✔||✔|
|rtsp|✔|✔|✔|
|http-flv|||✔|
|rtsp|✔|✔|✔|
|http-flv|||✔|
|hls||✔|✔|
|ws-flv|||✔|
|webrtc|✔||✔
# Documentation
# Build & Test with docker
> development and testing only: IP and udp ports need to be exposed carefully in production.
```shell
docker build . -f dockerfile -t m7s:3.0
docker run --name m7s -p 1935:1935 -p 8081:8081 -p 8082:8082 -p 554:554 m7s:3.0
```
# Documentation
中文文档:
[http://docs.monibuca.com](http://docs.monibuca.com).

View File

@@ -47,6 +47,14 @@ bash <(curl -s -S -L https://monibuca.com/demo.sh)
功能强大的仪表盘可以直观的看到服务器运行的状态、消耗的资源、以及其他统计信息。用户可以利用控制台对服务器进行配置和控制。
# 在 Docker 中编译和测试
> 生产服务需要暴露IP和大量端口建议容器仅用于开发和测试
```shell
docker build . -f dockerfile -t m7s:3.0
docker run --name m7s -p 1935:1935 -p 8081:8081 -p 8082:8082 -p 554:554 m7s:3.0
```
# 交流微信群
进入网站首页上进行扫码

View File

@@ -4,19 +4,19 @@ EnableVideo = true
# 发布流默认过期时间单位秒
PublishTimeout = 60
# 自动关闭触发后延迟的秒数(期间内如果有新的订阅则取消触发关闭)
# AutoCloseDelay = 10
AutoCloseDelay = 10
# RTP包乱序重排
# RTPReorder = false
RTPReorder = false
[Summary]
# 1秒中采样一次
SampleRate = 1
[RTMP]
ListenAddr = ":1935"
[GateWay]
ListenAddr = ":8080"
#ListenAddrTLS = ":8082"
#CertFile = "xxx.cert"
#KeyFile = "xxx.key"
ListenAddr = ":8081"
ListenAddrTLS = ":8082"
CertFile = "server.pem"
KeyFile = "server.key"
[Jessica]
#ListenAddr = ":8081"
#ListenAddrTLS = ":8083"
@@ -30,11 +30,7 @@ Size = 0
Days = 1
# 按照go layout格式化默认按照小时
Formatter = "2006-01-02T15"
[Cluster]
# 监听端口代表该服务器为源服务器
ListenAddr = ":2019"
# 源服务器地址,用于向源服务器进行推或拉流
#OriginServer = ""
# [FFMPEG]
[HLS]
# 是否开启写磁盘开启后侦测到发布流就会开始写TS文件
EnableWrite = false
@@ -51,6 +47,9 @@ Path = "resource"
#ListenAddrTLS = ":2021"
#CertFile = "xxx.cert"
#KeyFile = "xxx.key"
#Reconnect = true
[HDL.AutoPullList]
# "live/hdl" = "http://flv.bdplay.nodemedia.cn/live/bbb.flv"
[TS]
# ts存放目录
Path = "resource"
@@ -63,10 +62,11 @@ AutoRecord = false
ListenAddr = ":554"
Reconnect = true
#启动后自动拉流,可以配置多个
# [RTSP.AutoPullList]
[RTSP.AutoPullList]
# "live/rtsp" = "rtsp://114.116.215.52:38558/sub/3"
# "live/rtsp" = "rtsp://admin:12345678ab@42.193.7.166:9514/11"
# "live/rtc" = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4"
# "live/test" = "rtsp://admin:qwer1234@42.193.7.166:9013/cam/realmonitor?channel=1&subtype=0"
#"live/rtsp2" = "rtsp://admin:admin@192.168.1.212:554/cam/realmonitor?channel=1&subtype=1"
# "live/rtsp" = "rtsp://admin:123456@42.193.7.166:9018/video1"
[WebRTC]
# 端口范围不配置的话是自动分配
# PortMin = 30000

46
dockerfile Normal file
View File

@@ -0,0 +1,46 @@
FROM golang:1.17.0-alpine3.14 as builder
LABEL maintainer="yangshuhai@pdnews.cn"
WORKDIR /app
# 先装好基础依赖,减少在代码变化时的重复构建时间
RUN echo "https://mirror.tuna.tsinghua.edu.cn/alpine/v3.14/main" > /etc/apk/repositories
RUN echo "https://mirror.tuna.tsinghua.edu.cn/alpine/v3.14/community" >> /etc/apk/repositories
RUN apk add --no-cache --update autoconf automake make gcc g++
RUN go env -w GO111MODULE=on
RUN go env -w GOPROXY=https://goproxy.cn,direct
RUN go get -d github.com/Monibuca/engine/v3@v3.4.7
RUN go get -d github.com/Monibuca/plugin-gateway/v3@v3.0.10
RUN go get -d github.com/Monibuca/plugin-gb28181/v3@v3.0.2
RUN go get -d github.com/Monibuca/plugin-hdl/v3@v3.0.5
RUN go get -d github.com/Monibuca/plugin-hls/v3@v3.0.6
RUN go get -d github.com/Monibuca/plugin-jessica/v3@v3.0.0
RUN go get -d github.com/Monibuca/plugin-logrotate/v3@v3.0.0
RUN go get -d github.com/Monibuca/plugin-record/v3@v3.0.0
RUN go get -d github.com/Monibuca/plugin-rtmp/v3@v3.0.1
RUN go get -d github.com/Monibuca/plugin-rtsp/v3@v3.0.7
RUN go get -d github.com/Monibuca/plugin-summary@v1.0.0
RUN go get -d github.com/Monibuca/plugin-ts/v3@v3.0.1
RUN go get -d github.com/Monibuca/plugin-webrtc/v3@v3.0.3
# 再复制代码进行编译,可节省大量构建时间
COPY . .
RUN go mod tidy
RUN GOOS=linux go build -o m7s
# 构建完成则将成品复制到新的镜像中,减小镜像大小,可以考虑添加 upx 进一步减少空间
FROM alpine:3.14
WORKDIR /app
COPY --from=builder /app/m7s /app/m7s
COPY config.toml /app/config.toml
RUN /app/m7s --help
EXPOSE 554
EXPOSE 1935
EXPOSE 5060
EXPOSE 8081
EXPOSE 8082
CMD ["/app/m7s", "-c", "/app/config.toml"]

34
go.mod
View File

@@ -1,23 +1,27 @@
module github.com/langhuihui/monibuca
module github.com/langhuihui/monibuca/v3
go 1.16
require (
github.com/Monibuca/engine/v3 v3.3.16
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20211019071855-0dcd7beaae5b
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20211129032309-a2bfeec94895
github.com/Monibuca/plugin-hdl/v3 v3.0.0-20210807135828-9d98f5b8dd6c
github.com/Monibuca/plugin-hls/v3 v3.0.0
github.com/Monibuca/plugin-jessica/v3 v3.0.0-20210807235919-48ac5fbec646
github.com/Monibuca/plugin-logrotate/v3 v3.0.0-20210710104346-3db68431dcab
github.com/Monibuca/plugin-record/v3 v3.0.0-20210813073316-79dce1e0dc70
github.com/Monibuca/plugin-rtmp/v3 v3.0.0-20210819063901-526f2917b16d
github.com/Monibuca/plugin-rtsp/v3 v3.0.0-20211128150813-9eb117811d15
github.com/Monibuca/plugin-summary v0.0.0-20210821070131-2261e0efb7b9
github.com/Monibuca/plugin-ts/v3 v3.0.0
github.com/Monibuca/plugin-webrtc/v3 v3.0.0-20211102085549-53e36c75fded
github.com/Monibuca/engine/v3 v3.5.1
github.com/Monibuca/plugin-gateway/v3 v3.0.11
github.com/Monibuca/plugin-gb28181/v3 v3.0.6
github.com/Monibuca/plugin-hdl/v3 v3.0.5
github.com/Monibuca/plugin-hls/v3 v3.0.6
github.com/Monibuca/plugin-jessica/v3 v3.0.0
github.com/Monibuca/plugin-logrotate/v3 v3.0.0
github.com/Monibuca/plugin-record/v3 v3.0.0
github.com/Monibuca/plugin-rtmp/v3 v3.0.1
github.com/Monibuca/plugin-rtsp/v3 v3.0.8
github.com/Monibuca/plugin-summary v1.0.0
github.com/Monibuca/plugin-ts/v3 v3.0.1
github.com/Monibuca/plugin-webrtc/v3 v3.0.3
)
// replace github.com/Monibuca/plugin-ffmpeg => ../plugin-ffmpeg
// replace github.com/Monibuca/plugin-webrtc/v3 => ../plugin-webrtc
// replace github.com/Monibuca/plugin-gateway/v3 => ../plugin-gateway
// replace github.com/Monibuca/plugin-rtsp/v3 => ../plugin-rtsp
// replace github.com/Monibuca/plugin-gb28181/v3 => ../plugin-gb28181
@@ -26,6 +30,8 @@ require (
// replace github.com/Monibuca/plugin-hls/v3 => ../plugin-hls
// replace github.com/Monibuca/plugin-hdl/v3 => ../plugin-hdl
// replace github.com/Monibuca/engine/v3 => ../engine
// replace github.com/Monibuca/plugin-summary => ../plugin-summary

89
go.sum
View File

@@ -2,53 +2,47 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/Monibuca/engine/v3 v3.1.0/go.mod h1:yz6cssED2VlYu+g/LrxseBB9pcvsLM/o2QXa4gVY650=
github.com/Monibuca/engine/v3 v3.1.1/go.mod h1:yz6cssED2VlYu+g/LrxseBB9pcvsLM/o2QXa4gVY650=
github.com/Monibuca/engine/v3 v3.3.0/go.mod h1:odyqD/VTQDN4qgzajsgn7kW7MWDIzTHt+j+BcI8i+4g=
github.com/Monibuca/engine/v3 v3.3.9/go.mod h1:odyqD/VTQDN4qgzajsgn7kW7MWDIzTHt+j+BcI8i+4g=
github.com/Monibuca/engine/v3 v3.3.11/go.mod h1:LowMZ/iw4t6tfTZkSYZHIA0Z1HE8b7xfTDLO4WhX3Hg=
github.com/Monibuca/engine/v3 v3.3.15 h1:0sTCHQnesLos+k3GtbozIjQIh4rh9ZfotW5GQ9Dj3J4=
github.com/Monibuca/engine/v3 v3.3.15/go.mod h1:LowMZ/iw4t6tfTZkSYZHIA0Z1HE8b7xfTDLO4WhX3Hg=
github.com/Monibuca/engine/v3 v3.3.16 h1:3F5vBDU0wE6DgluWiTFAfPvOL9e2Hj87rrYqMgniPj4=
github.com/Monibuca/engine/v3 v3.3.16/go.mod h1:rgAUey5ziRhlh6WugWyA5fYKyGOvcwhtTMDk4sukE7E=
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20211019071855-0dcd7beaae5b h1:E53fkYCIhHDORcJXR1FyymPLWJJDUh6K8q254etoTjY=
github.com/Monibuca/plugin-gateway/v3 v3.0.0-20211019071855-0dcd7beaae5b/go.mod h1:bDI6d64yb50+3rMczouVQoTYWbGOZhVFgu3k/yKJdXU=
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20211122043224-c07309f14fa6 h1:AgLTjBQOxYWVPzDdrV9ysi5mTGum0ZZ97gEXyop4ips=
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20211122043224-c07309f14fa6/go.mod h1:foflXhJgzpYvMu3mlwQ/8JQ4ieo6RPSiubZ9t12FIbA=
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20211129032309-a2bfeec94895 h1:y0oFeOvUXoo2Rw4VW8fcpIHMEasNMpWR7HiUMf0IUec=
github.com/Monibuca/plugin-gb28181/v3 v3.0.0-20211129032309-a2bfeec94895/go.mod h1:foflXhJgzpYvMu3mlwQ/8JQ4ieo6RPSiubZ9t12FIbA=
github.com/Monibuca/plugin-hdl/v3 v3.0.0-20210807135828-9d98f5b8dd6c h1:crcVwFF4qW8b3UoucGIK+wG0U03cx7numcI+bkRV9ng=
github.com/Monibuca/plugin-hdl/v3 v3.0.0-20210807135828-9d98f5b8dd6c/go.mod h1:T4LdSfJIAMqmvmy9lXUL1RJ73JvhSBH2RdMKvs4N858=
github.com/Monibuca/plugin-hls/v3 v3.0.0 h1:yL+EaWDcPGlGQeHdrVArqMxevO3DMRbB/qbcH/Zgd7U=
github.com/Monibuca/plugin-hls/v3 v3.0.0/go.mod h1:gt+hWJLSeAaLy6d+bvd5D6YzTP6xJarm4fkBJ2kLHgM=
github.com/Monibuca/plugin-jessica/v3 v3.0.0-20210807235919-48ac5fbec646 h1:wfge6Eakjoh+j6kRb8JlTazLWImWVbRqAVB/FlB4nHk=
github.com/Monibuca/plugin-jessica/v3 v3.0.0-20210807235919-48ac5fbec646/go.mod h1:ycVTGh96OWFjzFfK7ErMcxTgohNZwagHRDab0GkTIFU=
github.com/Monibuca/plugin-logrotate/v3 v3.0.0-20210710104346-3db68431dcab h1:s/yYXSOwXQxSdrPALlq8fHcdhtWnsM0RBPwAo2d+FOU=
github.com/Monibuca/plugin-logrotate/v3 v3.0.0-20210710104346-3db68431dcab/go.mod h1:VK6gZDgLIIERvVTbshN+bd/966SBW/u1plVQATXH0q0=
github.com/Monibuca/plugin-record/v3 v3.0.0-20210813073316-79dce1e0dc70 h1:NO3NLdkQfcQ754yaroFfGCeIFBEGp/IxTl/Nz7X+0wI=
github.com/Monibuca/plugin-record/v3 v3.0.0-20210813073316-79dce1e0dc70/go.mod h1:CusWmmgSjE1rRaGO9O06LOvXSpKilfiFgRsUlYHvFq0=
github.com/Monibuca/plugin-rtmp/v3 v3.0.0-20210819063901-526f2917b16d h1:6NQ6KaQyvyS9e5ELmQzKF0gmGx0wzotsWpIqhe5X748=
github.com/Monibuca/plugin-rtmp/v3 v3.0.0-20210819063901-526f2917b16d/go.mod h1:dYR+AnljA8fGh29tmojgP1r+/MA+Bfwgpt2UsBD4wnM=
github.com/Monibuca/plugin-rtsp/v3 v3.0.0-20211128150813-9eb117811d15 h1:eJHeDZZok26uhBzsTw0XTCAgoTlMEHtJfOm9fUQlxD4=
github.com/Monibuca/plugin-rtsp/v3 v3.0.0-20211128150813-9eb117811d15/go.mod h1:UJ0QZ+K6XkcL1vWOSCMGaKArPW4ygkKt2PNQNAwThao=
github.com/Monibuca/plugin-summary v0.0.0-20210821070131-2261e0efb7b9 h1:8JVquYo8PUQtc75vFa8ovPvsXSmU0N2twfD+8hOoZeM=
github.com/Monibuca/plugin-summary v0.0.0-20210821070131-2261e0efb7b9/go.mod h1:1kiDXMF82y299q2+KKEeaKRpQFvVkiGAIGg8OhYk9Qk=
github.com/Monibuca/plugin-ts/v3 v3.0.0 h1:W6A5onbEDKAxuewl46PJPippV5E3fu7UV6rK+Hq/q5s=
github.com/Monibuca/engine/v3 v3.4.1/go.mod h1:rgAUey5ziRhlh6WugWyA5fYKyGOvcwhtTMDk4sukE7E=
github.com/Monibuca/engine/v3 v3.4.5/go.mod h1:Dik9pFxU9TFI5vj8Sv5QXZM+ooCs2fm9P7Uhe4yYNkQ=
github.com/Monibuca/engine/v3 v3.5.0/go.mod h1:yNiVKeHxgv+Ez+f2RHXMkXoa5Oxv+G7Ch+MJdHi7ing=
github.com/Monibuca/engine/v3 v3.5.1 h1:3AX+FwxerMw3JuyGXIOd/1dYCjA3IzWLKH/zq/GWe20=
github.com/Monibuca/engine/v3 v3.5.1/go.mod h1:yNiVKeHxgv+Ez+f2RHXMkXoa5Oxv+G7Ch+MJdHi7ing=
github.com/Monibuca/plugin-gateway/v3 v3.0.11 h1:wkTqaukhzlN55gq3PAlGB+9azYLhxGTxknoCK8aWvt4=
github.com/Monibuca/plugin-gateway/v3 v3.0.11/go.mod h1:Pw5seYubBswGoF4knryLbLp6qrkYPwg3a7ZupgOir/4=
github.com/Monibuca/plugin-gb28181/v3 v3.0.6 h1:AWvjjbs0xNOhm2u+/6DVFJY+6zbBjSrPuy5UD3X8RkQ=
github.com/Monibuca/plugin-gb28181/v3 v3.0.6/go.mod h1:EIu6vD1irPweLcA+1dC4k05wVe6ygYn6ErMfEx+UYPo=
github.com/Monibuca/plugin-hdl/v3 v3.0.5 h1:D7DO1a4wdNIQw5grcrSuIu2TMBTk7hTlNJjxEsMbvSE=
github.com/Monibuca/plugin-hdl/v3 v3.0.5/go.mod h1:ImBolaupuPvXGoWD5hOUUMvSPPuzrg2lzVWqhcXmdVA=
github.com/Monibuca/plugin-hls/v3 v3.0.6 h1:WfM9BeTnezQJK6WmC40A3yyxXXGFqJNMePvcjKtYa+M=
github.com/Monibuca/plugin-hls/v3 v3.0.6/go.mod h1:HRfFcEfpBZYrbtj4j46wLhYuAcZdTukzpw87CLf8FcE=
github.com/Monibuca/plugin-jessica/v3 v3.0.0 h1:ArSiHOHfcekBfUOJMFZ0IJSbP/B1TnvcC5gegTpcbDw=
github.com/Monibuca/plugin-jessica/v3 v3.0.0/go.mod h1:pf2lC2r3ZC1DYffW12zDPJH1sX59suI9JNXXuokZdbE=
github.com/Monibuca/plugin-logrotate/v3 v3.0.0 h1:lWLgfKx2tVmXomzmZNACDzl/8HCHAkxyAmxT+ReLa9g=
github.com/Monibuca/plugin-logrotate/v3 v3.0.0/go.mod h1:OltyTXYmIGyUaZap+/qyEm87HVmn14PzEUCtAmNAUUg=
github.com/Monibuca/plugin-record/v3 v3.0.0 h1:449s+La2O5in0jaIdA94iK3QIS1s+G73VQXeLUiciN0=
github.com/Monibuca/plugin-record/v3 v3.0.0/go.mod h1:71pviyOflKsNq+ijPKOgcsKqZkvZ91PzJxLJWPDzYe0=
github.com/Monibuca/plugin-rtmp/v3 v3.0.1 h1:ZnklWGgblcD2a+siTgK84VLm6rJ445VzFuZia1Gea4k=
github.com/Monibuca/plugin-rtmp/v3 v3.0.1/go.mod h1:subd/7X5wcPbt5PDc0tbJ9RqNkvnrLJGj05RsYw25A8=
github.com/Monibuca/plugin-rtsp/v3 v3.0.8 h1:wKGcTxwyZdG63AR5ZW9M5vYfUvMHY/iwmsq56XibEfQ=
github.com/Monibuca/plugin-rtsp/v3 v3.0.8/go.mod h1:byXGE5BxFv0RpcoOjcQRt7B7mZvrgNuVpRn0kJtFIkU=
github.com/Monibuca/plugin-summary v1.0.0 h1:tWL7KWw5mcep2jAhG3Gzd1DCiLSyCl3u3nmJtYkqGFA=
github.com/Monibuca/plugin-summary v1.0.0/go.mod h1:rpSCVcPrecGlgT+aoCYsA6MawsE6ELT2mMGYYlSfTWo=
github.com/Monibuca/plugin-ts/v3 v3.0.0/go.mod h1:S+sUqUbZTiRws/GHoxcVVQdhOcuUQUxoAGDeQOAgKw0=
github.com/Monibuca/plugin-webrtc/v3 v3.0.0-20211102085549-53e36c75fded h1:ej6HcWw23Q7jWU6lFZW8/bjWh7Hlq5p1LvfKA1M2AvQ=
github.com/Monibuca/plugin-webrtc/v3 v3.0.0-20211102085549-53e36c75fded/go.mod h1:IVauqiKgEXl/Wc2I7/GcUvO/9YYndwQwYyLP8EzYGR8=
github.com/Monibuca/plugin-ts/v3 v3.0.1 h1:WPjDsv7s1aqDcpBzPJrC9CvaHZvnDf92qEQaBx6oR3c=
github.com/Monibuca/plugin-ts/v3 v3.0.1/go.mod h1:Xndravs2PFGXHr4ZtAZ+azPBjDBBTB8ZanP8zrvu11o=
github.com/Monibuca/plugin-webrtc/v3 v3.0.3 h1:MWIQEZwIlxlruEU5rxiH7KhhKyCp3fZf0qrxF2gFd7Y=
github.com/Monibuca/plugin-webrtc/v3 v3.0.3/go.mod h1:eH8O1nvkxpHJVmasyXK1r/oOsAuXdwQ8TvkyVLR5Crg=
github.com/Monibuca/utils/v3 v3.0.0/go.mod h1:RpNS95gapWs6gimwh8Xn2x72FN5tO7Powabj7dTFyvE=
github.com/Monibuca/utils/v3 v3.0.1/go.mod h1:RpNS95gapWs6gimwh8Xn2x72FN5tO7Powabj7dTFyvE=
github.com/Monibuca/utils/v3 v3.0.2/go.mod h1:RpNS95gapWs6gimwh8Xn2x72FN5tO7Powabj7dTFyvE=
github.com/Monibuca/utils/v3 v3.0.4 h1:PssGhww+qePzw4qpB3g2DCG5Buru0Cu64UiqtAPuHjc=
github.com/Monibuca/utils/v3 v3.0.4/go.mod h1:RpNS95gapWs6gimwh8Xn2x72FN5tO7Powabj7dTFyvE=
github.com/Monibuca/utils/v3 v3.0.5 h1:w14x0HkWTbF4MmHbINLlOwe4VJNoSOeaQChMk5E/4es=
github.com/Monibuca/utils/v3 v3.0.5/go.mod h1:RpNS95gapWs6gimwh8Xn2x72FN5tO7Powabj7dTFyvE=
github.com/StackExchange/wmi v1.2.0 h1:noJEYkMQVlFCEAc+2ma5YyRhlfjcWfZqk5sBRYozdyM=
github.com/StackExchange/wmi v1.2.0/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA=
github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8=
github.com/agiledragon/gomonkey/v2 v2.2.0 h1:QJWqpdEhGV/JJy70sZ/LDnhbSlMrqHAWHcNOjz1kyuI=
github.com/agiledragon/gomonkey/v2 v2.2.0/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY=
github.com/aler9/gortsplib v0.0.0-20211118111704-d5bdc197beb5 h1:qcrLOrHxW0x9fIguacwD/2CIlswI6kVCUThtx/uuhSs=
github.com/aler9/gortsplib v0.0.0-20211118111704-d5bdc197beb5/go.mod h1:fyQrQyHo8QvdR/h357tkv1g36VesZlzEPsdAu2VrHHc=
github.com/aler9/gortsplib v0.0.0-20211212220644-6f374e396529 h1:j2tfs+eUubyZnuwmYWzK+IS681IixfUyD8bivz4sqAw=
github.com/aler9/gortsplib v0.0.0-20211212220644-6f374e396529/go.mod h1:fyQrQyHo8QvdR/h357tkv1g36VesZlzEPsdAu2VrHHc=
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef h1:2JGTg6JapxP9/R33ZaagQtAM4EkkSYnIAlOG5EI8gkM=
github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef/go.mod h1:JS7hed4L1fj0hXcyEejnW57/7LCetXggd+vwrRnYeII=
github.com/asticode/go-astikit v0.20.0/go.mod h1:h4ly7idim1tNhaVkdVBeXQZEE3L0xblP7fCWbgwipF0=
github.com/asticode/go-astits v1.10.0/go.mod h1:DkOWmBNQpnr9mv24KfZjq4JawCFX1FCqjLVGvO0DygQ=
github.com/cnotch/apirouter v0.0.0-20200731232942-89e243a791f3/go.mod h1:5deJPLON/x/s2dLOQfuKS0lenhOIT4xX0pvtN/OEIuY=
@@ -189,10 +183,10 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/tklauser/go-sysconf v0.3.6 h1:oc1sJWvKkmvIxhDHeKWvZS4f6AW+YcoguSfRF2/Hmo4=
github.com/tklauser/go-sysconf v0.3.6/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI=
github.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA=
github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM=
github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo=
github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs=
github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ=
github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/zhangpeihao/goamf v0.0.0-20140409082417-3ff2c19514a8 h1:r1JUI0wuHlgRb8jNd3zPBBkjUdrjpVKr8SdJWc8ntg8=
github.com/zhangpeihao/goamf v0.0.0-20140409082417-3ff2c19514a8/go.mod h1:RZd/IqzNpFANwOB9rVmsnAYpo/6KesK4PqrN1a5cRgg=
@@ -242,14 +236,13 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 h1:2B5p2L5IfGiD7+b9BOoRMC6DgObAVZV+Fsp050NqXik=
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1 h1:kwrAHlwJ0DUBZwQ238v+Uod/3eZ8B2K5rYsUHBQvzmI=
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

View File

@@ -31,12 +31,12 @@ func main() {
addr := flag.String("c", "config.toml", "config file")
flag.Parse()
ctx, cancel := context.WithCancel(context.Background())
go waiter(cancel)
if _, err := os.Stat(*addr); err == nil {
Run(ctx, *addr)
} else {
Run(ctx, filepath.Join(filepath.Dir(os.Args[0]), *addr))
}
waiter(cancel)
}
func waiter(cancel context.CancelFunc) {

BIN
monibuca.syso Normal file

Binary file not shown.

27
server.key Normal file
View File

@@ -0,0 +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