1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 19:23:13 +02:00

Add support for more than one proxy, with proxy selection for each IRC server (task #6859)

This commit is contained in:
Sebastien Helleu
2008-11-23 23:04:52 +01:00
parent 09bed16dbd
commit 2e52e54a3a
52 changed files with 2498 additions and 704 deletions
+15 -10
View File
@@ -342,6 +342,7 @@ struct t_weechat_plugin
int (*callback)(void *data),
void *callback_data);
struct t_hook *(*hook_connect) (struct t_weechat_plugin *plugin,
const char *proxy,
const char *address,
int port,
int sock,
@@ -518,8 +519,10 @@ struct t_weechat_plugin
struct t_gui_buffer *buffer, const char *command);
/* network */
int (*network_pass_proxy) (int sock, const char *address, int port);
int (*network_connect_to) (int sock, unsigned long address, int port);
int (*network_pass_proxy) (const char *proxy, int sock,
const char *address, int port);
int (*network_connect_to) (const char *proxy, int sock,
unsigned long address, int port);
/* infos */
const char *(*info_get) (struct t_weechat_plugin *plugin,
@@ -870,11 +873,11 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
weechat_plugin->hook_fd(weechat_plugin, __fd, __flag_read, \
__flag_write, __flag_exception, __callback, \
__data)
#define weechat_hook_connect(__address, __port, __sock, __ipv6, \
__gnutls_sess, __local_hostname, \
#define weechat_hook_connect(__proxy, __address, __port, __sock, \
__ipv6, __gnutls_sess, __local_hostname, \
__callback, __data) \
weechat_plugin->hook_connect(weechat_plugin, __address, __port, \
__sock, __ipv6, __gnutls_sess, \
weechat_plugin->hook_connect(weechat_plugin, __proxy, __address, \
__port, __sock, __ipv6, __gnutls_sess, \
__local_hostname, __callback, __data)
#define weechat_hook_print(__buffer, __tags, __msg, __strip__colors, \
__callback, __data) \
@@ -1014,10 +1017,12 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
weechat_plugin->command(weechat_plugin, __buffer, __command)
/* network */
#define weechat_network_pass_proxy(__sock, __address, __port) \
weechat_plugin->network_pass_proxy(__sock, __address, __port)
#define weechat_network_connect_to(__sock, __address, __port) \
weechat_plugin->network_connect_to(__sock, __address, __port)
#define weechat_network_pass_proxy(__proxy, __sock, __address, __port) \
weechat_plugin->network_pass_proxy(__proxy, __sock, __address, \
__port)
#define weechat_network_connect_to(__proxy, __sock, __address, __port) \
weechat_plugin->network_connect_to(__proxy, __sock, __address, \
__port)
/* infos */
#define weechat_info_get(__info_name, __arguments) \