test: fix Windows Socks tests (#31654)

This commit is contained in:
Max Schmitt 2024-07-11 23:16:24 +02:00 committed by GitHub
parent 01e2c8ab06
commit 97e2aa07a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -108,6 +108,8 @@ export class MockSocksServer {
host: '127.0.0.1', host: '127.0.0.1',
port: 0, port: 0,
}); });
});
this._socksProxy.addListener(SocksProxy.Events.SocksData, async (payload: SocksSocketRequestedPayload) => {
const body = '<html><title>Served by the SOCKS proxy</title></html>'; const body = '<html><title>Served by the SOCKS proxy</title></html>';
const data = Buffer.from([ const data = Buffer.from([
'HTTP/1.1 200 OK', 'HTTP/1.1 200 OK',