1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 08:43:13 +02:00

relay: add connection to remote (issue #2066)

Connection to remote:

- handshake: offer support for all supported hash algorithms
- network connect with a socket
- upgrade to websocket and authenticate with remote (password/TOTP)
- check websocket response
- get list of buffers (not used yet)

Note: connection to remote with TLS or a proxy is not yet supported.
This commit is contained in:
Sébastien Helleu
2024-03-31 09:49:10 +02:00
parent fd32192464
commit 90b855e1aa
25 changed files with 2667 additions and 999 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ relay_api_msg_send_json_internal (struct t_relay_client *client,
string = cJSON_PrintUnformatted (json);
num_bytes = relay_client_send (
client,
RELAY_CLIENT_MSG_STANDARD,
RELAY_MSG_STANDARD,
string,
(string) ? strlen (string) : 0,
NULL); /* raw_message */
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,26 @@
/*
* Copyright (C) 2024 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef WEECHAT_PLUGIN_RELAY_REMOTE_NETWORK_H
#define WEECHAT_PLUGIN_RELAY_REMOTE_NETWORK_H
extern int relay_remote_network_connect (struct t_relay_remote *remote);
extern void relay_remote_network_disconnect (struct t_relay_remote *remote);
#endif /* WEECHAT_PLUGIN_RELAY_REMOTE_NETWORK_H */