Sébastien Helleu
976e5e8ae4
relay/api: free hook_url_handshake when disconnecting from remote
2024-04-10 21:57:00 +02:00
Sébastien Helleu
f40f3cfa40
relay/api: add tags in lines displayed in remote buffers
2024-04-10 20:57:16 +02:00
Sébastien Helleu
5046a9b596
relay/api: fix decoding of large websocket frames in remote client ( closes #2107 )
2024-04-09 13:32:34 +02:00
Sébastien Helleu
dbf9068909
relay/api: read data on socket only if connected
2024-04-09 13:15:15 +02:00
Sébastien Helleu
e8081fe4f7
relay/api: free frames after use
2024-04-09 13:13:32 +02:00
Sébastien Helleu
ed2becf8fe
relay: free frames only if they were allocated by function relay_websocket_decode_frame
2024-04-09 13:08:12 +02:00
Sébastien Helleu
f7c27b0801
relay: free all data in remote
2024-04-09 13:02:45 +02:00
Sébastien Helleu
fadf9c47c9
relay/api: use function asprintf in JSON send functions
2024-04-08 19:12:33 +02:00
Sébastien Helleu
a3c9a5b897
relay: fix build when CJSON is disabled
2024-04-08 07:32:03 +02:00
Sébastien Helleu
419515845d
relay: simplify function relay_auth_check_hash_sha
2024-04-07 17:54:28 +02:00
Sébastien Helleu
5eaac71d25
relay/api: use function asprintf to build string with salt and password
2024-04-07 17:53:42 +02:00
Sébastien Helleu
fd5f42dc06
relay/api: fix authentication with remote using hash algorithm "sha256" or "sha512"
2024-04-07 17:29:35 +02:00
Sébastien Helleu
ec8c4cc042
relay/api: use function asprintf to build key and check websocket reply
2024-04-07 17:22:03 +02:00
Sébastien Helleu
ec3b3d47be
relay/api: convert group/nick color names to the real color code
2024-04-07 16:59:45 +02:00
Sébastien Helleu
8cb302e600
relay: add example with "api" protocol in /help relay (issue #2066 )
2024-04-07 15:33:41 +02:00
Sébastien Helleu
eacd0002dd
relay: add missing line for "api" protocol in /help relay (issue #2066 )
2024-04-07 15:33:36 +02:00
Sébastien Helleu
ef12c93f1b
relay: improve messages displayed (issue #2066 )
2024-04-07 14:49:12 +02:00
Sébastien Helleu
14beee8a91
relay/api: rename field "nicks" to "nicklist" in GET /api/buffers
2024-04-07 13:18:14 +02:00
Sébastien Helleu
7c2f44e74e
relay/api: add nicklist group and nick id in response to GET /api/buffers (issue #2081 )
2024-04-07 13:18:14 +02:00
Sébastien Helleu
40a68549b5
relay: set default value of undefined remote options to empty string instead of NULL (issue #2066 )
...
This fixes the websocket connection to remote that is not initiated after the
successful handshake with the remote relay/api.
2024-04-07 13:18:14 +02:00
Sébastien Helleu
a499b50b7b
relay: add synchronization with remote and handler for events received (issue #2066 )
2024-04-07 13:18:14 +02:00
Sébastien Helleu
b6647004a5
relay: do not share content of any relay buffer in api and weechat protocols (issue #2066 )
...
This is to prevent infinite loop when connected to a remote which is the
weechat instance itself.
2024-04-07 13:18:14 +02:00
Sébastien Helleu
3cce916035
relay/api: add fields "displayed" and "notify_level" in lines returned (issue #2066 )
2024-04-07 13:18:13 +02:00
Sébastien Helleu
64db1b958d
relay/api: replace direct access to JSON number value by call to function cJSON_GetNumberValue() (issue #2066 )
2024-04-07 13:18:13 +02:00
Sébastien Helleu
cb785d5035
relay/api: add "request" and "request_body" in response when connected via websocket (issue #2066 )
2024-04-07 13:18:13 +02:00
Sébastien Helleu
9d7e887d8e
relay/api: add "body_type" in response when a body is set and connected via websocket (issue #2066 )
2024-04-07 13:18:13 +02:00
Sébastien Helleu
643adecff5
relay: add option send in command /remote (issue #2066 )
...
This can be used to send raw JSON data encapsulated in a websocket frame to the
remote.
Example: /remote send test {"request":"GET /api/version"}
2024-04-07 13:18:13 +02:00
Sébastien Helleu
4460f92727
relay: stop URL address before the first question mark if colon is not found (issue #2066 )
2024-04-07 13:18:13 +02:00
Sébastien Helleu
a3f3c9d09c
relay: check that parameter ws_deflate is not NULL in function relay_websocket_deflate_free (issue #2066 )
2024-04-07 13:18:13 +02:00
Sébastien Helleu
90b855e1aa
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.
2024-04-07 13:18:13 +02:00
Sébastien Helleu
fd32192464
relay: add option disconnect in command /remote (issue #2066 )
2024-04-07 13:18:10 +02:00
Sébastien Helleu
c2343ecb74
relay: add functions to parse HTTP response (issue #2066 )
2024-04-07 13:16:50 +02:00
Sébastien Helleu
c4c220f0a3
relay: add proxy option in remote (issue #2066 )
2024-04-07 13:16:50 +02:00
Sébastien Helleu
3f993f9422
relay/api: fix style (issue #2066 )
2024-04-07 13:16:50 +02:00
Sébastien Helleu
786f889251
relay: add command /remote, add remote configuration in relay.conf (issue #2066 )
2024-04-07 13:16:47 +02:00
Sébastien Helleu
965beb37de
core: fix print of pointer values
2024-04-01 21:08:52 +02:00
Sébastien Helleu
1fb6fda89b
relay: rename function relay_api_search_buffer_id_name to relay_api_protocol_search_buffer_id_name
2024-03-29 13:02:45 +01:00
Sébastien Helleu
acef7dd317
relay: move assignment after comment with important note
2024-03-26 21:22:55 +01:00
Sébastien Helleu
3d8607673e
relay: fix typo in comment
2024-03-26 21:22:15 +01:00
Sébastien Helleu
5a3dff1b97
relay: fix typo in comment
2024-03-26 20:23:10 +01:00
Sébastien Helleu
fd06c67b58
relay: add size for array relay_auth_password_hash_algo_name
2024-03-26 10:40:38 +01:00
Sébastien Helleu
2f5936bc9f
relay: set the last IRC client disconnection time only after a successful connection ( closes #2103 )
2024-03-26 08:04:49 +01:00
Sébastien Helleu
34a72ac02e
relay/api: add GET /api/hotlist
2024-03-17 20:13:19 +01:00
Sébastien Helleu
bb346f8c6c
relay/api: replace "context" by "buffer_id" (issue #2081 )
2024-03-12 20:37:52 +01:00
Sébastien Helleu
48ca390f79
relay/api: add support of buffer id in POST /api/input (issue #2081 )
2024-03-12 20:37:51 +01:00
Sébastien Helleu
aa989767a1
relay/api: add support of buffer id in GET /api/buffers (issue #2081 )
2024-03-12 20:37:50 +01:00
Sébastien Helleu
e791535773
relay: add a fake send function in client
...
This will be used in unit tests to get the data that is sent to clients.
2024-03-12 20:37:48 +01:00
Sébastien Helleu
0ac377d306
relay/api: add a global variable to customize the command delay in POST /api/input
...
The user can not change this, the variable will be set to 0 in unit tests to
execute the command immediately.
2024-03-12 20:37:48 +01:00
Sébastien Helleu
59c977ddc9
relay/api: check that "request" field is a string in JSON received (websocket connection)
2024-03-12 20:37:48 +01:00
Sébastien Helleu
4f9bcc73ca
relay/api: allow POST /api/handshake without a body
2024-03-12 20:37:48 +01:00