Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
all: use pion/stun and bump gortc/turn
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed May 25, 2019
1 parent 1abd92c commit 93cc997
Show file tree
Hide file tree
Showing 25 changed files with 110 additions and 65 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The gortcd is work-in-progress TURN [[RFC5776](https://tools.ietf.org/html/rfc57
As part of [gortc](https://gortc.io) project, gortcd shares
it's [goals](https://gortc.io#goals) and
[principles](https://gortc.io#principles).
Based on [gortc/stun](https://github.com/gortc/stun) package.
Based on [pion/stun](https://github.com/pion/stun) package.

The goal is [feature parity](https://github.com/gortc/gortcd/issues/6) with [coturn](https://github.com/coturn/coturn).
Please use only for experiments until [beta](https://github.com/gortc/gortcd/milestone/2).
Expand Down Expand Up @@ -110,7 +110,7 @@ Project supports all platforms that [supports](https://github.com/golang/go/wiki
# Benchmarks

Currently server is under active development, but some benchmarks are
already available. The [stun-bench](https://github.com/gortc/stun/blob/master/cmd/stun-bench/main.go)
already available. The [stun-bench](https://github.com/pion/stun/blob/master/cmd/stun-bench/main.go)
is simple stun benchmark that performs binding request transactions.

Results for gortcd v0.17.4 on Ubuntu 16.04, client and server share one
Expand Down
2 changes: 1 addition & 1 deletion e2e/coturn-client/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/gortc/gortcd/e2e/coturn-client

go 1.12

require github.com/gortc/stun v1.19.0
require github.com/pion/stun v0.3.0
6 changes: 4 additions & 2 deletions e2e/coturn-client/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
github.com/gortc/stun v1.19.0 h1:6qy7zGGk0tdMOdEzK7hLeAVZEHllJC8+OOBpPAyjY1c=
github.com/gortc/stun v1.19.0/go.mod h1:dZ0O/fYCkg9Z0Pvl6WDpNhRFTAU0X1CPOsJiZqn6EHo=
github.com/pion/stun v0.3.0 h1:hKadT0I+ijxKkVXqU+rPHKLt+Sw6dQ8D+HhvuoYMoxQ=
github.com/pion/stun v0.3.0/go.mod h1:xrCld6XM+6GWDZdvjPlLMsTU21rNxnO6UO8XsAvHr/M=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
2 changes: 1 addition & 1 deletion e2e/coturn-client/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net"
"time"

"github.com/gortc/stun"
"github.com/pion/stun"
)

func resolve(a string) *net.UDPAddr {
Expand Down
7 changes: 4 additions & 3 deletions e2e/gortc-stun/stun-client/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ module github.com/gortc/gortcd/e2e/gortc-stun/stun-client
go 1.12

require (
github.com/gortc/stun v1.17.2
go.uber.org/atomic v1.2.0
go.uber.org/multierr v1.1.0
github.com/pion/stun v0.3.0
github.com/stretchr/testify v1.3.0 // indirect
go.uber.org/atomic v1.2.0 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.9.1
)
15 changes: 14 additions & 1 deletion e2e/gortc-stun/stun-client/go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
github.com/gortc/stun v1.17.2/go.mod h1:dZ0O/fYCkg9Z0Pvl6WDpNhRFTAU0X1CPOsJiZqn6EHo=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pion/stun v0.3.0 h1:hKadT0I+ijxKkVXqU+rPHKLt+Sw6dQ8D+HhvuoYMoxQ=
github.com/pion/stun v0.3.0/go.mod h1:xrCld6XM+6GWDZdvjPlLMsTU21rNxnO6UO8XsAvHr/M=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
go.uber.org/atomic v1.2.0 h1:yVVGhClJ8Xi1y4TxhJZE6QFPrz76BrzhWA01n47mSFk=
go.uber.org/atomic v1.2.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
2 changes: 1 addition & 1 deletion e2e/gortc-stun/stun-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net"
"time"

"github.com/gortc/stun"
"github.com/pion/stun"

"go.uber.org/zap"
"go.uber.org/zap/zapcore"
Expand Down
9 changes: 5 additions & 4 deletions e2e/gortc-turn/turn-client/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ module github.com/gortc/gortcd/e2e/gortc-turn/turn-client
go 1.12

require (
github.com/gortc/stun v1.17.2
github.com/gortc/turn v0.5.3
go.uber.org/atomic v1.2.0
go.uber.org/multierr v1.1.0
github.com/gortc/turn v0.7.1
github.com/pion/turnc v0.0.3
github.com/stretchr/testify v1.3.0 // indirect
go.uber.org/atomic v1.2.0 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.9.1
)
21 changes: 17 additions & 4 deletions e2e/gortc-turn/turn-client/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
github.com/gortc/stun v1.17.2 h1:1D9djwheCldBkcalnT1mSHz/7KbtvP8D9h3ts7NoSKY=
github.com/gortc/stun v1.17.2/go.mod h1:dZ0O/fYCkg9Z0Pvl6WDpNhRFTAU0X1CPOsJiZqn6EHo=
github.com/gortc/turn v0.5.3 h1:Kd3BSVpj3WL6KSOm0Hs/RkO9eqoaRdE0Eo63Srm70Ak=
github.com/gortc/turn v0.5.3/go.mod h1:oChREnOebaYgxAmZd5xUS6MkKS/N5mJ9onT5Glv8mT4=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/gortc/turn v0.7.1 h1:+DKoYXx8d2syTplmZ0Q3BaoTKsgClkoUzT2HpoAeK1c=
github.com/gortc/turn v0.7.1/go.mod h1:3FZ+LvCZKCKu6YYgwuYPqEi3FqCtdjfSFnFqVQNwfjk=
github.com/pion/logging v0.2.1 h1:LwASkBKZ+2ysGJ+jLv1E/9H1ge0k1nTfi1X+5zirkDk=
github.com/pion/logging v0.2.1/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
github.com/pion/stun v0.3.0 h1:hKadT0I+ijxKkVXqU+rPHKLt+Sw6dQ8D+HhvuoYMoxQ=
github.com/pion/stun v0.3.0/go.mod h1:xrCld6XM+6GWDZdvjPlLMsTU21rNxnO6UO8XsAvHr/M=
github.com/pion/turnc v0.0.3 h1:T2Kkp1vN6sCYg6EXBKGiRqC6vynNgIhTwuQFejmknl8=
github.com/pion/turnc v0.0.3/go.mod h1:8s1tmJIdIplzByNIABvDjFtQJCTL8c0QRdnHZVWOuU0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
go.uber.org/atomic v1.2.0 h1:yVVGhClJ8Xi1y4TxhJZE6QFPrz76BrzhWA01n47mSFk=
go.uber.org/atomic v1.2.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
Expand Down
9 changes: 4 additions & 5 deletions e2e/gortc-turn/turn-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
"go.uber.org/zap/zapcore"

"github.com/gortc/turn"

"github.com/pion/turnc"
)

const (
Expand Down Expand Up @@ -104,8 +106,7 @@ func main() {
zap.Stringer("raddr", c.RemoteAddr()),
zap.Stringer("peer", echoAddr),
)
client, err := turn.NewClient(turn.ClientOptions{
Log: logger.Named("client"),
client, err := turnc.New(turnc.Options{
Conn: c,
Username: "user",
Password: "secret",
Expand Down Expand Up @@ -143,9 +144,7 @@ func main() {
if !p.Bound() {
logger.Fatal("should be bound")
}
logger.Info("bound to channel",
turn.ZapChannelNumber("number", p.Binding()),
)
logger.Info("bound to channel")
// Sending and receiving "hello" message.
if _, err := fmt.Fprint(p, "hello"); err != nil {
logger.Fatal("failed to write data")
Expand Down
36 changes: 15 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,29 @@ module github.com/gortc/gortcd
go 1.12

require (
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973
github.com/fsnotify/fsnotify v1.4.7
github.com/golang/protobuf v1.3.0
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/golang/protobuf v1.3.0 // indirect
github.com/gortc/ice v0.6.3
github.com/gortc/stun v1.19.0
github.com/gortc/turn v0.6.7
github.com/hashicorp/hcl v1.0.0
github.com/inconshreveable/mousetrap v1.0.0
github.com/gortc/sdp v0.15.0 // indirect
github.com/gortc/stun v1.19.0 // indirect
github.com/gortc/turn v0.7.1
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/libp2p/go-reuseport v0.0.1
github.com/magiconair/properties v1.8.0
github.com/matttproud/golang_protobuf_extensions v1.0.1
github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/mapstructure v1.1.2
github.com/pelletier/go-toml v1.2.0
github.com/pion/stun v0.3.0
github.com/pion/turnc v0.0.3
github.com/pkg/errors v0.8.1
github.com/prometheus/client_golang v0.9.2
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90
github.com/prometheus/common v0.2.0
github.com/prometheus/procfs v0.0.0-20190306233201-d0f344d83b0c
github.com/spf13/afero v1.2.1
github.com/spf13/cast v1.3.0
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 // indirect
github.com/prometheus/common v0.2.0 // indirect
github.com/prometheus/procfs v0.0.0-20190306233201-d0f344d83b0c // indirect
github.com/spf13/afero v1.2.1 // indirect
github.com/spf13/cobra v0.0.3
github.com/spf13/jwalterweatherman v1.0.0
github.com/spf13/pflag v1.0.3
github.com/spf13/viper v1.3.1
go.uber.org/atomic v1.3.2
go.uber.org/multierr v1.1.0
go.uber.org/atomic v1.3.2 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.10.0
golang.org/x/sys v0.0.0-20190309122539-980fc434d28e
golang.org/x/text v0.3.0
golang.org/x/sys v0.0.0-20190309122539-980fc434d28e // indirect
gopkg.in/yaml.v2 v2.2.2
)
21 changes: 18 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
Expand All @@ -7,6 +9,7 @@ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
Expand All @@ -19,12 +22,15 @@ github.com/golang/protobuf v1.3.0 h1:kbxbvI4Un1LUWKxufD+BiE6AEExYYgkQLQmLFqA1LFk
github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0=
github.com/gortc/ice v0.6.3 h1:kP6n1WXaD2G/XEUGaGJg/dmK1SEb6VpVLiGEhJ0bNjw=
github.com/gortc/ice v0.6.3/go.mod h1:qiQkPh8nD84FWEP2/Y2Tq+2YK9WDY825qU0K+UnAnOs=
github.com/gortc/sdp v0.15.0 h1:IXnWq3mN35FhI+w7teqvzkvwYsIoqAtvRat0Hyc7gdM=
github.com/gortc/sdp v0.15.0/go.mod h1:yHG6rNKsCgfN3QoLIKYICt0hacWMhC+b5WRuk/B9oEs=
github.com/gortc/stun v1.19.0 h1:6qy7zGGk0tdMOdEzK7hLeAVZEHllJC8+OOBpPAyjY1c=
github.com/gortc/stun v1.19.0/go.mod h1:dZ0O/fYCkg9Z0Pvl6WDpNhRFTAU0X1CPOsJiZqn6EHo=
github.com/gortc/turn v0.6.7 h1:Ra6xemTBykVoqYznprYv498ayjV20SN91+O4jAxk/vY=
github.com/gortc/turn v0.6.7/go.mod h1:oChREnOebaYgxAmZd5xUS6MkKS/N5mJ9onT5Glv8mT4=
github.com/gortc/turn v0.7.1 h1:+DKoYXx8d2syTplmZ0Q3BaoTKsgClkoUzT2HpoAeK1c=
github.com/gortc/turn v0.7.1/go.mod h1:3FZ+LvCZKCKu6YYgwuYPqEi3FqCtdjfSFnFqVQNwfjk=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
Expand All @@ -42,9 +48,16 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pion/logging v0.2.1 h1:LwASkBKZ+2ysGJ+jLv1E/9H1ge0k1nTfi1X+5zirkDk=
github.com/pion/logging v0.2.1/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
github.com/pion/stun v0.3.0 h1:hKadT0I+ijxKkVXqU+rPHKLt+Sw6dQ8D+HhvuoYMoxQ=
github.com/pion/stun v0.3.0/go.mod h1:xrCld6XM+6GWDZdvjPlLMsTU21rNxnO6UO8XsAvHr/M=
github.com/pion/turnc v0.0.3 h1:T2Kkp1vN6sCYg6EXBKGiRqC6vynNgIhTwuQFejmknl8=
github.com/pion/turnc v0.0.3/go.mod h1:8s1tmJIdIplzByNIABvDjFtQJCTL8c0QRdnHZVWOuU0=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740=
Expand All @@ -67,7 +80,6 @@ github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/jwalterweatherman v0.0.0-20181028145347-94f6ae3ed3bc/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
Expand All @@ -77,6 +89,7 @@ github.com/spf13/viper v1.3.1/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
Expand All @@ -93,6 +106,7 @@ golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand All @@ -104,6 +118,7 @@ golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
Expand Down
2 changes: 1 addition & 1 deletion internal/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"
"sync"

"github.com/gortc/stun"
"github.com/pion/stun"
)

// StaticCredential wraps plain Username, Password and Realm,
Expand Down
3 changes: 2 additions & 1 deletion internal/auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package auth
import (
"testing"

"github.com/pion/stun"

"github.com/gortc/gortcd/internal/testutil"
"github.com/gortc/stun"
)

func TestStatic_Auth(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion internal/auth/nonce.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import (

"github.com/pkg/errors"

"github.com/gortc/stun"
"github.com/pion/stun"

"github.com/gortc/turn"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/auth/nonce_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import (
"testing"
"time"

"github.com/gortc/stun"
"github.com/pion/stun"

"github.com/gortc/turn"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/cli/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"

"github.com/gortc/stun"
"github.com/pion/stun"
)

func getIntegrityHexFromFlags(f *pflag.FlagSet) string {
Expand Down
3 changes: 2 additions & 1 deletion internal/cli/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ import (
"github.com/spf13/viper"
"go.uber.org/zap"

"github.com/pion/stun"

"github.com/gortc/gortcd/internal/auth"
"github.com/gortc/gortcd/internal/filter"
"github.com/gortc/gortcd/internal/manage"
"github.com/gortc/gortcd/internal/reload"
"github.com/gortc/gortcd/internal/server"
"github.com/gortc/ice"
"github.com/gortc/stun"
)

// ListenUDPAndServe listens on laddr and process incoming packets.
Expand Down
3 changes: 2 additions & 1 deletion internal/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package server
import (
"time"

"github.com/pion/stun"

"github.com/gortc/gortcd/internal/filter"
"github.com/gortc/stun"
)

type config struct {
Expand Down
3 changes: 2 additions & 1 deletion internal/server/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"sync"
"time"

"github.com/pion/stun"

"github.com/gortc/gortcd/internal/filter"
"github.com/gortc/stun"
"github.com/gortc/turn"
)

Expand Down
7 changes: 2 additions & 5 deletions internal/server/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"net"
"testing"

"github.com/pion/turnc"
"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"

"github.com/gortc/gortcd/internal/auth"
"github.com/gortc/gortcd/internal/testutil"
"github.com/gortc/turn"
)

func TestServerIntegration(t *testing.T) {
Expand Down Expand Up @@ -65,10 +65,7 @@ func TestServerIntegration(t *testing.T) {
if err != nil {
t.Fatalf("failed to dial to TURN server: %v", err)
}
clientCore, clientLogs := observer.New(zap.DebugLevel)
defer testutil.EnsureNoErrors(t, clientLogs)
client, err := turn.NewClient(turn.ClientOptions{
Log: zap.New(clientCore),
client, err := turnc.New(turnc.Options{
Conn: c,
Username: username,
Password: password,
Expand Down
Loading

0 comments on commit 93cc997

Please sign in to comment.