Revert WG changes and use the local proxy

This commit is contained in:
Zoltán Papp
2024-04-23 16:07:40 +02:00
parent 318d379658
commit 3cb519c650
8 changed files with 98 additions and 44 deletions
+6 -1
View File
@@ -31,6 +31,7 @@ func NewPermanentTurn(stunURL, turnURL *stun.URI) *PermanentTurn {
}
func (r *PermanentTurn) Open() error {
log.Debugf("Opening permanent turn connection")
stunConn, err := net.ListenPacket("udp4", "0.0.0.0:0")
if err != nil {
return err
@@ -52,7 +53,11 @@ func (r *PermanentTurn) Open() error {
return err
}
r.turnClient = client
r.listen()
err = r.turnClient.Listen()
if err != nil {
log.Errorf("failed to listen: %v", err)
}
//r.listen()
relayConn, err := client.Allocate()
if err != nil {