diff --git a/plugins/webrtc/package-lock.json b/plugins/webrtc/package-lock.json index 9f2f9bafb5..d42793710b 100644 --- a/plugins/webrtc/package-lock.json +++ b/plugins/webrtc/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/webrtc", - "version": "0.1.81", + "version": "0.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/webrtc", - "version": "0.1.81", + "version": "0.2.1", "dependencies": { "@scrypted/common": "file:../../common", "@scrypted/sdk": "file:../../sdk", diff --git a/plugins/webrtc/package.json b/plugins/webrtc/package.json index 705f48f717..e47d9d5111 100644 --- a/plugins/webrtc/package.json +++ b/plugins/webrtc/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/webrtc", - "version": "0.1.81", + "version": "0.2.1", "scripts": { "scrypted-setup-project": "scrypted-setup-project", "prescrypted-setup-project": "scrypted-package-json", diff --git a/plugins/webrtc/src/werift-signaling-session.ts b/plugins/webrtc/src/werift-signaling-session.ts index 9ce3382ff6..1193923f26 100644 --- a/plugins/webrtc/src/werift-signaling-session.ts +++ b/plugins/webrtc/src/werift-signaling-session.ts @@ -67,17 +67,21 @@ export class WeriftSignalingSession implements RTCSignalingSession { async addIceCandidate(candidate: RTCIceCandidateInit) { this.remoteHasV6 ||= isV6Only(candidate.candidate?.split(' ')?.[4]); - // todo: fix this in werift or verify it still occurs at later point - // werift seems to choose whatever candidate pair results in the fastest connection. - // this makes it sometimes choose the STUN or TURN candidate even when - // on the local network. if (candidate.candidate?.includes('relay')) { - if (this.remoteHasV6 && !this.localHasV6) { - this.console.log('Possible mobile network IPv6to4 translation detected.'); - } - else { - await sleep(500); - } + // note: this code is done, werift was modified to ban bad ips like 6to4 relays from tmobile. + + // todo: fix this in werift or verify it still occurs at later point + // werift seems to choose whatever candidate pair results in the fastest connection. + // this makes it sometimes choose the STUN or TURN candidate even when + // on the local network. + // if (this.remoteHasV6 && !this.localHasV6) { + // this.console.log('Possible mobile network IPv6to4 translation detected.'); + // } + // else { + // await sleep(500); + // } + + await sleep(500); } else if (candidate.candidate?.includes('srflx')) { await sleep(250);