forked from q191201771/lal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
t_version.go
150 lines (117 loc) · 4.26 KB
/
t_version.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// Copyright 2020, Chef. All rights reserved.
// https://github.com/forkiss/lal
//
// Use of this source code is governed by a MIT-style license
// that can be found in the License file.
//
// Author: Chef (191201771@qq.com)
package base
import "strings"
// 版本信息相关
// lal的一部分版本信息使用了naza.bininfo
// 另外,我们也在本文件提供另外一些信息
// 并且将这些信息打入可执行文件、日志、各协议中的标准版本字段中
// LalVersion 整个lal工程的版本号。注意,该变量由外部脚本修改维护,不要手动在代码中修改
//
const LalVersion = "v0.30.1"
// ConfVersion lalserver的配置文件的版本号
//
const ConfVersion = "v0.3.3"
// HttpApiVersion lalserver的HTTP-API功能的版本号
//
const HttpApiVersion = "v0.3.3"
// HttpNotifyVersion lalserver的HTTP-Notify功能的版本号
//
const HttpNotifyVersion = "v0.1.4"
var (
LalLibraryName = "lal"
LalGithubRepo = "github.com/forkiss/lal"
LalGithubSite = "https://github.com/forkiss/lal"
LalDocSite = "https://pengrl.com/lal"
// LalFullInfo e.g. lal v0.12.3 (github.com/forkiss/lal)
LalFullInfo = LalLibraryName + " " + LalVersion + " (" + LalGithubRepo + ")"
// LalVersionDot e.g. 0.12.3
LalVersionDot string
// LalVersionComma e.g. 0,12,3
LalVersionComma string
)
var (
// LalRtmpHandshakeWaterMark 植入rtmp握手随机字符串中
// e.g. lal v0.12.3 (github.com/forkiss/lal)
LalRtmpHandshakeWaterMark string
// LalRtmpConnectResultVersion 植入rtmp server中的connect result信令中
// 注意,有两个object,第一个object中的fmsVer我们保持通用公认的值,在第二个object中植入
// e.g. 0,12,3
LalRtmpConnectResultVersion string
// LalRtmpPushSessionConnectVersion e.g. lal0.12.3
LalRtmpPushSessionConnectVersion string
// LalRtmpBuildMetadataEncoder e.g. lal0.12.3
LalRtmpBuildMetadataEncoder string
// LalHttpflvPullSessionUa e.g. lal/0.12.3
LalHttpflvPullSessionUa string
// LalHttpflvSubSessionServer e.g. lal0.12.3
LalHttpflvSubSessionServer string
// LalHlsM3u8Server e.g. lal0.12.3
LalHlsM3u8Server string
// LalHlsTsServer e.g. lal0.12.3
LalHlsTsServer string
// LalRtspOptionsResponseServer e.g. lal0.12.3
LalRtspOptionsResponseServer string
// LalHttptsSubSessionServer e.g. lal0.12.3
LalHttptsSubSessionServer string
// LalHttpApiServer e.g. lal0.12.3
LalHttpApiServer string
// LalRtspPullSessionUa e.g. lal/0.12.3
LalRtspPullSessionUa string
// LalPackSdp e.g. lal 0.12.3
LalPackSdp string
// LalRtspRealm e.g. lal
LalRtspRealm string
)
// - rtmp handshake random buf
// - rtmp server(pub & sub)
// - rtmp message connect result
// - cdnws: 第一个obj: `fmsVer: FMS/3,0,1,123` 第二个obj: `version: x,x,x,xxx`
// - rtmp client(push & pull)
// - rtmp message connect
// - ffmpeg push: `flashVer: FMLE/3.0 (compatible; Lavf57.83.100)`
// - ffmpeg pull: `flashVer: LNX 9,0,124,2` -- emulated Flash client version - 9.0.124.2 on Linux
// - rtmp/flv build metadata
// - encoder: Lavf57.83.100
// - httpflv pull
// - wget: User-Agent: Wget/1.19.1 (darwin15.6.0)
// - httpflv sub
// - `server:`
// - hls
// - m3u8
// - `Server:`
// - ts
// - `Server:`
// - rtsp server(pub & sub)
// - Options response `Server:`
// - rtsp client(pull)
// - Options User-Agent
//
// - httpts sub
// - `server:`
//
// - http api
// - `server:`
func init() {
LalVersionDot = strings.TrimPrefix(LalVersion, "v")
LalVersionComma = strings.Replace(LalVersionDot, ".", ",", -1)
LalRtmpConnectResultVersion = LalVersionComma
LalRtmpPushSessionConnectVersion = LalLibraryName + LalVersionDot
LalRtmpBuildMetadataEncoder = LalLibraryName + LalVersionDot
LalHttpflvSubSessionServer = LalLibraryName + LalVersionDot
LalHlsM3u8Server = LalLibraryName + LalVersionDot
LalHlsTsServer = LalLibraryName + LalVersionDot
LalRtspOptionsResponseServer = LalLibraryName + LalVersionDot
LalHttptsSubSessionServer = LalLibraryName + LalVersionDot
LalHttpApiServer = LalLibraryName + LalVersionDot
LalHttpflvPullSessionUa = LalLibraryName + "/" + LalVersionDot
LalRtspPullSessionUa = LalLibraryName + "/" + LalVersionDot
LalRtmpHandshakeWaterMark = LalFullInfo
LalPackSdp = LalLibraryName + " " + LalVersionDot
LalRtspRealm = LalLibraryName
}