NAME
gc_cloudflare_mode
- Cloudflare connection modes for server and client connections.
SYNOPSIS
#include <game-carrier/common.h>
enum gc_cloudflare_mode {
GC_CLOUDFLARE_MODE_OFF = 0,
GC_CLOUDFLARE_MODE_OPTIONAL = 1,
GC_CLOUDFLARE_MODE_REQUIRED = 2,
GC_CLOUDFLARE_MODE_COUNT,
};
DESCRIPTION
The Cloudflare configuration section contains the inet_proto
field, and it specifies the behavior regarding Cloudflare connections.
The following enum defines different modes for handling Cloudflare headers.
Name | Value | Description |
---|---|---|
GC_CLOUDFLARE_MODE_OFF |
0 | gcs does not expect connections with Cloudflare headers. If a connection includes a Cloudflare header, the header is not parsed, and the connection is typically rejected. |
GC_CLOUDFLARE_MODE_OPTIONAL |
1 | gcs can accept connections both with and without Cloudflare headers. If a connection includes a Cloudflare header, it is parsed, and the connection is accepted. Similarly, connections without Cloudflare headers are also accepted. |
GC_CLOUDFLARE_MODE_REQUIRED |
2 | gcs only accepts connections with Cloudflare headers. If a connection includes a Cloudflare header, it is parsed, and the connection is accepted. However, connections without Cloudflare headers are rejected. |
GC_CLOUDFLARE_MODE_COUNT |
3 | Total number of available modes. |