ITrafficObserver
Assembly: ZennoLab.InterfacesLibrary
Full name: ZennoLab.InterfacesLibrary.TrafficMonitor.ITrafficObserver
Kind: interface
Properties
TrafficStatistic
Property
SortedList<long, TrafficElement> TrafficStatistic { get; }
Поулчает текущий список запросов
DomainsList
Property
List<DomainSettings> DomainsList { get; set; }
Белый список доменов
TrafficPolitics
Property
TrafficPolicy TrafficPolitics { get; set; }
Политика работы
UseTrafficMonitoring
Property
bool UseTrafficMonitoring { get; set; }
Использовать ли расширенный мониторинг для GetTraffic метода
Methods
Clear
Method
void Clear(string winaddr)
Очищает текущий список запросов
Parameters
| Type | Name | Description |
|---|---|---|
string | winaddr |
ClearActive
Method
void ClearActive()
Очищает текущий список запросов
RecordMode
Method
void RecordMode(bool needRecord)
Переключение режима записи
Parameters
| Type | Name | Description |
|---|---|---|
bool | needRecord |
SetContentPolicy
Method
void SetContentPolicy(TrafficPolicy policy, IEnumerable<DomainSettings> domains)
Установка политики работы
Parameters
| Type | Name | Description |
|---|---|---|
TrafficPolicy | policy | |
IEnumerable<DomainSettings> | domains |
RequestHeaders
Method
string RequestHeaders(int id)
Заголовки запроса по id запроса
Parameters
| Type | Name | Description |
|---|---|---|
int | id | id запроса |
Returns: Заголовки запроса
RequestBody
Method
String[] RequestBody(int id)
Тело запроса, массив из 2 элементов, первый - строка запроса, второй - тело post запроса
Parameters
| Type | Name | Description |
|---|---|---|
int | id | id запроса |
Returns: Тело запроса
RequestReplacedBody
Method
String[] RequestReplacedBody(int id)
Подмененное тело запроса, массив из 2 элементов, первый - строка запроса, второй - тело post запроса По умолчанию равно null
Parameters
| Type | Name | Description |
|---|---|---|
int | id | id запроса |
Returns: Тело запроса
RequestCookies
Method
string RequestCookies(int id)
Куки запроса по id запроса
Parameters
| Type | Name | Description |
|---|---|---|
int | id | id запроса |
Returns: Куки запроса
ResponseHeaders
Method
string ResponseHeaders(int id)
Заголовки ответа по id запроса
Parameters
| Type | Name | Description |
|---|---|---|
int | id | id запроса |
Returns: Заголовки ответа
ResponseBody
Method
Byte[] ResponseBody(int id)
Тело ответа по id запроса
Parameters
| Type | Name | Description |
|---|---|---|
int | id | id запроса |
Returns: Тело ответа
ResponseReplacedBody
Method
Byte[] ResponseReplacedBody(int id)
Подмененное тело ответа по id запроса По умолчанию равно null
Parameters
| Type | Name | Description |
|---|---|---|
int | id | id запроса |
Returns: Тело ответа
ResponseType
Method
string ResponseType(int id)
Content-Type ответа по id запроса
Parameters
| Type | Name | Description |
|---|---|---|
int | id | id запроса |
Returns: Content-Type ответа
ResponseCookies
Method
string ResponseCookies(int id)
Куки ответа по id запроса
Parameters
| Type | Name | Description |
|---|---|---|
int | id | id запроса |
Returns: Куки ответа
GetTraffic
Method
List<string> GetTraffic(string winaddr, IEnumerable<string> urlFilters, IEnumerable<string> headerFilters, IEnumerable<string> bodyFilters)
Получить траффик для таба
Parameters
| Type | Name | Description |
|---|---|---|
string | winaddr | |
IEnumerable<string> | urlFilters | |
IEnumerable<string> | headerFilters | |
IEnumerable<string> | bodyFilters |
ChangeRequest
Method
void ChangeRequest(string regexUrl, IEnumerable<string> regexesForReplace, IEnumerable<string> datasForReplace, bool allTime)
Подмена тела запроса
Parameters
| Type | Name | Description |
|---|---|---|
string | regexUrl | |
IEnumerable<string> | regexesForReplace | |
IEnumerable<string> | datasForReplace | |
bool | allTime |
ChangeResponse
Method
void ChangeResponse(string regexUrl, IEnumerable<string> regexesForReplace, IEnumerable<string> datasForReplace, bool allTime)
Подмена тела ответа
Parameters
| Type | Name | Description |
|---|---|---|
string | regexUrl | |
IEnumerable<string> | regexesForReplace | |
IEnumerable<string> | datasForReplace | |
bool | allTime |
GetTrafficItem
Method
string GetTrafficItem(int key)
Обновляет TrafficItem по указанному ключу
Parameters
| Type | Name | Description |
|---|---|---|
int | key |