Mikrotik web proxy redirect

ИТ База знаний

Курс по Asterisk

Полезно

— Узнать IP — адрес компьютера в интернете

— Онлайн генератор устойчивых паролей

— Онлайн калькулятор подсетей

— Калькулятор инсталляции IP — АТС Asterisk

— Руководство администратора FreePBX на русском языке

— Руководство администратора Cisco UCM/CME на русском языке

— Руководство администратора по Linux/Unix

Серверные решения

Телефония

FreePBX и Asterisk

Настройка программных телефонов

Корпоративные сети

Протоколы и стандарты

Настройка web proxy на MikroTik

Проксирование HTTP и FTP запросов от клиента осуществляется proxy-сервером по средствам сохранения копии (кэширования) запрашиваемых клиентом данных из Интернета на системе, которая расположена ближе к получателю и последующей передачи кэшированных данных получателю с более низкой задержкой. Это может быть страничка сайта, которая расположена на определённом URL’e, например — http://shareit.merionet.ru или же какой-нибудь файл, который лежит на FTP сервере.

Онлайн курс по Кибербезопасности

Изучи хакерский майндсет и научись защищать свою инфраструктуру! Самые важные и актуальные знания, которые помогут не только войти в ИБ, но и понять реальное положение дел в индустрии

Введение

Роутеры MikroTik способны выполнять следующие функции в качестве web-proxy сервера:

  • Стандартное проксирование HTTP. Когда пользователь сам указывает кто является для него proxy-сервером и настраивает браузер соответствующим образом;
  • Прозрачное проксирование. Когда пользователь не знает, что его запросы перенаправляются через proxy-сервер;
  • Настройка списка доступа по адресу источника, назначения, URL и методу передачи запросов (GET, POST др.);
  • Список кэшируемых объектов. Определяет какие копии каких ресурсов сохранять, а какие нет;
  • Прямой список доступа. Определяет какие ресурсы доступны без проксирования и для каких нужен proxy-сервер;
  • Логирование событий и операций proxy-сервера
  • Поддержка родительских proxy-серверов. В этом случае указывается дополнительный сервер и запрос направляется к нему, если первый сервер не имеет доступа к запрашиваемому объекту.

Proxy-сервер располагается между клиентом и конечным сервером с ресурсом, к которому клиент хочет получить доступ.

Web-proxy сервер случает запросы от клиентов и сохраняет ответы у себя в памяти. Если он получит запрос, содержащий тот же URL, то он может просто отправить имеющуюся копию. Если же копии нет, то он запрашивает её у конечного сервера. То же самое с файлами, если есть сохранённая копия файла, он отправит её клиенту, если нет — скачает с FTP сервера.

Есть несколько целей применения proxy-сервера:

  • Ускорение получения доступа к ресурсам, которые физически находятся дальше от получателя (большая задержка при передаче пакетов);
  • Использование в качестве HTTP Firewall’а. Блокирование доступа к нежелательным ресурсам;
  • Фильтрование web-контента по заданным параметрам, например IP-адрес источника, IP-адрес назначения и порт, URL ресурса, метод HTTP запросов;
  • Сканирование передаваемого из внутренней сети контента, например, для предотвращения утечек. При этом совсем не обязательно использовать функции кэширования на web-proxy.

Настройка стандартного web-proxy

В роутерах MikroTik, настрока web-proxy через терминал происходит через команду:

Ниже приведен список параметров доступных для настройки:

  • enabled — активирует функционал web-proxy. (yes — включен, no — выключен);
  • src-address — устанавливает IP-адрес proxy-сервера;
  • port — задаёт порт, на котором будет работать proxy-сервер;
  • parent-proxy — задаёт адрес родительского proxy-сервера;
  • cache-drive — указывает куда складывать кэшируеемых данные.
  • cache-administrator — email администратора, который будет показан на странице с ошибкой;
  • max-cache-size — указывает максимальный объём для хранения кэшируемых данных на диске в килобайтах (в случае использования внешнего диска);
  • max-ram-cache-size — указывает максимальный объём для хранения кэшируемых данных в RAM роутера в килобайтах;
  • cache-only-on-disk — указывает создавать ли внутреннюю базу данных, описывающую кэшируемый на диске контент. Может сократить потребление памяти, но повлиять на скорость;
  • maximal-client-connections — максимальное число подключений к proxy-серверу от клиентов. Подключения сверх указанного здесь количества будут отклоняться;
  • maximal-server-connections — максимальное число подключений к серверам. Подключения от клиентов к другим серверам сверх указанного здесь количества будут находиться в режиме ожидания, пока некоторые текущие подключения не завершатся ;
  • max-fresh-time — максимальный срок хранения кэшируемого контента;

Настроим стандартный proxy-сервер на адресе 192.168.11.1, для этого через терминал вводим команду:

Для настройки через Winbox открываем IP &#x2192 Web Proxy ставим галочку напротив Enabled, указываем IP адрес и порт, на котором будет работать наш proxy-сервер, кстати, тут же настраивается родительский прокси в разделе Parent proxy.

При настройке обычного функционала web-proxy, должна быть также выполнена настройка на стороне клиента (браузера) и указан сервер, который выступает в качестве proxy. Для настройки в Google Chrome нужно открыть Settings &#x2192 Advanced &#x2192 Confidentiality and Security, крутим в самый низ до пункта System и выбираем Proxy settings. В появившемся окне выбираем LAN settings &#x2192 ставим галку напротив Use a proxy server for your LAN и заходим в Advanced. В появившемся окне вбиваем параметры нашего proxy-сервера в строку HTTP (в нашем случае 192.168.11.1 и порт 8080) и применяем настройки:

Настройка прозрачного проксирования

Прозрачное проксирование не требует дополнительных настроек на стороне клиентов. Более того, пользователи даже не будут подозревать, что их запросы направляются через proxy-сервер.

Чтобы настроить прозрачное проксирование, необходимо добавить NAT’ирующее правило в Firewall, которое будет определять какие HTTP запросы будут проходить через локальный proxy. Ниже показан пример того, как можно проксировать все запросы пользователей из сети 192.168.11.0/24

Списки доступа или использование Firewall’а на основе proxy

Пожалуй, этот функционал понравится вам больше всего 🙂

Список доступа работает здесь также, как и в правилах Firewall – сначала читаются самые приоритетные правила, затем, вниз по списку — менее приоритетные. Критерием для применения правил может быть совпадение таких параметров как: адрес источника, порт источника, адрес назначения, порт назначения, запрашиваемый URL или HTTP метод (POST, GET и др.)

В случае совпадения критериев, заданных в правиле и параметров подключения, такое подключение может быть разрешено (allow) или запрещено (deny). Если параметры подключения не подпадают ни под один из критериев правил, то оно по умолчанию разрешается.

Понятно, что использование правил должно применяться вместе с настройками прозрачного проксирования, которые мы рассматривали выше. Итак, допустим мы настроили прозрачное проксирование для сети 192.168.11.0/24 и пустили все HTTP запросы из этой подсети через наш прокси сервер.

Что если мы теперь хотим запретить пользователям в данной подсети сидеть во всеми любимом вконтактике? Очень просто – настроим список доступа. Для этого:

Мы также можем заблокировать web-сайты, которые содержат какое-либо ключевое слово или часть слова в названии, например:

И гуд-бай — Tinder.com, Twitter.com, Viber.com, ну вы поняли 🙂

Мы даже можем запретить скачивание определённых файлов:

Стоит отдельно рассказать про маски (wildcard), которые позволяют настроить более тонкое соответствие проверяемых URL’лов и других названий.

В dst-host и dst-path можно указывать следующие маски — * — любое количество символов. Например — *ings.docx будет искать .docx файлы, названия которых оканчиваются на ins или же просто файл ings.docx, то есть сюда подходят такие названия файлов – paintings.docx, wings.docx – перед ings может стоять любое количество символов.

Если поставить маску ?, то поиск будет осуществляться по количеству символов. Например маска ??ings.docx найдёт файл wnings.docx, но не найдёт paintings.docx, потому что маска задана на 2 символа.

Также поддерживаются регулярные выражения, но если вы собираетесь их использовать, то перед этим обязательно нужно поставить двоеточие :.

Полный курс по Сетевым Технологиям

В курсе тебя ждет концентрат ТОП 15 навыков, которые обязан знать ведущий инженер или senior Network Operation Engineer

Источник

Напоминаем всем в офисе поздравить Сисадмина

Как Вы уже знаете сегодня день системного администратора, но вот в офисе моем об этом не все знают. Чтобы исправить это я соорудил небольшую шуточную напоминалку для коллег. Так как у нас используют оборудование фирмы Mikrotik, то на нем и все реализовал.

Читайте также:  Изменить пароль от wifi mikrotik

А задумка проста: пока забывчивый коллега серфит интернет показать ему страничку напоминалку вместо желаемого сайта, ну и через некоторое время все же показать что он там хотел увидеть вечером в пятницу.

Для этих целей поднимаем на Mikrotik`е прокси сервер

/ip proxy set enabled=yes

Далее сбрасываем страничку сообщающую об ошибках:

/ip proxy reset-html

Current html pages will be lost! Reset anyway? [y/N]:

и мы смело жмем «y»

Далее создаем правило, которое блокирует все странички проходящие через наше прокси

/ip proxy access add action=deny disabled=no

В Mikrotik`е появится страничка webproxy/error.html ее оформляем красиво. Тут еще дополню: можно пользоваться переменной $(url) она содержит URL адрес назначения — куда пользователь хотел попасть. Я сделал редирект на страничке:

Вот что я сделал:

Добавляем правило о перенаправлении трафика с 80 порта к нашему прокси, игнорируем адреса из списка Ok — этот список будет содержать тех кто уже видел напоминалку.

/ip firewall nat add disabled=no chain=dstnat protocol=tcp dst-port=80 src-address-list=!Ok action=redirect to-ports=8080 comment=sysadmin

Данное правило должно быть выше других:

/ip firewall nat move [find comment=sysadmin] destination=0

ну и теперь добавляем в список Ok тех кто видел нашу напоминалку:

/ip firewall filter add disabled=no chain=input protocol=tcp dst-port=8080 action=add-src-to-address-list address-list=Ok address-list-timeout=15m comment=sysadmin

Чтобы кто то не позабыл ставим timeout нахождение в списке на 15 минут

Теперь при попытке зайти на сайт по http коллеги увидят нашу напоминалку а после редиректа ту страничку которую хотели. Минут через 15 все повторится.

Остается только ждать поздравлений.

Применения у данного метода море. Вот например:

  • оповещение каждого нового клиента в сети (правила или объявление о чем либо).
  • у провайдера в случае необходимости поднятия отдельного соединения (pptp, l2tp, pppoe) по dhcp можно оповещать о том что это за провайдер, ссылку на сайт (который может и без подключения к интернету открываться), сообщение о том что необходимо поднять доп. соединение.
  • блокировки. Тот же Реестр или блокирование соц. сетей в офисе.
  • статистика кто что посещает или конкретно кто посещает данный URL — иногда и такое требуется
  • много чего еще. Фантазия.

Источник

Proxy

MikroTik RouterOS performs proxying of HTTP and HTTP-proxy (for FTP and HTTP protocols) requests. The proxy server performs the Internet object cache function by storing requested Internet objects, i.e., data available via HTTP and FTP protocols on a system positioned closer to the recipient in the form of speeding up customer browsing by delivering them requested file copies from the proxy cache at local network speed. MikroTik RouterOS implements the following proxy server features:

  • Regular HTTP proxy – customer (itself) specifies what is a proxy server for him;
  • Transparent proxy – the customer does not know about the proxy being enabled and there isn’t a necessity for any additional configuration for the web browser of the client;
  • Access list by source, destination, URL, and requested method (HTTP firewall);
  • Cache access list to specify which objects to cache, and which not;
  • Direct Access List – to specify which resources should be accessed directly, and which — through another proxy server;
  • Logging facility – allows to get and store information about the proxy operation;
  • Parent proxy support – allows to specify another proxy server, (if they don’t have the requested object ask their parents, or to the original server);

A proxy server usually is placed at various points between users and the destination server (also known as the origin server) on the Internet.

A Web proxy (cache) watches requests coming from clients, saving copies of the responses for itself. Then, if there is another request for the same URL, it can use the response that it has, instead of asking the origin server for it again. If the proxy has not requested a file, it downloads that from the original server.

There can be many potential purposes of proxy servers:

  • To increase access speed to resources (it takes less time for the client to get the object);
  • Works as HTTP firewall (deny access to undesirable web pages);

Allows filtering web content (by specific parameters, like source address, a destination address, port, URL, HTTP request method) scan outbound content, e.g., for data leak protection.

It may be useful to have a Web proxy running even with no cache when you want to use it only as something like an HTTP and FTP firewall (for example, denying access to undesired web pages or denying a specific type of files e.g. .mp3 files) or to redirect requests to external proxy (possibly, to a proxy with caching functions) transparently.

Configuration examples

In MikroTik RouterOS, a proxy configuration is performed in the /ip/proxy menu. See below how to enable the proxy on port 8080 and set up 192.168.88.254 as the proxy source address:

When setting up a regular proxy service, make sure it serves only your clients and prevents unauthorized access to it by creating a firewall that allows only your clients to use a proxy, otherwise, it may be used as an open proxy.

Transparent proxy configuration example

RouterOS can also act as a Transparent Caching server, with no configuration required in the customer’s web browser. A transparent proxy does not modify the requested URL or response. RouterOS will take all HTTP requests and redirect them to the local proxy service. This process will be entirely transparent to the user (users may not know anything about a proxy server that is located between them and the original server), and the only difference to them will be the increased browsing speed.

To enable the transparent mode, the firewall rule in destination NAT has to be added, specifying which connections (to which ports) should be transparently redirected to the proxy. Check proxy settings above and redirect us users (192.168.1.0/24) to a proxy server:

The web proxy can be used as a transparent and normal web proxy at the same time. In transparent mode, it is possible to use it as a standard web proxy, too. However, in this case, proxy users may have trouble reaching web pages that are accessed transparently.

Proxy-based firewall – Access List

An access list is implemented in the same way as MikroTik firewall rules processed from the top to the bottom. The first matching rule specifies the decision of what to do with this connection. Connections can be matched by their source address, destination address, destination port, sub-string of the requested URL (Uniform Resource Locator), or request method. If none of these parameters is specified, every connection will match this rule.

If a connection is matched by a rule, the action property of this rule specifies whether a connection will be allowed or not (deny). If a connection does not match any rule, it will be allowed.

In this example assume that we have configured a transparent proxy server, it will block the website http://www.facebook.com, we can always block the same for different networks by giving src-address:

Users from network 192.168.1.0/24 will not be able to access the website www.facebook.com.

You can block also websites that contain specific words in the URL:

This statement will block all websites which contain the word “mail” in the URL. Like www.mail.com, www.hotmail.com, mail.yahoo.com, etc.

We can also stop downloading specific types of files like .flv, .avi, .mp4, .mp3, .exe, .dat, …etc.

Here are available also different wildcard characters, to create specific conditions and to match them by proxy access list. Wildcard properties (dst-host and dst-path) match a complete string (i.e., they will not match «example.com» if they are set to «example»). Available wildcards are ‘*’ (match any number of any characters) and ‘?’ (match any one character).

Regular expressions are also accepted here, but if the property should be treated as a regular expression, it should start with a colon (‘:’).

To show that no symbols are allowed before the given pattern, we use the ^ symbol at the beginning of the pattern.

Читайте также:  Мигает значок wifi на роутере мтс

To specify that no symbols are allowed after the given pattern, we use the $ symbol at the end of the pattern.

Enabling RAM or Store-based caching.

In this example, it will presume that you already have the proxy configured and working and you just want to enable caching. If a command/parameter detailed description is required check the reference section which is located right below the example section.

  • RAM-based caching:
    • Good if you have a device with a considerable amount of RAM for caching. Enabling this on a device with RAM 256MB or less will not give your network any benefit.
    • Way faster cache writes/read than one that is stored on USB or SATA connected mediums.
  • Store-based caching:
    • Larger proxy caches are available simply due to medium capacity differences.

RAM proxy cache:

Store proxy cache:

Check if a cache is working:

Reference

List of all available parameters and commands per menu.

General

Property Description
always-from-cache (yes | no; Default: no) ignore client refresh requests if the content is considered fresh
anonymous (yes | no; Default: no) If not set, the IP address of the client would be passed X-Forwarded-For header (could be accessed using HTTP_X_FORWARDED_FOR environment variable in remote servers)
cache-administrator (string; Default: webmaster) Administrator’s e-mail displayed on proxy error page
cache-hit-dscp (integer: 0..63; Default: 4) Automatically mark cache hit with the provided DSCP value
cache-on-disk (yes | no; Default: no) Whether to store cache on disk
cache-path (string; Default: web-proxy) A path where the cache will be stored, when cache-on-disk is enabled.
max-cache-object-size (integer: 0..4294967295[KiB]; Default: 2048KiB) Specifies the maximal cache object size, measured in kilobytes
max-cache-size (none | unlimited | integer: 0..4294967295[KiB]; Default: unlimited) Specifies the maximal cache size, measured in kilobytes
max-client-connections (integer: Dynamic ; Default: 600) Maximal number of connections accepted from clients (any further connections will be rejected)
max-fresh-time (time; Default: 3d) Maximal time to store a cached object. The validity period of an object is usually defined by the object itself, but in case it is set too high, you can override the maximal value
max-server-connections (integer: Dynamic ; Default: 600) Maximal number of connections made to servers (any further connections from clients will be put on hold until some server connections will terminate)
parent-proxy (Ip4 | ip6; Default: 0.0.0.0) IP address and port of another HTTP proxy to redirect all requests to. If set to 0.0.0.0 parent proxy is not used.
parent-proxy-port (integer: 0..65535; Default: 0) Port that parent proxy is listening on.
port (integer: 0..65535; Default: 8080) TCP port the proxy server will be listening on. This port has to be specified on all clients that want to use the server as an HTTP proxy. A transparent (with zero configuration for clients) proxy setup can be made by redirecting HTTP requests to this port in the IP firewall using the destination NAT feature
serialize-connections (yes | no; Default: no) Do not make multiple connections to the server for multiple client connections, if possible (i.e. server supports persistent HTTP connections). Clients will be served on the FIFO principle; the next client is processed when the response transfer to the previous one is completed. If a client is idle for too long (max 5 seconds by default), it will give up waiting and open another connection to the server
src-address (Ip4 | Ip6; Default: 0.0.0.0) A proxy will use a specified address when connecting to the parent proxy or website. If set to 0.0.0.0 then the appropriate IP address will be taken from the routing table.

Access List

An access list is configured like regular firewall rules. Rules are processed from the top to the bottom. The first matching rule specifies the decision of what to do with this connection. There is a total of 6 classifiers that specify matching constraints. If none of these classifiers is specified, the particular rule will match every connection.

If a connection is matched by a rule, the action property of this rule specifies whether a connection will be allowed or not. If the particular connection does not match any rule, it will be allowed.

Property Description
action (allow | deny; Default: allow) Specifies whether to pass or deny matched packets
dst-address (Ip4[-Ip4 | /0..32] | Ip6/0..128; Default: ) The destination address of the target server.
dst-host (string; Default: ) IP address or DNS name used to make a connection to the target server (this is the string user wrote in a browser before specifying the port and path to a particular web page
dst-port (integer[-integer[,integer[. ]]]: 0..65535; Default: ) List or range of ports the packet is destined to
local-port (integer: 0..65535; Default: ) Specifies the port of the web proxy via which the packet was received. This value should match one of the ports the web proxy is listening on.
method (any | connect | delete | get | head | options | post | put | trace; Default: ) The HTTP method used in the request (see HTTP Methods section at the end of this document)
path (string; Default: ) Name of the requested page within the target server (i.e. the name of a particular web page or document without the name of the server it resides on)
redirect-to (string; Default: ) In case of access is denied by this rule, the user shall be redirected to the URL specified here
src-address (Ip4[-Ip4 | /0..32] | Ip6/0..128; Default: ) The source address of the connection originator.
Property Description
hits (integer) Count of requests that were matched by this rule

Wildcard properties (dst-host and dst-path) match a complete string (i.e., they will not match «example.com» if they are set to «example»). Available wildcards are ‘*’ (match any number of any characters) and ‘?’ (match any one character). Regular expressions are also accepted here, but if the property should be treated as a regular expression, it should start with a colon (‘:’).

Small hints in using regular expressions:

  • \\ symbol sequence is used to enter \ character in the console;
  • \. pattern means. only (in regular expressions single dot in a pattern means any symbol);
  • to show that no symbols are allowed before the given pattern, we use the ^ symbol at the beginning of the pattern;
  • to specify that no symbols are allowed after the given pattern, we use the $ symbol at the end of the pattern;
  • to enter [ or ] symbols, you should escape them with backslash «\.»;

It is strongly recommended to deny all IP addresses except those behind the router as the proxy still may be used to access your internal-use-only (intranet) web servers. Also, consult examples in Firewall Manual on how to protect your router.

Direct Access

If a parent-proxy property is specified, it is possible to tell the proxy server whether to try to pass the request to the parent proxy or to resolve it by connecting to the requested server directly. The direct Access List is managed just like the Proxy Access List described in the previous chapter except for the action argument. Unlike the access list, the direct proxy access list has a default action equal to deny. It takes place when no rules are specified or a particular request did not match any rule.

Property Description
action (allow | deny; Default: allow) Specifies the action to perform on matched packets:
  • allow — always resolve matched requests directly bypassing the parent router
  • deny — resolve matched requests through the parent proxy. If no one is specified this has the same effect as allow.
dst-address (Ip4[-Ip4 | /0..32] | Ip6/0..128; Default: ) The destination address of the target server.
dst-host (string; Default: ) IP address or DNS name used to make a connection to the target server (this is the string user wrote in a browser before specifying port and path to a particular web page
dst-port (integer[-integer[,integer[. ]]]: 0..65535; Default: ) List or range of ports used by connection to the target server.
local-port (integer: 0..65535; Default: ) Specifies the port of the web proxy via which the packet was received. This value should match one of the ports the web proxy is listening on.
method (any | connect | delete | get | head | options | post | put | trace; Default: ) The HTTP method used in the request (see HTTP Methods section at the end of this document)
path (string; Default: ) Name of the requested page within the target server (i.e. the name of a particular web page or document without the name of the server it resides on)
src-address (Ip4[-Ip4 | /0..32] | Ip6/0..128; Default: ) The source address of the connection originator.
Читайте также:  Роутер tp link обозначение значков
Property Description
hits (integer) Count of requests that were matched by this rule

Cache Management

The cache access list specifies, which requests (domains, servers, pages) have to be cached locally by web proxy, and which do not. This list is implemented exactly the same way as the web proxy access list. The default action is to cache an object (if no matching rule is found).

Property Description
action (allow | deny; Default: allow) Specifies the action to perform on matched packets:
  • allow — cache objects from matched request
  • deny — do not cache objects from matched request
dst-address (Ip4[-Ip4 | /0..32] | Ip6/0..128; Default: ) The destination address of the target server
dst-host (string; Default: ) IP address or DNS name used to make a connection to the target server (this is the string user wrote in a browser before specifying port and path to a particular web page
dst-port (integer[-integer[,integer[. ]]]: 0..65535; Default: ) List or range of ports the packet is destined to.
local-port (integer: 0..65535; Default: ) Specifies the port of the web proxy via which the packet was received. This value should match one of the ports the web proxy is listening on.
method (any | connect | delete | get | head | options | post | put | trace; Default: ) The HTTP method used in the request (see HTTP Methods section at the end of this document)
path (string; Default: ) Name of the requested page within the target server (i.e. the name of a particular web page or document without the name of the server it resides on)
src-address (Ip4[-Ip4 | /0..32] | Ip6/0..128; Default: ) The source address of the connection originator
Property Description
hits (integer) Count of requests that were matched by this rule

Connections

This menu contains the list of current connections the proxy is serving.

Property Description
client ()
dst-address (Ip4 | Ip6) IPv4/Ipv6 destination address of the connection
protocol (string) Protocol name
rx-bytes (integer) The number of bytes received by the client
server ()
src-address (Ip4 | Ip6) Ipv4/ipv6 address of the connection originator
state (closing | connecting | converting | hotspot | idle | resolving | rx-header | tx-body | tx-eof | tx-header | waiting) Connection state:
  • closing — the data transfer is finished, and the connection is being finalized
  • connecting — establishing toe connection
  • converting — replacing header and footer fields in response or request packet
  • hotspot — check if hotspot authentication allows continuing (for hotspot proxy)
  • idle — staying idle
  • resolving — resolving the server’s DNS name
  • rx-header — receiving HTTP header
  • tx-body — transmitting HTTP body to the client
  • tx-eof — writing chunk-end (when converting to chunked response)
  • tx-header — transmitting HTTP header to the client
  • waiting — waiting for transmission from a peer
tx-bytes (integer) The number of bytes sent by the client

Cache Inserts

This menu shows statistics on objects stored in a cache (cache inserts).

Property Description
denied (integer) A number of inserts were denied by the caching list.
errors (integer) Number of disk or other system-related errors
no-memory (integer) Number of objects not stored because there was not enough memory
successes (integer) A number of successful cache inserts.
too-large (integer) Number of objects too large to store

Cache Lookups

This menu shows statistics on objects read from cache (cache lookups).

Property Description
denied (integer) Number of requests denied by the access list.
expired (integer) Number of requests found in cache, but expired, and, thus, requested from an external server
no-expiration-info (integer) Conditional request received for a page that does not have the information to compare the request with
non-cacheable (integer) Number of requests requested from the external servers unconditionally (as their caching is denied by the cache access list)
not-found (integer) Number of requests not found in the cache, and, thus, requested from an external server (or parent proxy if configured accordingly)
successes (integer) Number of requests found in the cache.

Cache Contents

This menu shows cached contents.

Property Description
file-size (integer) Cached object size
last-accessed (time)
last-accessed-time (time)
last-modified (time)
last-modified-time (time)
uri (string)

HTTP Methods

Options

This method is a request for information about the communication options available on the chain between the client and the server identified by the Request-URI. The method allows the client to determine the options and (or) the requirements associated with a resource without initiating any resource retrieval

This method retrieves whatever information identified by the Request-URI. If the Request-URI refers to a data processing process then the response to the GET method should contain data produced by the process, not the source code of the process procedure(-s), unless the source is the result of the process.

The GET method can become a conditional GET if the request message includes an If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match, or If-Range header field. The conditional GET method is used to reduce the network traffic specifying that the transfer of the entity should occur only under circumstances described by conditional header field(-s).

The GET method can become a partial GET if the request message includes a Range header field. The partial GET method intends to reduce unnecessary network usage by requesting only parts of entities without transferring data already held by the client.

The response to a GET request is cacheable if and only if it meets the requirements for HTTP caching.

This method shares all features of GET method except that the server must not return a message-body in the response. This retrieves the metainformation of the entity implied by the request which leads to its wide usage of it for testing hypertext links for validity, accessibility, and recent modification.

The response to a HEAD request may be cacheable in the way that the information contained in the response may be used to update the previously cached entity identified by that Request-URI.

This method requests that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI.

The actual action performed by the POST method is determined by the origin server and usually is Request-URI dependent.

Responses to POST method are not cacheable, unless the response includes appropriate Cache-Control or Expires header fields.

This method requests that the enclosed entity be stored under the supplied Request-URI. If another entity exists under specified Request-URI, the enclosed entity should be considered as an updated (newer) version of that residing on the origin server. If the Request-URI is not pointing to an existing resource, the origin server should create a resource with that URI.

If the request passes through a cache and the Request-URI identifies one or more currently cached entities, those entries should be treated as stale. Responses to this method are not cacheable.

TRACE

This method invokes a remote, application-layer loop-back of the request message. The final recipient of the request should reflect the message received back to the client as the entity-body of a 200 (OK) response. The final recipient is either the origin server or the first proxy or gateway to receive a Max-Forwards value of 0 in the request. A TRACE request must not include an entity.

Responses to this method MUST NOT be cached.

Источник