import {Socket} from 'net'
import {Buffer} from 'buffer'
import * as Commons from './utils'

export type IDictionary<T> = Commons.IDictionary<T>

export type HandshakeCompletedHandler = (data: {
  clientHandshakeBuffer: Buffer
  responseBuffer: Buffer
}) => void

export interface HandshakePatameters {
  socket: Socket
  buffer: Buffer
  options: Commons.Socks5ProxyOptions
  connect: (buffer: Buffer) => void
  authenticate: (buffer: Buffer) => void
  end: (rpcReply: number, args: Record<string, any>) => void
  onHandshakeCompleted: HandshakeCompletedHandler
}
