Commit Graph

77 Commits (fb6fc22c747ae807256b2de7cd7e5c7d5e82ac75)

Author SHA1 Message Date
Sébastien Helleu fb6fc22c74 relay: add a function to send outqueue to the client 2020-04-12 19:25:21 +02:00
Sébastien Helleu 7ddc815726 relay: actually use the client status "waiting_auth" in irc and weechat protocols (closes #1358)
Now the status "waiting_auth" is used and displayed in the relay buffer.

When a client connects, there are now 2 messages (except for irc protocol if
there's no password required):

relay: new client on port 9000: 1/weechat/1.2.3.4 (waiting auth)
relay: client 1/weechat/1.2.3.4 authenticated

If the authentication fails, the messages are:

relay: new client on port 9000: 1/weechat/1.2.3.4 (waiting auth)
=!= relay: authentication failed with client 1/weechat/1.2.3.4
2020-04-12 17:46:46 +02:00
Sébastien Helleu feb6258910 core: update copyright dates 2020-01-04 10:41:26 +01:00
Sébastien Helleu 9178156354 api: add argument "strip_items" in function string_split 2019-06-15 20:47:14 +02:00
Sébastien Helleu ec5aca81e7 relay: set address to "local" if not known 2019-05-13 21:57:23 +02:00
Sébastien Helleu c1af2702b8 relay: improve message displayed on a new client 2019-05-12 21:39:22 +02:00
Ryan Farley ffefd1b785 relay: add UNIX socket support (closes #733) 2019-05-12 18:51:13 +02:00
Sébastien Helleu 2b70d71aa1 core: replace argument "keep_eol" by "flags" in function string_split (closes #1322) 2019-03-10 18:29:16 +01:00
Sébastien Helleu c869aa3809 relay: fix crash on /upgrade when the real IP is not set (closes #1294) 2019-01-28 20:37:38 +01:00
Sébastien Helleu 2b0057239b core: update copyright dates 2019-01-01 15:40:51 +01:00
Sébastien Helleu 4712d0bb06 core: use https for links to GNU GPL license 2018-11-29 23:16:07 +01:00
Sébastien Helleu de8d640958 relay: add support of close frame in websocket connection (closes #1281) 2018-11-12 20:43:48 +01:00
Sébastien Helleu 4b58ea37c0 relay: remove useless test on num_sent 2018-10-01 22:58:25 +02:00
Sébastien Helleu e28cb00106 relay: add real IP in client description (closes #1256) 2018-09-30 09:59:45 +02:00
Sébastien Helleu ed4837b2f6 core: update copyright dates 2018-01-05 00:54:18 +01:00
Sébastien Helleu aeeec38d6f core: fix cast of time_t (to "long long" instead of "long") (closes #1051) 2017-08-12 18:36:45 +02:00
Sébastien Helleu 54bf589d7d core, plugins: fix conditions to insert elements in linked lists
This removes scan-build warnings about dereference of last_xxx null pointers.
2017-06-10 16:21:11 +02:00
Sébastien Helleu 9e0d103ff7 relay: check that pointers received in arguments are not NULL in "free" functions
Functions:
- relay_irc_free
- relay_client_outqueue_free
- relay_raw_message_free
- relay_weechat_msg_free
- relay_weechat_nicklist_item_free
- relay_weechat_nicklist_free
- relay_weechat_free
2017-03-25 14:07:46 +01:00
Sébastien Helleu b547bf6bbb relay: make HTTP headers case-insensitive for WebSocket connections (closes #888) 2017-01-11 07:11:01 +01:00
Sébastien Helleu 705d86e684 core: update copyright dates 2017-01-01 11:32:04 +01:00
Sébastien Helleu 20c86db0d8 api: remove functions printf_date() and printf_tags() 2016-06-18 08:49:35 +02:00
Sébastien Helleu cf6aca1619 core: add pointer in some callbacks (closes #406)
This pointer is the first argument received by callbacks, and the
existing argument "data" is now automatically freed by WeeChat when the
object containing the callback is removed.

With this new pointer, the linked list of callbacks in scripts has been
removed. This will improve speed of scripts (using a lot of hooks),
reduce memory used by scripts and reduce time to unload scripts.

Following functions are affected in the C API:

* exec_on_files
* config_new
* config_new_section
* config_new_option
* hook_command
* hook_command_run
* hook_timer
* hook_fd
* hook_process
* hook_process_hashtable
* hook_connect
* hook_print
* hook_signal
* hook_hsignal
* hook_config
* hook_completion
* hook_modifier
* hook_info
* hook_info_hashtable
* hook_infolist
* hook_hdata
* hook_focus
* unhook_all_plugin
* buffer_new
* bar_item_new
* upgrade_new
* upgrade_read
2016-03-21 18:11:21 +01:00
Sébastien Helleu 45a1174000 relay: fix the max number of clients connected on a port, allow value 0 for "no limit" (closes #669) 2016-02-08 21:14:48 +01:00
Sébastien Helleu c8f7ac8941 relay: do not print final '\0' in raw message for a websocket PING message received 2016-02-06 14:37:07 +01:00
Sébastien Helleu 9263634d2e relay: fix websocket frame decoding, answer a PONG to PING (closes #675) 2016-02-06 14:08:20 +01:00
Sébastien Helleu fee26b9c54 relay: fix comment 2016-02-04 20:40:37 +01:00
Sébastien Helleu 02bcee02e9 relay: fix typo in a comment 2016-02-02 07:00:40 +01:00
Sébastien Helleu 3330724574 core: update copyright dates 2016-01-01 11:09:53 +01:00
Sébastien Helleu 2a96bc67b0 relay: remove useless condition always evaluated to true 2015-09-13 07:53:54 +02:00
Sébastien Helleu e5d9e977e4 relay: add a variable to read only one time the HTTP header "X-Real-IP" in the hashtable 2015-06-13 07:39:21 +02:00
Tor Hveem fc8f7b49dd relay: print value of HTTP Header X-Real-IP
When relay plugin gets a new successfull handshake for a relay
connection using websocket it will look for HTTP header X-Real-IP which
is commonly used when proxying connections. This allows users of WeeChat
and proxy to see the client's real IP address instead of the address of
the HTTP proxy.
2015-06-11 16:50:19 +02:00
Sébastien Helleu 71dd64678c core: add comments after some #endif 2015-04-30 21:15:30 +02:00
Sébastien Helleu b0117f0d18 core: add gnutls version in #if compiler directives 2015-01-21 07:50:54 +01:00
Sébastien Helleu a020c28ea6 core: update copyright dates 2015-01-01 09:23:23 +01:00
Sébastien Helleu 134a5f53d4 relay: add option relay.network.ssl_priorities (closes #234) 2014-10-26 18:03:47 +01:00
Sébastien Helleu c99df96ebd relay: fix send of signals "relay_client_xxx" (closes #214)
The signals about relay client status changes were sent only when the client
has ended. Now it is went on any status change.
2014-09-26 04:09:25 +02:00
Sébastien Helleu 7a76a959ec relay: fix memory leak when receiving several lines from client (weechat protocol) 2014-08-09 17:40:18 +02:00
Sébastien Helleu 6295adad6d relay: fix number of bytes sent/received on 32-bit systems 2014-08-02 16:17:30 +02:00
Sébastien Helleu a81f79e669 relay: reformat comment 2014-05-08 11:31:03 +02:00
Tor Hveem 9e282febfd relay: fix disconnection of client on empty websocket frames
WeeChat disconnects any client when a frame with length 0 is recieved.
2014-05-08 11:30:36 +02:00
Sebastien Helleu 2d7778292a relay: add info "relay_client_count" with optional status name as argument
Use in evaluated strings (for example in /eval or triggers):
- "${info:relay_client_count}": total number of relay clients (any status)

With a specific status:
- "${info:relay_client_count,connecting}"
- "${info:relay_client_count,waiting_auth}"
- "${info:relay_client_count,connected}"
- "${info:relay_client_count,auth_failed}"
- "${info:relay_client_count,disconnected}"
2014-03-05 11:49:25 +01:00
Sebastien Helleu 0995eb334f relay: add signals "relay_client_xxx" for client status changes (closes #2)
New signals:
- relay_client_connecting
- relay_client_waiting_auth
- relay_client_connected
- relay_client_auth_failed
- relay_client_disconnected
2014-03-05 11:43:32 +01:00
Sebastien Helleu fdfee08cf8 relay: add option relay.network.clients_purge_delay 2014-02-23 20:32:42 +01:00
Sebastien Helleu 60456c31e9 relay: remove dead assignment in function relay_client_recv_cb 2014-02-22 15:13:26 +01:00
Sebastien Helleu 892aa79fb5 core: update copyright dates 2014-01-01 00:14:12 +01:00
Sebastien Helleu 149c77decd core: fix typos in many comments and some strings 2013-03-17 12:55:20 +01:00
Sebastien Helleu f7811b0ae2 relay: fix crash when decoding a websocket frame 2013-02-12 14:14:40 +01:00
Sebastien Helleu c2aeb69c46 relay: add experimental websocket server support (RFC 6455) for irc and weechat protocols, new option relay.network.websocket_allowed_origins
It is a partial implementation of RFC 6455: fragmentation and control frames are
not yet supported.
Text and binary frames are supported.
2013-02-10 20:22:13 +01:00
Sebastien Helleu f97598b4aa core: update copyright dates 2013-01-01 13:12:49 +01:00
Sebastien Helleu cf76379aa9 relay: add backlog, options and server capability "server-time" for irc protocol (task #12076)
New options:
- relay.irc.backlog_max_minutes
- relay.irc.backlog_max_number
- relay.irc.backlog_since_last_disconnect
- relay.irc.backlog_tags
- relay.irc.backlog_time_format
2012-12-24 17:31:33 +01:00