mirror of
https://github.com/Eugeny/tabby.git
synced 2025-09-24 17:16:03 +00:00
This commit is contained in:
@@ -74,7 +74,9 @@ export class SocksProxyStream extends Duplex {
|
|||||||
}, s => {
|
}, s => {
|
||||||
resolve(s)
|
resolve(s)
|
||||||
this.header = s.read()
|
this.header = s.read()
|
||||||
|
if (this.header) {
|
||||||
this.push(this.header)
|
this.push(this.header)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
connector.on('error', (err) => {
|
connector.on('error', (err) => {
|
||||||
reject(err)
|
reject(err)
|
||||||
@@ -82,7 +84,7 @@ export class SocksProxyStream extends Duplex {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.client?.on('data', data => {
|
this.client?.on('data', data => {
|
||||||
if (data !== this.header) {
|
if (!this.header || data !== this.header) {
|
||||||
// socksv5 doesn't reliably emit the first data event
|
// socksv5 doesn't reliably emit the first data event
|
||||||
this.push(data)
|
this.push(data)
|
||||||
this.header = null
|
this.header = null
|
||||||
|
Reference in New Issue
Block a user