 |
libwebsockets
Lightweight C library for HTML5 websockets
|
46 #define LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT ((1ll << 1) | \
51 #define LWS_SERVER_OPTION_SKIP_SERVER_CANONICAL_NAME (1ll << 2)
53 #define LWS_SERVER_OPTION_ALLOW_NON_SSL_ON_SSL_PORT ((1ll << 3) | \
61 #define LWS_SERVER_OPTION_LIBEV (1ll << 4)
63 #define LWS_SERVER_OPTION_DISABLE_IPV6 (1ll << 5)
65 #define LWS_SERVER_OPTION_DISABLE_OS_CA_CERTS (1ll << 6)
68 #define LWS_SERVER_OPTION_PEER_CERT_NOT_REQUIRED (1ll << 7)
70 #define LWS_SERVER_OPTION_VALIDATE_UTF8 (1ll << 8)
72 #define LWS_SERVER_OPTION_SSL_ECDH ((1ll << 9) | \
75 #define LWS_SERVER_OPTION_LIBUV (1ll << 10)
77 #define LWS_SERVER_OPTION_REDIRECT_HTTP_TO_HTTPS ((1ll << 11) |\
88 #define LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT (1ll << 12)
90 #define LWS_SERVER_OPTION_EXPLICIT_VHOSTS (1ll << 13)
93 #define LWS_SERVER_OPTION_UNIX_SOCK (1ll << 14)
95 #define LWS_SERVER_OPTION_STS (1ll << 15)
98 #define LWS_SERVER_OPTION_IPV6_V6ONLY_MODIFY (1ll << 16)
100 #define LWS_SERVER_OPTION_IPV6_V6ONLY_VALUE (1ll << 17)
102 #define LWS_SERVER_OPTION_UV_NO_SIGSEGV_SIGFPE_SPIN (1ll << 18)
108 #define LWS_SERVER_OPTION_JUST_USE_RAW_ORIGIN (1ll << 19)
115 #define LWS_SERVER_OPTION_FALLBACK_TO_RAW (1ll << 20)
116 #define LWS_SERVER_OPTION_FALLBACK_TO_APPLY_LISTEN_ACCEPT_CONFIG (1ll << 20)
129 #define LWS_SERVER_OPTION_LIBEVENT (1ll << 21)
132 #define LWS_SERVER_OPTION_ONLY_RAW (1ll << 22)
133 #define LWS_SERVER_OPTION_ADOPT_APPLY_LISTEN_ACCEPT_CONFIG (1ll << 22)
146 #define LWS_SERVER_OPTION_ALLOW_LISTEN_SHARE (1ll << 23)
152 #define LWS_SERVER_OPTION_CREATE_VHOST_SSL_CTX (1ll << 24)
159 #define LWS_SERVER_OPTION_SKIP_PROTOCOL_INIT (1ll << 25)
164 #define LWS_SERVER_OPTION_IGNORE_MISSING_CERT (1ll << 26)
170 #define LWS_SERVER_OPTION_VHOST_UPG_STRICT_HOST_CHECK (1ll << 27)
181 #define LWS_SERVER_OPTION_HTTP_HEADERS_SECURITY_BEST_PRACTICES_ENFORCE (1ll << 28)
198 #define LWS_SERVER_OPTION_ALLOW_HTTP_ON_HTTPS_LISTENER (1ll << 29)
206 #define LWS_SERVER_OPTION_FAIL_UPON_UNABLE_TO_BIND (1ll << 30)
211 #define LWS_SERVER_OPTION_H2_JUST_FIX_WINDOW_UPDATE_OVERFLOW (1ll << 31)
215 #define LWS_SERVER_OPTION_VH_H2_HALF_CLOSED_LONG_POLL (1ll << 32)
221 #define LWS_SERVER_OPTION_GLIB (1ll << 33)
227 #define lws_check_opt(c, f) ((((uint64_t)c) & ((uint64_t)f)) == ((uint64_t)f))
230 struct lws_ss_policy;
231 struct lws_ss_plugin;
233 typedef int (*lws_context_ready_cb_t)(
struct lws_context *context);
356 #if defined(LWS_WITH_TLS) && !defined(LWS_WITH_MBEDTLS)
521 #if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
714 #if defined(LWS_WITH_SECURE_STREAMS)
715 const char *pss_policies_json;
718 const struct lws_ss_plugin **pss_plugins;
721 const char *ss_proxy_bind;
726 const char *ss_proxy_address;
728 uint16_t ss_proxy_port;
780 LWS_VISIBLE LWS_EXTERN
struct lws_context *
792 LWS_VISIBLE LWS_EXTERN
void
795 typedef int (*lws_reload_func)(void);
819 LWS_VISIBLE LWS_EXTERN
void
822 LWS_VISIBLE LWS_EXTERN
int
823 lws_context_is_deprecated(
struct lws_context *context);
842 LWS_VISIBLE LWS_EXTERN
int
862 LWS_VISIBLE LWS_EXTERN
int
876 LWS_VISIBLE LWS_EXTERN
struct lws_vhost *
898 LWS_VISIBLE LWS_EXTERN
void
915 LWS_VISIBLE LWS_EXTERN
int
917 char **config_strings,
int *len);
934 LWS_VISIBLE LWS_EXTERN
int
937 char **config_strings,
int *len);
944 LWS_VISIBLE LWS_EXTERN
struct lws_vhost *
952 LWS_VISIBLE LWS_EXTERN
const char *
963 LWS_VISIBLE LWS_EXTERN
struct lws_vhost *
971 LWS_VISIBLE LWS_EXTERN
int
979 LWS_VISIBLE LWS_EXTERN
void *
987 LWS_VISIBLE LWS_EXTERN
const char *
997 LWS_VISIBLE LWS_EXTERN
int
1010 LWS_VISIBLE LWS_EXTERN
int
1022 LWS_VISIBLE LWS_EXTERN
void *
1034 LWS_VISIBLE LWS_EXTERN
void *
1080 #define AUTH_MODE_MASK 0xF0000000
LWS_VISIBLE LWS_EXTERN int lws_set_proxy(struct lws_vhost *vhost, const char *proxy)
unsigned short max_http_header_pool
Definition: lws-context-vhost.h:369
unsigned int cache_intermediaries
Definition: lws-context-vhost.h:1116
long ssl_options_clear
Definition: lws-context-vhost.h:438
LWS_VISIBLE LWS_EXTERN struct lws_context * lws_create_context(const struct lws_context_creation_info *info)
Definition: lws-context-vhost.h:1049
const char * ssl_private_key_filepath
Definition: lws-context-vhost.h:290
const struct lws_plat_file_ops * fops
Definition: lws-context-vhost.h:503
@ LWSMPRO_HTTPS
Definition: lws-context-vhost.h:1062
const char * ecdh_curve
Definition: lws-context-vhost.h:400
const char * socks_proxy_address
Definition: lws-context-vhost.h:513
const char * unix_socket_perms
Definition: lws-context-vhost.h:688
const char * value
Definition: lws-context-vhost.h:1053
unsigned int max_http_header_pool2
Definition: lws-context-vhost.h:620
long ssl_client_options_set
Definition: lws-context-vhost.h:626
const char * name
Definition: lws-context-vhost.h:1052
const char * iface
Definition: lws-context-vhost.h:254
const char * listen_accept_protocol
Definition: lws-context-vhost.h:649
lws_authentication_mode
Definition: lws-context-vhost.h:1074
const char * http_proxy_address
Definition: lws-context-vhost.h:323
const struct lws_http_mount * mount_next
Definition: lws-context-vhost.h:1087
const char * ssl_cipher_list
Definition: lws-context-vhost.h:313
struct lws_context ** pcontext
Definition: lws-context-vhost.h:605
unsigned short ip_limit_wsi
Definition: lws-context-vhost.h:561
LWS_VISIBLE LWS_EXTERN const char * lws_get_vhost_name(struct lws_vhost *vhost)
unsigned short ws_ping_pong_interval
Definition: lws-context-vhost.h:440
LWS_VISIBLE LWS_EXTERN int lws_json_dump_vhost(const struct lws_vhost *vh, char *buf, int len)
int keepalive_timeout
Definition: lws-context-vhost.h:413
const struct lws_token_limits * token_limits
Definition: lws-context-vhost.h:270
const struct lws_protocol_vhost_options * extra_mimetypes
Definition: lws-context-vhost.h:1102
LWS_VISIBLE LWS_EXTERN void lws_context_destroy(struct lws_context *context)
unsigned short ip_limit_ah
Definition: lws-context-vhost.h:553
LWS_VISIBLE LWS_EXTERN int lws_json_dump_context(const struct lws_context *context, char *buf, int len, int hide_vhosts)
lws_mount_protocols
Definition: lws-context-vhost.h:1060
const char * protocol
Definition: lws-context-vhost.h:1095
const char * client_ssl_ca_filepath
Definition: lws-context-vhost.h:489
Definition: lws-context-vhost.h:244
void * _unused[2]
Definition: lws-context-vhost.h:743
const char * client_ssl_private_key_filepath
Definition: lws-context-vhost.h:483
int cache_max_age
Definition: lws-context-vhost.h:1109
void ** foreign_loops
Definition: lws-context-vhost.h:585
const char * client_ssl_cipher_list
Definition: lws-context-vhost.h:498
const struct lws_protocol_vhost_options * reject_service_keywords
Definition: lws-context-vhost.h:456
@ LWSMPRO_CGI
Definition: lws-context-vhost.h:1064
const struct lws_protocol_vhost_options * next
Definition: lws-context-vhost.h:1050
int port
Definition: lws-context-vhost.h:245
const char * def
Definition: lws-context-vhost.h:1093
Definition: lws-ws-ext.h:139
unsigned char origin_protocol
Definition: lws-context-vhost.h:1118
const void * server_ssl_private_key_mem
Definition: lws-context-vhost.h:671
const struct lws_protocols * protocols
Definition: lws-context-vhost.h:261
const struct lws_http_mount * mounts
Definition: lws-context-vhost.h:420
det_lat_buf_cb_t detailed_latency_cb
Definition: lws-context-vhost.h:695
unsigned char mountpoint_len
Definition: lws-context-vhost.h:1119
const struct lws_extension * extensions
Definition: lws-context-vhost.h:267
const char *const * plugin_dirs
Definition: lws-context-vhost.h:407
Definition: lws-system.h:121
int ka_interval
Definition: lws-context-vhost.h:353
@ LWSMPRO_CALLBACK
Definition: lws-context-vhost.h:1067
const struct lws_protocol_vhost_options * cgienv
Definition: lws-context-vhost.h:1098
LWS_VISIBLE LWS_EXTERN void lws_context_deprecate(struct lws_context *context, lws_reload_func cb)
int simultaneous_ssl_restriction
Definition: lws-context-vhost.h:510
void * user
Definition: lws-context-vhost.h:337
const char * log_filepath
Definition: lws-context-vhost.h:417
const char * client_ssl_private_key_password
Definition: lws-context-vhost.h:471
const lws_system_ops_t * system_ops
Definition: lws-context-vhost.h:692
const void * server_ssl_cert_mem
Definition: lws-context-vhost.h:664
LWS_VISIBLE LWS_EXTERN struct lws_vhost * lws_create_vhost(struct lws_context *context, const struct lws_context_creation_info *info)
const char * alpn
Definition: lws-context-vhost.h:578
unsigned int cache_revalidate
Definition: lws-context-vhost.h:1115
unsigned int count_threads
Definition: lws-context-vhost.h:377
const struct lws_protocol_vhost_options * pvo
Definition: lws-context-vhost.h:410
LWS_VISIBLE LWS_EXTERN int lws_get_vhost_port(struct lws_vhost *vhost)
void * external_baggage_free_on_destroy
Definition: lws-context-vhost.h:463
const char * error_document_404
Definition: lws-context-vhost.h:574
unsigned int cache_reusable
Definition: lws-context-vhost.h:1114
int cgi_timeout
Definition: lws-context-vhost.h:1107
uint8_t udp_loss_sim_rx_pc
Definition: lws-context-vhost.h:711
int uid
Definition: lws-context-vhost.h:332
@ LWSMPRO_HTTP
Definition: lws-context-vhost.h:1061
@ LWSMPRO_REDIR_HTTP
Definition: lws-context-vhost.h:1065
uint8_t udp_loss_sim_tx_pc
Definition: lws-context-vhost.h:708
@ LWSAUTHM_BASIC_AUTH_CALLBACK
Definition: lws-context-vhost.h:1076
const char * vhost_name
Definition: lws-context-vhost.h:403
void(* finalize)(struct lws_vhost *vh, void *arg)
Definition: lws-context-vhost.h:611
unsigned int server_ssl_cert_mem_len
Definition: lws-context-vhost.h:668
void * provided_client_ssl_ctx
Definition: lws-context-vhost.h:363
unsigned int client_ssl_cert_mem_len
Definition: lws-context-vhost.h:480
unsigned int fd_limit_per_thread
Definition: lws-context-vhost.h:379
unsigned int pt_serv_buf_size
Definition: lws-context-vhost.h:425
long ssl_options_set
Definition: lws-context-vhost.h:436
LWS_VISIBLE LWS_EXTERN int lwsws_get_config_vhosts(struct lws_context *context, struct lws_context_creation_info *info, const char *d, char **config_strings, int *len)
const char * client_ssl_cert_filepath
Definition: lws-context-vhost.h:474
const char * listen_accept_role
Definition: lws-context-vhost.h:644
LWS_VISIBLE LWS_EXTERN struct lws_vhost * lws_get_vhost(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lwsws_get_config_globals(struct lws_context_creation_info *info, const char *d, char **config_strings, int *len)
LWS_VISIBLE LWS_EXTERN void * lws_vhost_user(struct lws_vhost *vhost)
int ka_probes
Definition: lws-context-vhost.h:349
Definition: lws-protocols-plugins.h:44
const struct lws_protocol_vhost_options * options
Definition: lws-context-vhost.h:1051
const char * mountpoint
Definition: lws-context-vhost.h:1089
unsigned int timeout_secs
Definition: lws-context-vhost.h:395
const char * server_string
Definition: lws-context-vhost.h:422
Definition: lws-retry.h:25
const char * origin
Definition: lws-context-vhost.h:1091
const char * client_tls_1_3_plus_cipher_list
Definition: lws-context-vhost.h:638
LWS_VISIBLE LWS_EXTERN struct lws_vhost * lws_get_vhost_by_name(struct lws_context *context, const char *name)
void(* signal_cb)(void *event_lib_handle, int signum)
Definition: lws-context-vhost.h:599
uint64_t options
Definition: lws-context-vhost.h:335
const void * client_ssl_ca_mem
Definition: lws-context-vhost.h:491
lws_state_notify_link_t *const * register_notifier_list
Definition: lws-context-vhost.h:704
void * _unused[2]
Definition: lws-context-vhost.h:1132
int ssl_info_event_mask
Definition: lws-context-vhost.h:544
unsigned short max_http_header_data
Definition: lws-context-vhost.h:366
const struct lws_protocol_vhost_options * interpret
Definition: lws-context-vhost.h:1104
const void * server_ssl_ca_mem
Definition: lws-context-vhost.h:678
const char * ssl_ca_filepath
Definition: lws-context-vhost.h:304
unsigned int http_proxy_port
Definition: lws-context-vhost.h:327
unsigned int timeout_secs_ah_idle
Definition: lws-context-vhost.h:550
unsigned int client_ssl_ca_mem_len
Definition: lws-context-vhost.h:494
LWS_VISIBLE LWS_EXTERN void lws_vhost_destroy(struct lws_vhost *vh)
const struct lws_protocols ** pprotocols
Definition: lws-context-vhost.h:653
const char * detailed_latency_filepath
Definition: lws-context-vhost.h:698
uint32_t http2_settings[7]
Definition: lws-context-vhost.h:568
@ LWSMPRO_FILE
Definition: lws-context-vhost.h:1063
const char * ssl_private_key_password
Definition: lws-context-vhost.h:273
const char * basic_auth_login_file
Definition: lws-context-vhost.h:1121
int gid
Definition: lws-context-vhost.h:329
Definition: lws-context-vhost.h:1086
long ssl_client_options_clear
Definition: lws-context-vhost.h:628
Definition: lws-http.h:368
const struct lws_protocol_vhost_options * headers
Definition: lws-context-vhost.h:452
unsigned int max_http_header_data2
Definition: lws-context-vhost.h:431
unsigned int socks_proxy_port
Definition: lws-context-vhost.h:517
unsigned int server_ssl_private_key_mem_len
Definition: lws-context-vhost.h:676
LWS_VISIBLE LWS_EXTERN const char * lws_get_vhost_iface(struct lws_vhost *vhost)
const char * tls1_3_plus_cipher_list
Definition: lws-context-vhost.h:631
const void * client_ssl_cert_mem
Definition: lws-context-vhost.h:477
LWS_VISIBLE LWS_EXTERN void * lws_get_vhost_user(struct lws_vhost *vhost)
LWS_VISIBLE LWS_EXTERN int lws_set_socks(struct lws_vhost *vhost, const char *socks)
const lws_retry_bo_t * retry_and_idle_policy
Definition: lws-context-vhost.h:700
LWS_VISIBLE LWS_EXTERN void * lws_context_user(struct lws_context *context)
unsigned int auth_mask
Definition: lws-context-vhost.h:1111
int bind_iface
Definition: lws-context-vhost.h:533
const char * username
Definition: lws-context-vhost.h:684
const char * groupname
Definition: lws-context-vhost.h:686
@ LWSAUTHM_DEFAULT
Definition: lws-context-vhost.h:1075
@ LWSMPRO_REDIR_HTTPS
Definition: lws-context-vhost.h:1066
const char * ssl_cert_filepath
Definition: lws-context-vhost.h:278
void * finalize_arg
Definition: lws-context-vhost.h:616
int ka_time
Definition: lws-context-vhost.h:346
unsigned int server_ssl_ca_mem_len
Definition: lws-context-vhost.h:682