mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-02 14:28:32 +00:00
Make tunnel support optional in client too
This commit is contained in:
parent
ceff16cad6
commit
633e962ac3
@ -40,7 +40,9 @@
|
||||
#include "quic.h"
|
||||
#include "mutex.h"
|
||||
#include "cmd_line_parser.h"
|
||||
#ifdef USE_TUNNEL
|
||||
#include "tunnel_channel.h"
|
||||
#endif
|
||||
#include "rect.h"
|
||||
#ifdef USE_GUI
|
||||
#include "gui/gui.h"
|
||||
@ -1922,9 +1924,11 @@ void Application::register_channels()
|
||||
_client.register_channel_factory(RecordChannel::Factory());
|
||||
}
|
||||
|
||||
#ifdef USE_TUNNEL
|
||||
if (_enabled_channels[SPICE_CHANNEL_TUNNEL]) {
|
||||
_client.register_channel_factory(TunnelChannel::Factory());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Application::process_cmd_line(int argc, char** argv)
|
||||
|
||||
@ -109,8 +109,6 @@ RED_COMMON_SRCS = \
|
||||
$(CLIENT_DIR)/hot_keys.cpp \
|
||||
$(CLIENT_DIR)/hot_keys.h \
|
||||
$(CLIENT_DIR)/threads.cpp \
|
||||
$(CLIENT_DIR)/tunnel_channel.cpp \
|
||||
$(CLIENT_DIR)/tunnel_channel.h \
|
||||
$(CLIENT_DIR)/utils.cpp \
|
||||
$(CLIENT_DIR)/utils.h \
|
||||
$(CLIENT_DIR)/zlib_decoder.cpp \
|
||||
@ -118,6 +116,15 @@ RED_COMMON_SRCS = \
|
||||
$(CLIENT_DIR)/icon.h \
|
||||
$(NULL)
|
||||
|
||||
if SUPPORT_TUNNEL
|
||||
RED_TUNNEL_SRCS = \
|
||||
$(CLIENT_DIR)/tunnel_channel.cpp \
|
||||
$(CLIENT_DIR)/tunnel_channel.h \
|
||||
$(NULL)
|
||||
else
|
||||
RED_TUNNEL_SRCS =
|
||||
endif
|
||||
|
||||
if SUPPORT_GUI
|
||||
RED_GUI_SRCS = \
|
||||
$(CLIENT_DIR)/gui/softrenderer.h \
|
||||
@ -127,7 +134,8 @@ RED_GUI_SRCS = \
|
||||
$(CLIENT_DIR)/gui/resource_provider.h \
|
||||
$(CLIENT_DIR)/gui/resource_provider.cpp \
|
||||
$(CLIENT_DIR)/gui/gui.h \
|
||||
$(CLIENT_DIR)/gui/gui.cpp
|
||||
$(CLIENT_DIR)/gui/gui.cpp \
|
||||
$(NULL)
|
||||
else
|
||||
RED_GUI_SRCS =
|
||||
endif
|
||||
@ -176,6 +184,7 @@ spicec_SOURCES = \
|
||||
x_platform.h \
|
||||
$(RED_COMMON_SRCS) \
|
||||
$(RED_GUI_SRCS) \
|
||||
$(RED_TUNNEL_SRCS) \
|
||||
$(RED_OGL_SRCS) \
|
||||
$(NULL)
|
||||
|
||||
|
||||
@ -96,6 +96,9 @@ AC_ARG_ENABLE(tunnel,
|
||||
[ --enable-tunnel Enable network redirection],
|
||||
[ have_tunnel=yes])
|
||||
AM_CONDITIONAL(SUPPORT_TUNNEL, test "x$have_tunnel" = "xyes")
|
||||
if test "x$have_tunnel" = "xyes"; then
|
||||
AC_DEFINE(USE_TUNNEL, [1], [Define if supporting tunnel proxying])
|
||||
fi
|
||||
|
||||
use_gui=no
|
||||
AC_ARG_ENABLE(gui,
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
#include "demarshallers.h"
|
||||
#include "marshaller.h"
|
||||
#include "generated_marshallers.h"
|
||||
#ifdef HAVE_SLIRP
|
||||
#ifdef USE_TUNNEL
|
||||
#include "red_tunnel_worker.h"
|
||||
#endif
|
||||
|
||||
@ -92,7 +92,9 @@ static pthread_mutex_t *lock_cs;
|
||||
static long *lock_count;
|
||||
uint32_t streaming_video = STREAM_VIDEO_FILTER;
|
||||
spice_image_compression_t image_compression = SPICE_IMAGE_COMPRESS_AUTO_GLZ;
|
||||
#ifdef USE_TUNNEL
|
||||
void *red_tunnel = NULL;
|
||||
#endif
|
||||
int agent_mouse = TRUE;
|
||||
|
||||
static void openssl_init();
|
||||
@ -3456,7 +3458,7 @@ __visible__ int spice_server_add_interface(SpiceServer *s,
|
||||
attach_to_red_agent(SPICE_CONTAINEROF(sin, SpiceVDIPortInstance, base));
|
||||
|
||||
} else if (strcmp(interface->type, SPICE_INTERFACE_NET_WIRE) == 0) {
|
||||
#ifdef HAVE_SLIRP
|
||||
#ifdef USE_TUNNEL
|
||||
SpiceNetWireInstance *net;
|
||||
red_printf("SPICE_INTERFACE_NET_WIRE");
|
||||
if (red_tunnel) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user