From ef213c66c19d265140e9a55519b174d34ff1f16b Mon Sep 17 00:00:00 2001 From: Yonit Halperin Date: Fri, 16 Oct 2009 00:21:43 +0200 Subject: tunnel --- client/application.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'client/application.cpp') diff --git a/client/application.cpp b/client/application.cpp index b30baa84..65937156 100644 --- a/client/application.cpp +++ b/client/application.cpp @@ -40,6 +40,7 @@ #include "quic.h" #include "mutex.h" #include "cmd_line_parser.h" +#include "tunnel_channel.h" #include #include @@ -236,7 +237,7 @@ enum AppCommands { Application::Application() : _client (*this) - , _enabled_channels(RED_CHANNEL_END, true) + , _enabled_channels (RED_CHANNEL_END, true) , _main_screen (NULL) , _quitting (false) , _active (false) @@ -1323,6 +1324,7 @@ bool Application::set_channels_security(CmdLineParser& parser, bool on, char *va channels_names["cursor"] = RED_CHANNEL_CURSOR; channels_names["playback"] = RED_CHANNEL_PLAYBACK; channels_names["record"] = RED_CHANNEL_RECORD; + channels_names["tunnel"] = RED_CHANNEL_TUNNEL; if (!strcmp(val, "all")) { if ((val = parser.next_argument())) { @@ -1382,6 +1384,7 @@ bool Application::set_enable_channels(CmdLineParser& parser, bool enable, char * channels_names["cursor"] = RED_CHANNEL_CURSOR; channels_names["playback"] = RED_CHANNEL_PLAYBACK; channels_names["record"] = RED_CHANNEL_RECORD; + channels_names["tunnel"] = RED_CHANNEL_TUNNEL; if (!strcmp(val, "all")) { if ((val = parser.next_argument())) { @@ -1460,6 +1463,7 @@ bool Application::process_cmd_line(int argc, char** argv) _peer_con_opt[RED_CHANNEL_CURSOR] = RedPeer::ConnectionOptions::CON_OP_INVALID; _peer_con_opt[RED_CHANNEL_PLAYBACK] = RedPeer::ConnectionOptions::CON_OP_INVALID; _peer_con_opt[RED_CHANNEL_RECORD] = RedPeer::ConnectionOptions::CON_OP_INVALID; + _peer_con_opt[RED_CHANNEL_TUNNEL] = RedPeer::ConnectionOptions::CON_OP_INVALID; parser.begin(argc, argv); @@ -1595,6 +1599,10 @@ bool Application::process_cmd_line(int argc, char** argv) _client.register_channel_factory(RecordChannel::Factory()); } + if (_enabled_channels[RED_CHANNEL_TUNNEL]) { + _client.register_channel_factory(TunnelChannel::Factory()); + } + _client.init(host.c_str(), port, sport, password.c_str(), auto_display_res); if (auto_display_res) { Monitor* mon = find_monitor(0); -- cgit