<abstract> new BaseProxy( [opts])
Base proxy.
Parameters:
Name | Type | Argument | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
<optional> |
Options. Properties
|
- Source:
Methods
-
getPort()
-
Gets port number.
- Source:
Throws:
-
If port number is not defined and will be chosen randomly.
- Type
- Error
Returns:
Proxy port number.
- Type
- number
-
getResponsesData()
-
Gets responses data.
- Source:
-
measureResponses()
-
Starts to measure responses and gather information of them.
- Source:
-
resetSpeed()
-
Resets proxy speed.
- Source:
-
setSpeed(speed)
-
Sets proxy speed.
Parameters:
Name Type Description speed
number | object Proxy speed, kb/s.
Properties
Name Type Argument Description req
number <optional>
<nullable>
Requests speed, kb/s.
res
number <optional>
<nullable>
Responses speed, kb/s.
- Source:
-
start()
-
Starts proxy.
- Source:
-
stop()
-
Stops proxy server.
- Source:
-
unmeasureResponses()
-
Disables responses measurement.
- Source: