mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 02:03:13 +02:00
Add new option relay.network.bind_address
This commit is contained in:
@@ -48,6 +48,11 @@
|
||||
** Typ: integer
|
||||
** Werte: 0 .. 65535 (Standardwert: 256)
|
||||
|
||||
* *relay.network.bind_address*
|
||||
** Beschreibung: address for bind (if empty, connection is possible on all interfaces, use "127.0.0.1" to allow connections from local machine only)
|
||||
** Typ: Zeichenkette
|
||||
** Werte: beliebige Zeichenkette (Standardwert: "")
|
||||
|
||||
* *relay.network.max_clients*
|
||||
** Beschreibung: Maximale Anzahl an Clients die mit einem Port verbunden sein dürfen
|
||||
** Typ: integer
|
||||
|
||||
@@ -48,6 +48,11 @@
|
||||
** type: integer
|
||||
** values: 0 .. 65535 (default value: 256)
|
||||
|
||||
* *relay.network.bind_address*
|
||||
** description: address for bind (if empty, connection is possible on all interfaces, use "127.0.0.1" to allow connections from local machine only)
|
||||
** type: string
|
||||
** values: any string (default value: "")
|
||||
|
||||
* *relay.network.max_clients*
|
||||
** description: maximum number of clients connecting to a port
|
||||
** type: integer
|
||||
|
||||
@@ -48,6 +48,11 @@
|
||||
** type: entier
|
||||
** valeurs: 0 .. 65535 (valeur par défaut: 256)
|
||||
|
||||
* *relay.network.bind_address*
|
||||
** description: addresse pour le bind (si vide, la connexion est possible sur toutes les interfaces, utiliser "127.0.0.1" pour autoriser les connections depuis la machine locale seulement)
|
||||
** type: chaîne
|
||||
** valeurs: toute chaîne (valeur par défaut: "")
|
||||
|
||||
* *relay.network.max_clients*
|
||||
** description: nombre maximum de clients qui se connectent sur un port
|
||||
** type: entier
|
||||
|
||||
@@ -48,6 +48,11 @@
|
||||
** tipo: intero
|
||||
** valori: 0 .. 65535 (valore predefinito: 256)
|
||||
|
||||
* *relay.network.bind_address*
|
||||
** descrizione: address for bind (if empty, connection is possible on all interfaces, use "127.0.0.1" to allow connections from local machine only)
|
||||
** tipo: stringa
|
||||
** valori: qualsiasi stringa (valore predefinito: "")
|
||||
|
||||
* *relay.network.max_clients*
|
||||
** descrizione: numero massimo di client connessi ad una porta
|
||||
** tipo: intero
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.4-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-17 16:39+0200\n"
|
||||
"POT-Creation-Date: 2010-09-17 20:12+0200\n"
|
||||
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
|
||||
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -6078,6 +6078,11 @@ msgstr "barva textu pro status \"autentizace selhala\""
|
||||
msgid "text color for \"disconnected\" status"
|
||||
msgstr "barva textu pro status \"odpojen\""
|
||||
|
||||
msgid ""
|
||||
"address for bind (if empty, connection is possible on all interfaces, use "
|
||||
"\"127.0.0.1\" to allow connections from local machine only)"
|
||||
msgstr ""
|
||||
|
||||
msgid "maximum number of clients connecting to a port"
|
||||
msgstr "maximální počet klientů připojených k portu"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.3-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-17 16:39+0200\n"
|
||||
"POT-Creation-Date: 2010-09-17 20:12+0200\n"
|
||||
"PO-Revision-Date: 2010-09-08 22:15+0200\n"
|
||||
"Last-Translator: Nils G.\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -6313,6 +6313,11 @@ msgstr "Textfarbe für Status: \"Authentifizierung gescheitert\""
|
||||
msgid "text color for \"disconnected\" status"
|
||||
msgstr "Textfarbe für Status: \"Verbindung getrennt\""
|
||||
|
||||
msgid ""
|
||||
"address for bind (if empty, connection is possible on all interfaces, use "
|
||||
"\"127.0.0.1\" to allow connections from local machine only)"
|
||||
msgstr ""
|
||||
|
||||
msgid "maximum number of clients connecting to a port"
|
||||
msgstr "Maximale Anzahl an Clients die mit einem Port verbunden sein dürfen"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.4-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-17 16:39+0200\n"
|
||||
"POT-Creation-Date: 2010-09-17 20:12+0200\n"
|
||||
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
|
||||
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -6159,6 +6159,11 @@ msgstr "color para el estado \"falló la autenticación\""
|
||||
msgid "text color for \"disconnected\" status"
|
||||
msgstr "color para el estado \"desconectado\""
|
||||
|
||||
msgid ""
|
||||
"address for bind (if empty, connection is possible on all interfaces, use "
|
||||
"\"127.0.0.1\" to allow connections from local machine only)"
|
||||
msgstr ""
|
||||
|
||||
msgid "maximum number of clients connecting to a port"
|
||||
msgstr "número máximo de clientes conectados a un puerto"
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.4-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-17 16:39+0200\n"
|
||||
"PO-Revision-Date: 2010-09-17 16:39+0200\n"
|
||||
"POT-Creation-Date: 2010-09-17 20:12+0200\n"
|
||||
"PO-Revision-Date: 2010-09-17 20:13+0200\n"
|
||||
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: French\n"
|
||||
@@ -6200,6 +6200,14 @@ msgstr "couleur du texte pour le statut \"échec auth\""
|
||||
msgid "text color for \"disconnected\" status"
|
||||
msgstr "couleur du texte pour le statut \"déconnecté\""
|
||||
|
||||
msgid ""
|
||||
"address for bind (if empty, connection is possible on all interfaces, use "
|
||||
"\"127.0.0.1\" to allow connections from local machine only)"
|
||||
msgstr ""
|
||||
"addresse pour le bind (si vide, la connexion est possible sur toutes les "
|
||||
"interfaces, utiliser \"127.0.0.1\" pour autoriser les connections depuis la "
|
||||
"machine locale seulement)"
|
||||
|
||||
msgid "maximum number of clients connecting to a port"
|
||||
msgstr "nombre maximum de clients qui se connectent sur un port"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.4-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-17 16:39+0200\n"
|
||||
"POT-Creation-Date: 2010-09-17 20:12+0200\n"
|
||||
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -5818,6 +5818,11 @@ msgstr "\"failed\" dcc státusz színe"
|
||||
msgid "text color for \"disconnected\" status"
|
||||
msgstr "\"connecting\" dcc státusz színe"
|
||||
|
||||
msgid ""
|
||||
"address for bind (if empty, connection is possible on all interfaces, use "
|
||||
"\"127.0.0.1\" to allow connections from local machine only)"
|
||||
msgstr ""
|
||||
|
||||
msgid "maximum number of clients connecting to a port"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.4-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-17 16:39+0200\n"
|
||||
"POT-Creation-Date: 2010-09-17 20:12+0200\n"
|
||||
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
|
||||
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -6159,6 +6159,11 @@ msgstr "colore del testo per lo status \"autenticazione fallita\""
|
||||
msgid "text color for \"disconnected\" status"
|
||||
msgstr "colore del testo per lo status \"disconnesso\""
|
||||
|
||||
msgid ""
|
||||
"address for bind (if empty, connection is possible on all interfaces, use "
|
||||
"\"127.0.0.1\" to allow connections from local machine only)"
|
||||
msgstr ""
|
||||
|
||||
msgid "maximum number of clients connecting to a port"
|
||||
msgstr "numero massimo di client connessi ad una porta"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.4-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-17 16:39+0200\n"
|
||||
"POT-Creation-Date: 2010-09-17 20:12+0200\n"
|
||||
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
|
||||
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -6102,6 +6102,11 @@ msgstr "kolor statusu \"authentication failed\""
|
||||
msgid "text color for \"disconnected\" status"
|
||||
msgstr "kolor statusu \"disconnected\" "
|
||||
|
||||
msgid ""
|
||||
"address for bind (if empty, connection is possible on all interfaces, use "
|
||||
"\"127.0.0.1\" to allow connections from local machine only)"
|
||||
msgstr ""
|
||||
|
||||
msgid "maximum number of clients connecting to a port"
|
||||
msgstr "maksymalna ilość klientów łączących się na port"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.4-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-17 16:39+0200\n"
|
||||
"POT-Creation-Date: 2010-09-17 20:12+0200\n"
|
||||
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
|
||||
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -5827,6 +5827,11 @@ msgstr "цвет \"неудачных\" в окне DCC"
|
||||
msgid "text color for \"disconnected\" status"
|
||||
msgstr "цвет \"соединения\" в окне DCC"
|
||||
|
||||
msgid ""
|
||||
"address for bind (if empty, connection is possible on all interfaces, use "
|
||||
"\"127.0.0.1\" to allow connections from local machine only)"
|
||||
msgstr ""
|
||||
|
||||
msgid "maximum number of clients connecting to a port"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+6
-1
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2010-09-17 16:39+0200\n"
|
||||
"POT-Creation-Date: 2010-09-17 20:12+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -5064,6 +5064,11 @@ msgstr ""
|
||||
msgid "text color for \"disconnected\" status"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"address for bind (if empty, connection is possible on all interfaces, use "
|
||||
"\"127.0.0.1\" to allow connections from local machine only)"
|
||||
msgstr ""
|
||||
|
||||
msgid "maximum number of clients connecting to a port"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ struct t_config_option *relay_config_color_status[RELAY_NUM_STATUS];
|
||||
|
||||
/* relay config, network section */
|
||||
|
||||
struct t_config_option *relay_config_network_bind_address;
|
||||
struct t_config_option *relay_config_network_max_clients;
|
||||
struct t_config_option *relay_config_network_password;
|
||||
|
||||
@@ -69,6 +70,29 @@ relay_config_refresh_cb (void *data, struct t_config_option *option)
|
||||
relay_buffer_refresh (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* relay_config_change_network_bind_address_cb: callback called when user changes
|
||||
* network bind address option
|
||||
*/
|
||||
|
||||
void
|
||||
relay_config_change_network_bind_address_cb (void *data,
|
||||
struct t_config_option *option)
|
||||
{
|
||||
struct t_relay_server *ptr_server;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
for (ptr_server = relay_servers; ptr_server;
|
||||
ptr_server = ptr_server->next_server)
|
||||
{
|
||||
relay_server_close_socket (ptr_server);
|
||||
relay_server_create_socket (ptr_server);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* relay_config_change_port_cb: callback called when relay port option is
|
||||
* modified
|
||||
@@ -336,7 +360,15 @@ relay_config_init ()
|
||||
weechat_config_free (relay_config_file);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
relay_config_network_bind_address = weechat_config_new_option (
|
||||
relay_config_file, ptr_section,
|
||||
"bind_address", "string",
|
||||
N_("address for bind (if empty, connection is possible on all "
|
||||
"interfaces, use \"127.0.0.1\" to allow connections from "
|
||||
"local machine only)"),
|
||||
NULL, 0, 0, "", NULL, 0, NULL, NULL,
|
||||
&relay_config_change_network_bind_address_cb, NULL, NULL, NULL);
|
||||
relay_config_network_max_clients = weechat_config_new_option (
|
||||
relay_config_file, ptr_section,
|
||||
"max_clients", "integer",
|
||||
|
||||
@@ -33,6 +33,7 @@ extern struct t_config_option *relay_config_color_text_bg;
|
||||
extern struct t_config_option *relay_config_color_text_selected;
|
||||
extern struct t_config_option *relay_config_color_status[];
|
||||
|
||||
extern struct t_config_option *relay_config_network_bind_address;
|
||||
extern struct t_config_option *relay_config_network_max_clients;
|
||||
extern struct t_config_option *relay_config_network_password;
|
||||
|
||||
|
||||
@@ -248,7 +248,15 @@ relay_server_create_socket (struct t_relay_server *server)
|
||||
|
||||
memset(&server_addr, 0, sizeof(struct sockaddr_in));
|
||||
server_addr.sin_family = AF_INET;
|
||||
server_addr.sin_addr.s_addr = INADDR_ANY;
|
||||
if (weechat_config_string (relay_config_network_bind_address)
|
||||
&& weechat_config_string (relay_config_network_bind_address)[0])
|
||||
{
|
||||
server_addr.sin_addr.s_addr = inet_addr (weechat_config_string (relay_config_network_bind_address));
|
||||
}
|
||||
else
|
||||
{
|
||||
server_addr.sin_addr.s_addr = INADDR_ANY;
|
||||
}
|
||||
server_addr.sin_port = htons (server->port);
|
||||
|
||||
if (bind (server->sock, (struct sockaddr *) &server_addr,
|
||||
|
||||
@@ -41,6 +41,8 @@ extern void relay_server_get_protocol_string (const char *protocol_and_string,
|
||||
char **protocol_string);
|
||||
extern struct t_relay_server *relay_server_search (const char *protocol_and_string);
|
||||
extern struct t_relay_server *relay_server_search_port (int port);
|
||||
extern void relay_server_close_socket (struct t_relay_server *server);
|
||||
extern int relay_server_create_socket (struct t_relay_server *server);
|
||||
extern struct t_relay_server *relay_server_new (enum t_relay_protocol protocol,
|
||||
const char *protocol_string,
|
||||
int port);
|
||||
|
||||
Reference in New Issue
Block a user