The Cute::ConnectionInfo holds connection information when handling errors. More...
Header: | #include <CuteServer.h> |
bool | hasProxy() const |
QString | localIp() const |
quint16 | localPort() const |
QString | peerIp() const |
quint16 | peerPort() const |
QString | proxiedIp() const |
quint16 | proxiedPort() const |
QString | proxyIp() const |
quint16 | proxyPort() const |
Whenever an error is reported to a handler registered through the setErrorHandler function, connection information is passed in an instance of Cute::ConnectionInfo, allowing handlers to take actions, like banning temporarily/permanently an IP.
Returns true if a proxy is present. A proxy is an intermediary in the connection path. When proxies are used, clients connect to proxy and proxy connects to backend servers. Proxies may act as load balancers by accepting client connections and dispatching messages to connections established to background servers or may have the purpose of hiding background infrastructure from DDOS attacks by hiding backend server IPs from malicious clients.
Proxies may process TCP data or they may process HTTP requests. When processing TCP data, proxies may use SSL termination or SSL passthrough for encrypted connections. One of the most used open source TCP/HTTP proxy is HAProxy.
Proxies pass client information (IP) to backend servers in two ways. When handling TCP data, a proxy header can be sent when the backend connection is established. Two formats (v1/v2) for passing information as a proxy header exist. HTTP proxies can send client information as HTTP headers. Cute server supports both ways of processing client information (see Configuring Server for more information).
Returns the local IP of the connection.
Returns the local port of the connection.
Returns the IP of the connected peer. If a proxy is present, this is the proxy IP.
Returns the port of the connected peer. If a proxy is present, this is the proxy port.
Returns the client IP when a proxy is being used.
See also hasProxy.
Returns the client port when a proxy is being used.
See also hasProxy.
Returns the proxy IP when a proxy is being used.
See also hasProxy.
Returns the proxy port when a proxy is being used.
See also hasProxy.