File tree Expand file tree Collapse file tree 4 files changed +14
-8
lines changed
Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 4040 "@types/request" : " ^2.0.6" ,
4141 "@types/semver" : " ^5.5.0" ,
4242 "@types/shortid" : " ^0.0.29" ,
43- "@types/simple-peer" : " ^6.1.4 " ,
43+ "@types/simple-peer" : " ^6.1.6 " ,
4444 "autoprefixer" : " ^9.6.0" ,
4545 "awesome-typescript-loader" : " ^5.2.1" ,
4646 "chalk" : " ^1.1.3" ,
Original file line number Diff line number Diff line change @@ -67,10 +67,10 @@ export class RTCPeerConn extends NetConnection {
6767 }
6868
6969 getIP ( ) : string {
70- return this . peer . address ( ) . address
70+ return ( this . peer as any ) . remoteAddress
7171 }
7272
7373 getPort ( ) : string {
74- return this . peer . address ( ) . port
74+ return ( this . peer as any ) . remotePort
7575 }
7676}
Original file line number Diff line number Diff line change 1- import SimplePeer , { SimplePeerData } from 'simple-peer'
1+ import SimplePeer from 'simple-peer'
22import createClient , { SignalClient } from '@metastream/signal-server/lib/client'
33import { SignalErrorCode } from '@metastream/signal-server/lib/types'
44
5- import shortid from 'shortid'
65import sodium from 'libsodium-wrappers'
76import { backOff } from 'exponential-backoff'
87
9- import { NetUniqueId , localUserId , localUser } from 'network'
8+ import { NetUniqueId , localUser } from 'network'
109import { PeerCoordinator } from 'network/server'
1110import { RTCPeerConn } from 'network/rtc'
1211import { mutualHandshake } from './authenticate'
@@ -202,7 +201,7 @@ export class WebRTCPeerCoordinator extends PeerCoordinator {
202201 const userPublicKey = await mutualHandshake ( peer , localUser ( ) . id , peerPublicKey )
203202
204203 if ( ! userPublicKey ) {
205- const addr = peer . address ( )
204+ const addr = ` ${ ( peer as any ) . remoteAddress } : ${ ( peer as any ) . remotePort } `
206205 peer . destroy ( )
207206 throw new NetworkError (
208207 NetworkErrorCode . PeerAuthenticationFailure ,
Original file line number Diff line number Diff line change 611611 resolved "https://registry.yarnpkg.com/@types/shortid/-/shortid-0.0.29.tgz#8093ee0416a6e2bf2aa6338109114b3fbffa0e9b"
612612 integrity sha1-gJPuBBam4r8qpjOBCRFLP7/6Dps=
613613
614- " @types/simple-peer@^6.1.4 " , "@types/simple-peer@^6.1. 5":
614+ " @types/simple-peer@^6.1.5 " :
615615 version "6.1.5"
616616 resolved "https://registry.yarnpkg.com/@types/simple-peer/-/simple-peer-6.1.5.tgz#9353f84cefd052a9684b9a5662c983fc2bcfab41"
617617 integrity sha512-huXri3g0rQpIO5jkG630a2sBrh1WXgsd2Gsoc9MqWTRZ0AWqyMEcMCfLXmw5i8AvrZbjAT6BIxW2gEqvpqSYwA==
618618 dependencies :
619619 " @types/node" " *"
620620
621+ " @types/simple-peer@^6.1.6 " :
622+ version "6.1.6"
623+ resolved "https://registry.yarnpkg.com/@types/simple-peer/-/simple-peer-6.1.6.tgz#a1a1f4793f6a3f7ec17df2056fe3a036a1bc2313"
624+ integrity sha512-jnktVe4nDkNAIf/5brRQ4VqMP845dtRCrFMRagOxiTdC9gZ3rpnidt8EGR89b55Wtol+otYEJveFkEy3IpxA0Q==
625+ dependencies :
626+ " @types/node" " *"
627+
621628" @types/stack-utils@^1.0.1 " :
622629 version "1.0.1"
623630 resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e"
You can’t perform that action at this time.
0 commit comments