Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jirimoravcik committed Aug 19, 2024
1 parent 93baeab commit f80b314
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/socks.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ describe('SOCKS protocol', () => {
accept();
});
socksServer.listen(socksPort, 'localhost');
socksServer.useAuth(socksv5.auth.None());
socksServer.useAuth(socksv5.auth.UserPassword((user, password, cb) => {
cb(user === 'proxy-chain' && password === 'rules!');
}));

ProxyChain.anonymizeProxy({ port: proxyPort, url: `socks://localhost:${socksPort}` }).then(() => {
ProxyChain.anonymizeProxy({ port: proxyPort, url: `socks://proxy-chain:rules!@localhost:${socksPort}` }).then(() => {
gotScraping.get({ url: 'https://example.com', proxyUrl: `http://127.0.0.1:${proxyPort}` })
.then((response) => {
expect(response.body).to.contain('Example Domain');
Expand Down

0 comments on commit f80b314

Please sign in to comment.