Skip to content

Commit 42206ae

Browse files
peterpeter
peter
authored and
peter
committed
v2.0.9
1 parent 2d5b743 commit 42206ae

File tree

8 files changed

+20
-18
lines changed

8 files changed

+20
-18
lines changed

app/CoNET.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ interface dnsAddress {
332332
connect: Date []
333333
}
334334

335-
interface VE_IPptpStream {
335+
interface VE_IPptpStream1 {
336336
type?: string;
337337
buffer: string;
338338
host: string;

app/localWebServer.ts

+9-6
Original file line numberDiff line numberDiff line change
@@ -672,22 +672,24 @@ export default class localServer {
672672
if ( err ) {
673673
return CallBack ()
674674
}
675+
676+
if ( res.error ) {
677+
saveLog ( `this.localServer.QTClass.request ERROR typeof res.error = ${ typeof res.error }`)
678+
679+
return CallBack ( res.error )
680+
}
675681

676682
if ( res.Args && res.Args.length > 0 ) {
677683
let uu: twitter_post = null
678684
try {
679685
uu = JSON.parse ( Buffer.from ( res.Args [0], 'base64' ).toString ())
680686
} catch ( ex ) {
681-
return saveLog ( `getTimelines QTClass.request return JSON.parse Error! _return [ ]` )
687+
return saveLog ( `getTimelines QTClass.request return JSON.parse Error! _return [${ ex } ]` )
682688
}
683689

684690
return CallBack ( null, uu )
685691
}
686-
if ( res.error ) {
687-
saveLog ( `this.localServer.QTClass.request ERROR typeof res.error = ${ typeof res.error }`)
688-
689-
return CallBack ( res.error )
690-
}
692+
691693

692694
})
693695
}
@@ -1042,6 +1044,7 @@ export default class localServer {
10421044
return this.getTimelines ( socket, item, ( err, tweets: twitter_post ) => {
10431045
getTimelinesCount ++
10441046
if ( err ) {
1047+
socket.emit ( 'getTimelines', err )
10451048
return saveLog (`socket.on ( 'getTimelines' return [${ getTimelinesCount }] error, [${ err.message }]`)
10461049

10471050
}

app/public/scripts/CoGate.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class coGateRegion {
120120
}
121121
}
122122

123-
public QTGateGatewayConnectRequestCallBack ( error, connectCommand: IConnectCommand ) {
123+
public QTGateGatewayConnectRequestCallBack ( error, connectCommand: IConnectCommand[]) {
124124
clearTimeout ( this.doingProcessBarTime )
125125
this.CoGateConnerting ( false )
126126

@@ -132,9 +132,6 @@ class coGateRegion {
132132
return
133133
}
134134

135-
if ( connectCommand.error > -1 ) {
136-
return this.error ( connectCommand.error )
137-
}
138135
const data1 = connectCommand[0]
139136
this.localHostIP ( data1.localServerIp[0] )
140137
this.QTGateLocalProxyPort ( data1.localServerPort )
@@ -358,7 +355,7 @@ class CoGateClass {
358355
})
359356
})
360357

361-
socketIo.on ( 'QTGateGatewayConnectRequest', function ( err, cmd: IConnectCommand, ) {
358+
socketIo.on ( 'QTGateGatewayConnectRequest', function ( err, cmd: IConnectCommand[], ) {
362359

363360
if ( ! self.CoGateRegion() ) {
364361
let uuu: coGateRegion = null
@@ -367,6 +364,7 @@ class CoGateClass {
367364
return n.qtRegion === region
368365
})
369366
const uu = self.QTGateRegions()[ regionIndex ]
367+
self.QTTransferData ( cmd[0].transferData )
370368
uuu = new coGateRegion ( uu, self.QTTransferData(), function () {
371369
self.account ()
372370
}, isUsedPublicImapAccount, function () {

app/public/scripts/twitter.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@ module twitter_layout {
433433

434434
private twitterPostReturn ( data: twitter_post ) {
435435
const self = this
436-
if ( ! data ) {
437-
return alert ('no data ')
436+
if ( typeof data === 'number' ) {
437+
438438
}
439439
if ( ++this.requestNewTimelinesCount === 20 ) {
440440
this.bottomEventLoader( false )

app/tools/gateway.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export default class gateWay {
121121

122122
}
123123

124-
public requestGetWay ( id: string, uuuu: VE_IPptpStream, userAgent: string, socket: Net.Socket ) {
124+
public requestGetWay ( id: string, uuuu: VE_IPptpStream1, userAgent: string, socket: Net.Socket ) {
125125

126126
// remote server was stoped
127127
if ( this.RemoteServerDistroyed ) {

app/tools/httpProxy.ts

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export default class httpProxy {
4949
u +='}'
5050

5151
this.headers = JSON.parse ( u )
52+
5253
}
5354

5455
get parts () {

app/tools/proxyServer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ const httpProxy = ( clientSocket: Net.Socket, buffer: Buffer, useGatWay: boolean
272272
if ( err ) {
273273

274274
if ( useGatWay && _data && _data.length && clientSocket.writable ) {
275-
const uuuu : VE_IPptpStream = {
275+
const uuuu : VE_IPptpStream1 = {
276276
uuid: Crypto.randomBytes (10).toString ('hex'),
277277
host: hostName,
278278
buffer: _data.toString ( 'base64' ),

app/tools/socket5ForiOpn.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class socks5 {
6262
const CallBack = ( err?: Error, _data?: Buffer ) => {
6363
if ( err ) {
6464
if ( this.proxyServer.useGatWay && _data && _data.length && this.socket.writable && this.proxyServer.gateway ) {
65-
const uuuu : VE_IPptpStream = {
65+
const uuuu : VE_IPptpStream1 = {
6666
uuid: Crypto.randomBytes (10).toString ('hex'),
6767
host: this.host|| this.targetIpV4,
6868
buffer: _data.toString ( 'base64' ),
@@ -244,7 +244,7 @@ export class sockt4 {
244244
const CallBack = ( err?: Error, _data?: Buffer ) => {
245245
if ( err ) {
246246
if ( this.proxyServer.useGatWay && _data && _data.length && this.socket.writable && this.proxyServer.gateway ) {
247-
const uuuu : VE_IPptpStream = {
247+
const uuuu : VE_IPptpStream1 = {
248248
uuid: Crypto.randomBytes (10).toString ('hex'),
249249
host: this.host || this.targetIpV4 ,
250250
buffer: _data.toString ( 'base64' ),

0 commit comments

Comments
 (0)