File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 4646 "lodash" : " ^3.7.0" ,
4747 "regex2dfa" : " ^0.1.6" ,
4848 "tsd" : " ^0.5.7" ,
49- "uproxy-lib" : " ^27.2.2 " ,
49+ "uproxy-lib" : " ^27.2.5 " ,
5050 "utransformers" : " ^0.2.1" ,
5151 "xregexp" : " ^2.0.0"
5252 },
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ export var STORAGE_VERSION = 1;
1313
1414// 1: initial release
1515// 2: uproxy-lib v27, move to bridge but no obfuscation yet
16- export var MESSAGE_VERSION = 2 ;
16+ // 3: offer basicObfuscation
17+ export var MESSAGE_VERSION = 3 ;
1718
1819export var DEFAULT_STUN_SERVERS = [
1920 { urls : [ 'stun:stun.l.google.com:19302' ] } ,
Original file line number Diff line number Diff line change @@ -213,14 +213,17 @@ import tcp = require('../../../third_party/uproxy-lib/net/tcp');
213213 } ;
214214
215215 var pc : peerconnection . PeerConnection < Object > ;
216- if ( remoteVersion < 2 ) {
216+ if ( remoteVersion === 1 ) {
217217 log . debug ( 'peer is running client version 1, using old peerconnection' ) ;
218218 pc = new peerconnection . PeerConnectionClass (
219219 freedom [ 'core.rtcpeerconnection' ] ( config ) ,
220220 'sockstortc' ) ;
221- } else {
222- log . debug ( 'peer is running client version >1 , using bridge' ) ;
221+ } else if ( remoteVersion === 2 ) {
222+ log . debug ( 'peer is running client version 2 , using bridge without obfuscation ' ) ;
223223 pc = bridge . preObfuscation ( 'sockstortc' , config ) ;
224+ } else {
225+ log . debug ( 'peer is running client version >2, using bridge with basicObfuscation' ) ;
226+ pc = bridge . basicObfuscation ( 'sockstortc' , config ) ;
224227 }
225228
226229 return this . socksToRtc_ . start ( tcpServer , pc ) . then (
You can’t perform that action at this time.
0 commit comments