Using with the brook proxy server
See original GitHub issueI am trying to work with the google smtp server through the brook proxy server (https://github.com/txthinking/brook), here is the sample code:
let {SocksClient} = require('socks')
const options = {
proxy: {
ipaddress: '35.174.27.1',
port: 1080,
type: 5,
userId: 'bouncedoc',
password: 'password'
},
command: 'connect',
destination: {
host: 'gmail-smtp-in.l.google.com',
port: 25
}
};
(async function test () {
let results = 0
for (let i = 0; i < 20; i++) {
let info = SocksClient.createConnection(options, (err, info) => {
if (err) return console.error(err)
info.socket.on('data', data => {
console.log(data.toString())
results += 1
})
})
}
setTimeout(() => {
console.log(`${results}/20`)
}, 3000)
})()
Running brook on aws in container:
docker run -d -e "ARGS=socks5 -l :1080 -i 0.0.0.0 --username bouncedoc --password password" -p 1080:1080 chenhw2/brook
Sometimes the data
handler receives non-ascii chars, sometimes it completely fails with Received invalid Socks5 final handshake response
.
Expected receiving something like 220 mx.google.com ESMTP x37si5670929qtx.226 - gsmtp
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Setting Up V2Ray and Brook Proxy Servers | 101对双生儿's Blog
Enter 1 to start the installation of Brook proxy server. Choose a non-conflicting port number and a password, and use the default settings ......
Read more >How to Create a Brook Server and Client on Ubuntu 20.04
Introduction. Brook is a cross-platform proxy server and client that provides strong encryption and resistance to detection.
Read more >How to Use Brook on PC for Free Internet - Blog Tunneling
Blog.FastSSH.com — Brook is a cross-platform strong encryption and undetectable proxy. Brook's goal is to keep it simple and undetected.
Read more >How the Brook and Shiliew GUI works - TxThinking
You can see the proxy mode in Proxy & Tun in the left menu of the graphical client. In this mode, it will...
Read more >Brook Server - Howdy.id
Brook is a cross-platform strong encryption and not detectable proxy. Brook's goal is to keep it simple, stupid and not detectable.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The main change is buffering all incoming data in an internal receive buffer, and processing the next steps in the SOCKS handshake when all the required data is in the buffer. Then once the SOCKS handshake is done, any excess data received is emitted as a ‘data’ event on the socket itself, so nothing should be lost.
This was fixed by #26 and is published to npm at 2.1.5