change node vless bunled

This commit is contained in:
zizifn
2023-04-23 01:31:58 +08:00
committed by zizifn
parent 16ac187f3a
commit 09a7fb6225
4 changed files with 10 additions and 8 deletions

View File

@@ -281,9 +281,9 @@ async function socketAsyncWrite(ws: Duplex, chunk: Buffer) {
}
async function wsAsyncWrite(ws: WebSocket, chunk: Uint8Array) {
// 20m not transmitted to the network
while (ws.bufferedAmount > 1024 * 1024 * 20) {
await delay(10);
// 1m not transmitted to the network
while (ws.bufferedAmount > 1024 * 1024 * 10) {
await delay(1);
}
return new Promise((resolve, reject) => {
ws.send(chunk, (error) => {