bulb/network~ HiddenSocket

new HiddenSocket(context)

Wraps a net.Socket in a stream.Duplex that passes data through the supplied context's tor SOCKSv5 proxy.

Parameters:
NameTypeDescription
contextmodule:bulb/context~TorContext

Methods

connect(options)

Connects the underlying socket to the destination through a tor SOCKSv5 proxy.

Parameters:
NameTypeDescription
optionsmodule:bulb/network~HiddenSocket~ConnectOptions

Destination connection address

Type Definitions

ConnectOptions

Type:
  • object
Properties
NameTypeDescription
hoststring

Address (including onion URLs) to connect to.

portnumber

Port to connect to.