Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
signalbuddy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sweng-group-15
signalbuddy
Compare revisions
04ea4e5081059faffdebae65c92da25fa98f996d to 216be42b2a6cc5632d427cf222c789d34026a274
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
sweng-group-15/signalbuddy
Select target project
No results found
216be42b2a6cc5632d427cf222c789d34026a274
Select Git revision
Branches
master
no-server
Swap
Target
sweng-group-15/signalbuddy
Select target project
sweng-group-15/signalbuddy
1 result
04ea4e5081059faffdebae65c92da25fa98f996d
Select Git revision
Branches
master
no-server
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
(ml5717) Allocate uuidv4 IDs to connecting clients
· 1e44fad4
Moritz Langenstein
authored
5 years ago
1e44fad4
(ml5717) Fixed TURN server username for UUIDs
· 216be42b
Moritz Langenstein
authored
5 years ago
216be42b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dist/sockets.js
+6
-1
6 additions, 1 deletion
dist/sockets.js
src/sockets.js
+6
-1
6 additions, 1 deletion
src/sockets.js
with
12 additions
and
2 deletions
dist/sockets.js
View file @
216be42b
...
...
@@ -24,6 +24,11 @@ function signalbuddy(server, config) {
var
_arguments
=
arguments
;
var
io
=
_socket2
.
default
.
listen
(
server
);
io
.
engine
.
generateId
=
function
()
/*req, callback*/
{
return
(
0
,
_v2
.
default
)();
};
io
.
on
(
'
connection
'
,
function
(
client
)
{
client
.
resources
=
{
screen
:
false
,
...
...
@@ -139,7 +144,7 @@ function signalbuddy(server, config) {
function
getTurnServers
(
username
)
{
// See https://github.com/coturn/coturn/wiki/turnserver#turn-rest-api for details
var
acting_ice_turn_username
=
Math
.
floor
(
Date
.
now
()
/
1000
)
+
config
.
ice
.
turn
.
timeout
+
"
-
"
+
username
;
var
acting_ice_turn_username
=
Math
.
floor
(
Date
.
now
()
/
1000
)
+
config
.
ice
.
turn
.
timeout
+
"
-
"
+
username
.
replace
(
/-/g
,
""
)
;
var
acting_ice_turn_password
=
_crypto2
.
default
.
createHmac
(
'
sha1
'
,
config
.
ice
.
turn
.
secret
).
update
(
acting_ice_turn_username
).
digest
(
'
base64
'
);
return
[(
0
,
_normalice2
.
default
)(
'
turn:
'
+
acting_ice_turn_username
+
'
:
'
+
acting_ice_turn_password
+
'
@
'
+
config
.
ice
.
host
+
'
:
'
+
config
.
ice
.
port
)];
...
...
This diff is collapsed.
Click to expand it.
src/sockets.js
View file @
216be42b
...
...
@@ -6,6 +6,11 @@ import normalice from 'normalice';
function
signalbuddy
(
server
,
config
)
{
const
io
=
socketIO
.
listen
(
server
);
io
.
engine
.
generateId
=
function
(
/*req, callback*/
)
{
return
uuidv4
();
};
io
.
on
(
'
connection
'
,
(
client
)
=>
{
client
.
resources
=
{
screen
:
false
,
...
...
@@ -121,7 +126,7 @@ function signalbuddy(server, config) {
function
getTurnServers
(
username
)
{
// See https://github.com/coturn/coturn/wiki/turnserver#turn-rest-api for details
const
acting_ice_turn_username
=
(
Math
.
floor
(
Date
.
now
()
/
1000
)
+
config
.
ice
.
turn
.
timeout
)
+
"
-
"
+
username
const
acting_ice_turn_username
=
(
Math
.
floor
(
Date
.
now
()
/
1000
)
+
config
.
ice
.
turn
.
timeout
)
+
"
-
"
+
username
.
replace
(
/-/g
,
""
)
const
acting_ice_turn_password
=
crypto
.
createHmac
(
'
sha1
'
,
config
.
ice
.
turn
.
secret
).
update
(
acting_ice_turn_username
).
digest
(
'
base64
'
)
return
[
normalice
(
`turn:
${
acting_ice_turn_username
}
:
${
acting_ice_turn_password
}
@
${
config
.
ice
.
host
}
:
${
config
.
ice
.
port
}
`
)]
...
...
This diff is collapsed.
Click to expand it.