Skip to content

Commit f556f0f

Browse files
committed
feat: change socket env key
1 parent 8a1e78d commit f556f0f

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ npm install
6767

6868
## websocket服务地址
6969
## "ws://域名 或者 ws://ip:端口 或者 ws://域名:端口"
70-
tl_rtc_file_ws_host=ws://127.0.0.1:8444
70+
tl_rtc_file_socket_host=ws://127.0.0.1:8444
7171

7272

7373
## 启动 (必须步骤)

bin/auto-publish-image-to-hub.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#########################
33
# 一键推送dockerhub的脚本
44
# @auther: iamtsm
5-
# @version: v1.1.0
5+
# @version: v1.2.0
66
#########################
77

88
build_and_push_image() {

bin/auto-pull-and-start-docker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ docker run \
101101
-e "tl_rtc_file_env_mode=http" \
102102
-e tl_rtc_file_api_port \
103103
-e tl_rtc_file_ws_port \
104-
-e tl_rtc_file_ws_host \
104+
-e tl_rtc_file_socket_host \
105105
-e tl_rtc_file_webrtc_stun_host \
106106
-e tl_rtc_file_webrtc_turn_host \
107107
-e tl_rtc_file_webrtc_turn_username \
@@ -143,7 +143,7 @@ docker run \
143143
-e "tl_rtc_file_env_mode=http" \
144144
-e tl_rtc_file_api_port \
145145
-e tl_rtc_file_ws_port \
146-
-e tl_rtc_file_ws_host \
146+
-e tl_rtc_file_socket_host \
147147
-e tl_rtc_file_webrtc_stun_host \
148148
-e tl_rtc_file_webrtc_turn_host \
149149
-e tl_rtc_file_webrtc_turn_username \

doc/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ tl_rtc_file_ws_port=8444
7272
## Websocket server address
7373
## "ws://domain or ip:port or domain:port"
7474
## For socket ip, use LAN IP for LAN access and public IP for public access
75-
tl_rtc_file_ws_host=ws://127.0.0.1:8444
75+
tl_rtc_file_socket_host=ws://127.0.0.1:8444
7676
```
7777

7878
## Startup (Mandatory Steps)

svr/conf/cfg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"version": "10.3.6",
3-
"ws": {
3+
"socket": {
44
"port": "请到 tlrtcfile.env 中进行配置",
55
"host": "请到 tlrtcfile.env 中进行配置"
66
},

svr/src/controller/comm/comm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function initData(req, res) {
3030

3131
let data = {
3232
version : conf.version,
33-
wsHost: conf.ws.host || ip,
33+
wsHost: conf.socket.host || ip,
3434
rtcConfig: { iceServers },
3535
options: webrtcConf.options,
3636
logo : utils.genClientLogo(),
@@ -41,7 +41,7 @@ function initData(req, res) {
4141

4242
let data = {
4343
version : conf.version,
44-
wsHost: conf.ws.host,
44+
wsHost: conf.socket.host,
4545
rtcConfig: { iceServers },
4646
options: webrtcConf.options,
4747
logo : utils.genClientLogo(),

svr/tlsocket.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ async function start(){
1919
let io = null;
2020

2121
if(process.env.tl_rtc_file_env_mode == 'http'){
22-
io = socketIO.listen(http.createServer().listen(conf.ws.port));
22+
io = socketIO.listen(http.createServer().listen(conf.socket.port));
2323
}else{
2424
let options = {
2525
key: fs.readFileSync('./conf/keys/server.key'),
2626
cert: fs.readFileSync('./conf/keys/server.crt')
2727
}
2828
io = socketIO.listen(
29-
https.createServer(options).listen(conf.ws.port)
29+
https.createServer(options).listen(conf.socket.port)
3030
);
3131
}
3232

@@ -40,7 +40,7 @@ async function start(){
4040
}
4141

4242
utils.tlConsole("socket init done ...")
43-
utils.tlConsole("socket ",process.env.tl_rtc_file_env_mode," server listen on ", conf.ws.port, " successful");
43+
utils.tlConsole("socket ",process.env.tl_rtc_file_env_mode," server listen on ", conf.socket.port, " successful");
4444
}
4545

4646

tlrtcfile.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ tl_rtc_file_api_port=9092
44
## websocket服务端口
55
tl_rtc_file_ws_port=8444
66
## websocket服务地址
7-
tl_rtc_file_ws_host=ws://127.0.0.1:8444
7+
tl_rtc_file_socket_host=ws://127.0.0.1:8444
88

99

1010
#-----------------以下为webrtc相关配置-----------------#

0 commit comments

Comments
 (0)