feat: add ICE servers and local IP address returned by the API to fix connectivity issues behind NAT (#146)

Add ICE servers and local IP address returned by the API to fix connectivity issues behind NAT
This commit is contained in:
Aveline
2025-02-11 15:45:14 +01:00
committed by GitHub
parent 15768ee0ab
commit 0d7efe5c0e
3 changed files with 43 additions and 9 deletions

8
web.go
View File

@@ -17,8 +17,10 @@ import (
var staticFiles embed.FS
type WebRTCSessionRequest struct {
Sd string `json:"sd"`
OidcGoogle string `json:"OidcGoogle,omitempty"`
Sd string `json:"sd"`
OidcGoogle string `json:"OidcGoogle,omitempty"`
IP string `json:"ip,omitempty"`
ICEServers []string `json:"iceServers,omitempty"`
}
type SetPasswordRequest struct {
@@ -116,7 +118,7 @@ func handleWebRTCSession(c *gin.Context) {
return
}
session, err := newSession()
session, err := newSession(SessionConfig{})
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err})
return