Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Snowflake
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
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
trinity-1686a
Snowflake
Commits
9daa6c4b
Commit
9daa6c4b
authored
9 years ago
by
Serene Han
Browse files
Options
Downloads
Patches
Plain Diff
multiple arbitrary ice servers can be passed as client flag (close #24)
parent
4e6bba55
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
client/snowflake.go
+5
-5
5 additions, 5 deletions
client/snowflake.go
client/torrc
+1
-1
1 addition, 1 deletion
client/torrc
client/util.go
+2
-0
2 additions, 0 deletions
client/util.go
with
8 additions
and
6 deletions
client/snowflake.go
+
5
−
5
View file @
9daa6c4b
...
...
@@ -64,7 +64,6 @@ func dialWebRTC() (*webRTCConn, error) {
// TODO: [#3] Fetch ICE server information from Broker.
// TODO: [#18] Consider TURN servers here too.
config
:=
webrtc
.
NewConfiguration
(
iceServers
...
)
broker
:=
NewBrokerChannel
(
brokerURL
,
frontDomain
)
if
nil
==
broker
{
return
nil
,
errors
.
New
(
"Failed to prepare BrokerChannel"
)
...
...
@@ -160,10 +159,6 @@ func readSignalingMessages(f *os.File) {
func
main
()
{
// var err error
webrtc
.
SetLoggingVerbosity
(
1
)
flag
.
StringVar
(
&
brokerURL
,
"url"
,
""
,
"URL of signaling broker"
)
flag
.
StringVar
(
&
frontDomain
,
"front"
,
""
,
"front domain"
)
flag
.
Var
(
&
iceServers
,
"ice"
,
"comma-separated list of ICE servers"
)
flag
.
Parse
()
logFile
,
err
:=
os
.
OpenFile
(
"snowflake.log"
,
os
.
O_CREATE
|
os
.
O_APPEND
|
os
.
O_WRONLY
,
0600
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
...
...
@@ -172,6 +167,11 @@ func main() {
log
.
SetOutput
(
logFile
)
log
.
Println
(
"
\n
Starting Snowflake Client..."
)
flag
.
StringVar
(
&
brokerURL
,
"url"
,
""
,
"URL of signaling broker"
)
flag
.
StringVar
(
&
frontDomain
,
"front"
,
""
,
"front domain"
)
flag
.
Var
(
&
iceServers
,
"ice"
,
"comma-separated list of ICE servers"
)
flag
.
Parse
()
// Expect user to copy-paste if
// TODO: Maybe just get rid of copy-paste entirely.
if
""
!=
brokerURL
{
...
...
This diff is collapsed.
Click to expand it.
client/torrc
+
1
−
1
View file @
9daa6c4b
...
...
@@ -4,6 +4,6 @@ DataDirectory datadir
ClientTransportPlugin snowflake exec ./client \
-url https://snowflake-reg.appspot.com/ \
-front www.google.com \
-ice stun:stun.l.google.com:19302
-ice stun:stun.l.google.com:19302
,stun:s1.taraba.net
Bridge snowflake 0.0.3.0:1
This diff is collapsed.
Click to expand it.
client/util.go
+
2
−
0
View file @
9daa6c4b
...
...
@@ -19,8 +19,10 @@ func (i *IceServerList) String() string {
}
func
(
i
*
IceServerList
)
Set
(
s
string
)
error
{
log
.
Println
(
"IceServerList:"
)
for
_
,
server
:=
range
strings
.
Split
(
s
,
","
)
{
// TODO: STUN / TURN url format validation?
log
.
Println
(
server
)
option
:=
webrtc
.
OptionIceServer
(
server
)
*
i
=
append
(
*
i
,
option
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment