|
|
@@ -85,9 +85,9 @@ export class MetaGateway
|
|
|
|
|
|
this.peer = new PeerConnection('roomTest', {
|
|
|
// iceServers: ['stun:stun.l.google.com:19302'],
|
|
|
- // portRangeBegin: 52000,
|
|
|
- // portRangeEnd: 53000,
|
|
|
- iceServers: ['stun:120.24.252.95:3478'],
|
|
|
+ portRangeBegin: 52000,
|
|
|
+ portRangeEnd: 53000,
|
|
|
+ iceServers: ['stun:172.18.156.41:3478', 'stun:120.24.252.95:3478'],
|
|
|
});
|
|
|
|
|
|
this.peer.onLocalDescription((sdp, type) => {
|
|
|
@@ -109,7 +109,7 @@ export class MetaGateway
|
|
|
|
|
|
this.peer.onLocalCandidate((candidate, mid) => {
|
|
|
if (/172\./.test(candidate)) {
|
|
|
- console.error('private Ip process');
|
|
|
+ console.error('private Ip process', candidate);
|
|
|
|
|
|
if (candidate.includes(process.env.PRIVATE_IP)) {
|
|
|
console.error('PRIVATE_IP', process.env.PRIVATE_IP);
|
|
|
@@ -224,7 +224,7 @@ export class MetaGateway
|
|
|
if (channel.isOpen()) {
|
|
|
channel.sendMessageBinary(Buffer.from(heartPack.buffer));
|
|
|
}
|
|
|
- }, 1e3);
|
|
|
+ }, 10);
|
|
|
}
|
|
|
|
|
|
stopSendWertcHeartPack(): void {
|