connect
to your mineflayer.createBot()
like this:const bot = mineflayer.createBot({
+ connect: (client) => {
+ socks.createConnection({
+ proxy: {
+ host: <proxy_ip/proxy_host>,
+ port: <myProxyPort>,'
+ type: 5,
+ userId: '<proxy_username>',
+ password: '<proxy_password>'
+ },
+ command: 'connect',
+ destination: {
+ host: '<mc_server_host/ip>',
+ port: <mc_server_port>
+ }
+ }, (err, info) => {
+ if (err) {
+ console.log(err)
+ return
+ }
+ client.setSocket(info.socket)
+ client.emit('connect')
+ })
+ },
- host: 'localhost'
username: <mc_username>,
password: <mc_password>
})