diff --git a/includes/ziti/ziti_model.h b/includes/ziti/ziti_model.h index fcf10df4..e6e34bf7 100644 --- a/includes/ziti/ziti_model.h +++ b/includes/ziti/ziti_model.h @@ -128,6 +128,13 @@ XX(protocol, string, none, protocol, __VA_ARGS__) \ XX(hostname, string, none, hostname, __VA_ARGS__) \ XX(port, int, none, port, __VA_ARGS__) +#define ZITI_PROXY_SERVER_TYPE_ENUM(XX, ...) \ +XX(http, __VA_ARGS__) + +#define ZITI_PROXY_SERVER_MODEL(XX, ...) \ +XX(address, string, none, address, __VA_ARGS__) \ +XX(type, ziti_proxy_server_type, none, type, __VA_ARGS__) + #define ZITI_HOST_CFG_V1_MODEL(XX, ...) \ XX(protocol, string, none, protocol, __VA_ARGS__) \ XX(forward_protocol, bool, none, forwardProtocol, __VA_ARGS__) \ @@ -139,6 +146,7 @@ XX(port, int, none, port, __VA_ARGS__) \ XX(forward_port, bool, none, forwardPort, __VA_ARGS__) \ XX(allowed_port_ranges, ziti_port_range, array, allowedPortRanges, __VA_ARGS__) \ XX(allowed_source_addresses, ziti_address, array, allowedSourceAddresses, __VA_ARGS__) \ +XX(proxy, ziti_proxy_server, none, proxy, __VA_ARGS__) \ XX(listen_options, ziti_listen_options, ptr, listenOptions, __VA_ARGS__) #define ZITI_HOST_CFG_V2_MODEL(XX, ...) \ @@ -243,6 +251,10 @@ DECLARE_MODEL(ziti_listen_options, ZITI_LISTEN_OPTS_MODEL) DECLARE_MODEL(ziti_server_cfg_v1, ZITI_SERVER_CFG_V1_MODEL) +DECLARE_ENUM(ziti_proxy_server_type, ZITI_PROXY_SERVER_TYPE_ENUM) + +DECLARE_MODEL(ziti_proxy_server, ZITI_PROXY_SERVER_MODEL) + DECLARE_MODEL(ziti_host_cfg_v1, ZITI_HOST_CFG_V1_MODEL) DECLARE_MODEL(ziti_host_cfg_v2, ZITI_HOST_CFG_V2_MODEL) diff --git a/library/internal_model.c b/library/internal_model.c index 1e269c6b..37b4d4c5 100644 --- a/library/internal_model.c +++ b/library/internal_model.c @@ -63,6 +63,10 @@ IMPL_MODEL(ziti_listen_options, ZITI_LISTEN_OPTS_MODEL) IMPL_MODEL(ziti_server_cfg_v1, ZITI_SERVER_CFG_V1_MODEL) +IMPL_ENUM(ziti_proxy_server_type, ZITI_PROXY_SERVER_TYPE_ENUM) + +IMPL_MODEL(ziti_proxy_server, ZITI_PROXY_SERVER_MODEL) + IMPL_MODEL(ziti_host_cfg_v1, ZITI_HOST_CFG_V1_MODEL) IMPL_MODEL(ziti_host_cfg_v2, ZITI_HOST_CFG_V2_MODEL)