FreeRDP
proxy_config.h
1 
20 #ifndef FREERDP_SERVER_PROXY_CONFIG_H
21 #define FREERDP_SERVER_PROXY_CONFIG_H
22 
23 #include <winpr/wtypes.h>
24 #include <winpr/ini.h>
25 
26 #include <freerdp/api.h>
27 #include <freerdp/server/proxy/proxy_modules_api.h>
28 
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #endif
38 
39  typedef struct proxy_config proxyConfig;
40 
41  struct proxy_config
42  {
43  /* server */
44  char* Host;
45  UINT16 Port;
46 
47  /* target */
48  BOOL FixedTarget;
49  char* TargetHost;
50  UINT16 TargetPort;
51  char* TargetUser;
52  char* TargetDomain;
53  char* TargetPassword;
54 
55  /* input */
56  BOOL Keyboard;
57  BOOL Mouse;
58  BOOL Multitouch;
59 
60  /* server security */
61  BOOL ServerTlsSecurity;
62  BOOL ServerRdpSecurity;
63  BOOL ServerNlaSecurity;
64 
65  /* client security */
66  BOOL ClientNlaSecurity;
67  BOOL ClientTlsSecurity;
68  BOOL ClientRdpSecurity;
69  BOOL ClientAllowFallbackToTls;
70 
71  /* channels */
72  BOOL GFX;
73  BOOL DisplayControl;
74  BOOL Clipboard;
75  BOOL AudioOutput;
76  BOOL AudioInput;
77  BOOL RemoteApp;
78  BOOL DeviceRedirection;
79  BOOL VideoRedirection;
80  BOOL CameraRedirection;
81 
82  BOOL PassthroughIsBlacklist;
83  char** Passthrough;
84  size_t PassthroughCount;
85  char** Intercept;
86  size_t InterceptCount;
87 
88  /* clipboard specific settings */
89  WINPR_DEPRECATED_VAR("[since 3.6.0] Unused, ignore", BOOL TextOnly);
90  WINPR_DEPRECATED_VAR("[since 3.6.0] Unused, ignore", UINT32 MaxTextLength);
91 
92  /* gfx settings */
93  WINPR_DEPRECATED_VAR("[since 3.6.0] Unused, ignore", BOOL DecodeGFX);
94 
95  /* modules */
96  char** Modules; /* module file names to load */
97  size_t ModulesCount;
98 
99  char** RequiredPlugins; /* required plugin names */
100  size_t RequiredPluginsCount;
101 
102  char* CertificateFile;
103  char* CertificateContent;
104 
105  char* PrivateKeyFile;
106  char* PrivateKeyContent;
107 
108  /* Data extracted from CertificateContent or CertificateFile (evaluation in this order) */
109  char* CertificatePEM;
110  size_t CertificatePEMLength;
111 
112  /* Data extracted from PrivateKeyContent or PrivateKeyFile (evaluation in this order) */
113  char* PrivateKeyPEM;
114  size_t PrivateKeyPEMLength;
115 
116  wIniFile* ini;
117 
118  /* target continued */
119  UINT32 TargetTlsSecLevel;
120  };
121 
127  FREERDP_API BOOL pf_server_config_dump(const char* file);
128 
134  FREERDP_API void pf_server_config_free(proxyConfig* config);
135 
144  WINPR_ATTR_MALLOC(pf_server_config_free, 1)
145  FREERDP_API proxyConfig* server_config_load_ini(wIniFile* ini);
153  WINPR_ATTR_MALLOC(pf_server_config_free, 1)
154  FREERDP_API proxyConfig* pf_server_config_load_file(const char* path);
155 
164  WINPR_ATTR_MALLOC(pf_server_config_free, 1)
165  FREERDP_API proxyConfig* pf_server_config_load_buffer(const char* buffer);
166 
172  FREERDP_API void pf_server_config_print(const proxyConfig* config);
173 
181  FREERDP_API size_t pf_config_required_plugins_count(const proxyConfig* config);
182 
190  FREERDP_API const char* pf_config_required_plugin(const proxyConfig* config, size_t index);
191 
199  FREERDP_API size_t pf_config_modules_count(const proxyConfig* config);
200 
207  FREERDP_API const char** pf_config_modules(const proxyConfig* config);
208 
216  FREERDP_API BOOL pf_config_clone(proxyConfig** dst, const proxyConfig* config);
217 
227  FREERDP_API BOOL pf_config_plugin(proxyPluginsManager* plugins_manager, void* userdata);
228 
237  FREERDP_API const char* pf_config_get(const proxyConfig* config, const char* section,
238  const char* key);
239 
240 #ifdef __cplusplus
241 }
242 #endif
243 
246 #endif /* FREERDP_SERVER_PROXY_CONFIG_H */
FREERDP_API proxyConfig * server_config_load_ini(wIniFile *ini)
server_config_load_ini Create a proxyConfig from a already loaded INI file.
Definition: pf_config.c:547
FREERDP_API void pf_server_config_free(proxyConfig *config)
pf_server_config_free Releases all resources associated with proxyConfig
Definition: pf_config.c:842
FREERDP_API void pf_server_config_print(const proxyConfig *config)
pf_server_config_print Print the configuration to stdout
Definition: pf_config.c:765
FREERDP_API const char * pf_config_get(const proxyConfig *config, const char *section, const char *key)
pf_config_get get a value for a section/key
Definition: pf_config.c:1297
FREERDP_API const char ** pf_config_modules(const proxyConfig *config)
pf_config_modules
Definition: pf_config.c:888
FREERDP_API BOOL pf_config_clone(proxyConfig **dst, const proxyConfig *config)
pf_config_clone Create a copy of the configuration
Definition: pf_config.c:947
FREERDP_API BOOL pf_server_config_dump(const char *file)
pf_server_config_dump Dumps a default INI configuration file
Definition: pf_config.c:594
FREERDP_API size_t pf_config_required_plugins_count(const proxyConfig *config)
pf_config_required_plugins_count
Definition: pf_config.c:867
FREERDP_API proxyConfig * pf_server_config_load_buffer(const char *buffer)
pf_server_config_load_buffer Create a proxyConfig from a memory string buffer in INI file format
Definition: pf_config.c:710
FREERDP_API BOOL pf_config_plugin(proxyPluginsManager *plugins_manager, void *userdata)
pf_config_plugin Register a proxy plugin handling event filtering defined in the configuration.
Definition: pf_config.c:1265
FREERDP_API const char * pf_config_required_plugin(const proxyConfig *config, size_t index)
pf_config_required_plugin
Definition: pf_config.c:873
FREERDP_API proxyConfig * pf_server_config_load_file(const char *path)
pf_server_config_load_file Create a proxyConfig from a INI file found at path.
Definition: pf_config.c:735
FREERDP_API size_t pf_config_modules_count(const proxyConfig *config)
pf_config_modules_count
Definition: pf_config.c:882