mirror of
https://github.com/xtr-dev/rondevu-demo.git
synced 2025-12-10 02:43:23 +00:00
Force TURN relay mode to bypass NAT hairpinning
Added iceTransportPolicy: 'relay' to RTC_CONFIG to force TURN relay usage. This bypasses NAT hairpinning issues when testing on the same network (e.g., two browser tabs on the same machine). This setting ensures maximum compatibility and reliability for WebRTC connections by always using the TURN relay instead of attempting direct or STUN-based connections. Note: Should be commented out in production to allow direct connections when possible for better performance. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,10 @@ const RTC_CONFIG = {
|
|||||||
username: "webrtcuser",
|
username: "webrtcuser",
|
||||||
credential: "supersecretpassword"
|
credential: "supersecretpassword"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
// Force TURN relay to bypass NAT hairpinning (when testing on same network)
|
||||||
|
// Comment out for production to allow direct connections when possible
|
||||||
|
iceTransportPolicy: 'relay'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function App() {
|
export default function App() {
|
||||||
|
|||||||
Reference in New Issue
Block a user