FreeRDP
pf_server.c File Reference
#include <errno.h>
#include <signal.h>
#include <freerdp/freerdp.h>
#include <freerdp/listener.h>
#include <winpr/crt.h>
#include <winpr/ssl.h>
#include <winpr/synch.h>
#include <winpr/string.h>
#include <winpr/path.h>
#include <winpr/winsock.h>
#include <winpr/thread.h>
#include <freerdp/channels/wtsvc.h>
#include <freerdp/channels/channels.h>
#include <freerdp/constants.h>
#include <freerdp/server/rdpsnd.h>
#include <freerdp/server/rdpgfx.h>
#include "pf_server.h"
#include "pf_log.h"
#include "pf_config.h"
#include "pf_client.h"
#include "pf_context.h"
#include "pf_input.h"
#include "pf_update.h"
#include "pf_channels.h"
#include "pf_rdpgfx.h"
#include "pf_disp.h"

Macros

#define TAG   PROXY_TAG("server")
 
#define TARGET_MAX   (100)
 
#define ROUTING_TOKEN_PREFIX   "Cookie: msts="
 

Functions

static BOOL pf_server_parse_target_from_routing_token (rdpContext *context, char **target, DWORD *port)
 
static BOOL pf_server_get_target_info (rdpContext *context, rdpSettings *settings, proxyConfig *config)
 
static BOOL pf_server_post_connect (freerdp_peer *client)
 
static BOOL pf_server_activate (freerdp_peer *client)
 
static BOOL pf_server_adjust_monitor_layout (freerdp_peer *peer)
 
static DWORD WINAPI pf_server_handle_client (LPVOID arg)
 
static BOOL pf_server_client_connected (freerdp_listener *listener, freerdp_peer *client)
 
static void pf_server_mainloop (freerdp_listener *listener)
 
int pf_server_start (proxyConfig *config)
 

Macro Definition Documentation

#define ROUTING_TOKEN_PREFIX   "Cookie: msts="
#define TAG   PROXY_TAG("server")

FreeRDP: A Remote Desktop Protocol Implementation FreeRDP Proxy Server

Copyright 2019 Mati Shabtay matis.nosp@m.habt.nosp@m.ay@gm.nosp@m.ail..nosp@m.com Copyright 2019 Kobi Mizrachi kmizr.nosp@m.achi.nosp@m.18@gm.nosp@m.ail..nosp@m.com Copyright 2019 Idan Freiberg speid.nosp@m.y@gm.nosp@m.ail.c.nosp@m.om

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

#define TARGET_MAX   (100)

Function Documentation

static BOOL pf_server_activate ( freerdp_peer *  client)
static

Here is the caller graph for this function:

static BOOL pf_server_adjust_monitor_layout ( freerdp_peer *  peer)
static

Here is the caller graph for this function:

static BOOL pf_server_client_connected ( freerdp_listener *  listener,
freerdp_peer *  client 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL pf_server_get_target_info ( rdpContext *  context,
rdpSettings *  settings,
proxyConfig *  config 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static DWORD WINAPI pf_server_handle_client ( LPVOID  arg)
static

Handles an incoming client connection, to be run in it's own thread.

arg is a pointer to a freerdp_peer representing the client.

Here is the call graph for this function:

Here is the caller graph for this function:

static void pf_server_mainloop ( freerdp_listener *  listener)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL pf_server_parse_target_from_routing_token ( rdpContext *  context,
char **  target,
DWORD *  port 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL pf_server_post_connect ( freerdp_peer *  client)
static

This callback is called when the entire connection sequence is done (as described in MS-RDPBCGR section 1.3)

The server may start sending graphics output and receiving keyboard/mouse input after this callback returns.

Here is the call graph for this function:

Here is the caller graph for this function:

int pf_server_start ( proxyConfig *  config)

FreeRDP: A Remote Desktop Protocol Implementation FreeRDP Proxy Server

Copyright 2019 Mati Shabtay matis.nosp@m.habt.nosp@m.ay@gm.nosp@m.ail..nosp@m.com Copyright 2019 Kobi Mizrachi kmizr.nosp@m.achi.nosp@m.18@gm.nosp@m.ail..nosp@m.com Copyright 2019 Idan Freiberg speid.nosp@m.y@gm.nosp@m.ail.c.nosp@m.om

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Here is the call graph for this function:

Here is the caller graph for this function: