mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
Kill legacy proxy support.
This commit is contained in:
parent
1c6695107c
commit
d6b0dd2b32
27
configure.ac
27
configure.ac
@ -25,15 +25,6 @@ AC_CHECK_HEADERS(sys/socket.h sys/time.h sys/utsname.h regex.h)
|
||||
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
AC_ARG_WITH(socks,
|
||||
[ --with-socks Build with socks support],
|
||||
if test x$withval = xno; then
|
||||
want_socks=no
|
||||
else
|
||||
want_socks=yes
|
||||
fi,
|
||||
want_socks=no)
|
||||
|
||||
AC_ARG_WITH(textui,
|
||||
[ --without-textui Build without text frontend],
|
||||
if test x$withval = xno; then
|
||||
@ -202,24 +193,6 @@ else
|
||||
AC_ERROR([Couldn't find integer type for off_t])
|
||||
fi
|
||||
|
||||
dnl **
|
||||
dnl ** check for socks
|
||||
dnl **
|
||||
|
||||
if test "x$want_socks" = "xyes"; then
|
||||
AC_CHECK_LIB(socks, connect, [
|
||||
AC_DEFINE(HAVE_SOCKS,, Build with socks support)
|
||||
LIBS="$LIBS -lsocks"
|
||||
AC_CHECK_HEADER(socks.h, [
|
||||
AC_DEFINE(HAVE_SOCKS_H)
|
||||
CFLAGS="$CFLAGS -DSOCKS"
|
||||
AC_MSG_RESULT(["socks5 library found, building with it"])
|
||||
], [
|
||||
AC_MSG_RESULT(["socks4 library found, building with it"])
|
||||
CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dgetpeername=Rgetpeername -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
|
||||
])
|
||||
])
|
||||
fi
|
||||
|
||||
dnl **
|
||||
dnl ** OpenSSL checks
|
||||
|
@ -17,7 +17,6 @@
|
||||
-tls_ciphers: TLS cipher suite preference lists.
|
||||
-tls_pinned_cert: Pinned x509 certificate fingerprint.
|
||||
-tls_pinned_pubkey: Pinned public key fingerprint.
|
||||
-noproxy: Ignores the global proxy configuration.
|
||||
-network: The network this connection belongs to.
|
||||
-host: The hostname you would like to connect from.
|
||||
-rawlog: Immediately open rawlog after connecting.
|
||||
|
@ -36,7 +36,6 @@
|
||||
-cmdmax: Specifies the maximum number of commands to perform
|
||||
before starting the internal flood protection.
|
||||
-port: Specifies the port to connect to the server.
|
||||
-noproxy: Ignores the global proxy configuration.
|
||||
-rawlog: Immediately open rawlog after connecting.
|
||||
-noautosendcmd: Doesn't execute autosendcmd.
|
||||
|
||||
@ -64,7 +63,7 @@
|
||||
/SERVER CONNECT chat.freenode.net
|
||||
/SERVER CONNECT +chat.freenode.net
|
||||
/SERVER ADD -network Freenode -noautosendcmd orwell.freenode.net
|
||||
/SERVER ADD -! -auto -host staff.irssi.org -port 6667 -4 -network Freenode -noproxy orwell.freenode.net
|
||||
/SERVER ADD -! -auto -host staff.irssi.org -port 6667 -4 -network Freenode orwell.freenode.net
|
||||
/SERVER MODIFY -network Freenode -noauto orwell.freenode.net
|
||||
/SERVER REMOVE orwell.freenode.net 6667 Freenode
|
||||
/SERVER PURGE
|
||||
|
@ -131,10 +131,6 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr,
|
||||
if (g_hash_table_lookup(optlist, "noautosendcmd") != NULL)
|
||||
conn->no_autosendcmd = TRUE;
|
||||
|
||||
if (g_hash_table_lookup(optlist, "noproxy") != NULL)
|
||||
g_free_and_null(conn->proxy);
|
||||
|
||||
|
||||
*rawlog_file = g_strdup(g_hash_table_lookup(optlist, "rawlog"));
|
||||
|
||||
host = g_hash_table_lookup(optlist, "host");
|
||||
@ -153,7 +149,7 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr,
|
||||
[-ssl_verify] [-ssl_cafile <cafile>] [-ssl_capath <capath>]
|
||||
[-ssl_ciphers <list>]
|
||||
[-!] [-noautosendcmd]
|
||||
[-noproxy] [-network <network>] [-host <hostname>]
|
||||
[-network <network>] [-host <hostname>]
|
||||
[-rawlog <file>]
|
||||
<address>|<chatnet> [<port> [<password> [<nick>]]] */
|
||||
/* NOTE: -network replaces the old -ircnet flag. */
|
||||
@ -260,7 +256,7 @@ static void sig_default_command_server(const char *data, SERVER_REC *server,
|
||||
[-ssl_verify] [-ssl_cafile <cafile>] [-ssl_capath <capath>]
|
||||
[-ssl_ciphers <list>]
|
||||
[-!] [-noautosendcmd]
|
||||
[-noproxy] [-network <network>] [-host <hostname>]
|
||||
[-network <network>] [-host <hostname>]
|
||||
[-rawlog <file>]
|
||||
[+]<address>|<chatnet> [<port> [<password> [<nick>]]] */
|
||||
/* NOTE: -network replaces the old -ircnet flag. */
|
||||
@ -498,7 +494,7 @@ void chat_commands_init(void)
|
||||
signal_add("default command server", (SIGNAL_FUNC) sig_default_command_server);
|
||||
signal_add("server sendmsg", (SIGNAL_FUNC) sig_server_sendmsg);
|
||||
|
||||
command_set_options("connect", "4 6 !! -network ssl +ssl_cert +ssl_pkey +ssl_pass ssl_verify +ssl_cafile +ssl_capath +ssl_ciphers +ssl_pinned_cert +ssl_pinned_pubkey tls +tls_cert +tls_pkey +tls_pass tls_verify +tls_cafile +tls_capath +tls_ciphers +tls_pinned_cert +tls_pinned_pubkey +host noproxy -rawlog noautosendcmd");
|
||||
command_set_options("connect", "4 6 !! -network ssl +ssl_cert +ssl_pkey +ssl_pass ssl_verify +ssl_cafile +ssl_capath +ssl_ciphers +ssl_pinned_cert +ssl_pinned_pubkey tls +tls_cert +tls_pkey +tls_pass tls_verify +tls_cafile +tls_capath +tls_ciphers +tls_pinned_cert +tls_pinned_pubkey +host -rawlog noautosendcmd");
|
||||
command_set_options("msg", "channel nick");
|
||||
}
|
||||
|
||||
|
@ -5,11 +5,6 @@ int chat_type; /* chat_protocol_lookup(xx) */
|
||||
|
||||
int refcount;
|
||||
|
||||
/* if we're connecting via proxy, or just NULLs */
|
||||
char *proxy;
|
||||
int proxy_port;
|
||||
char *proxy_string, *proxy_string_after, *proxy_password;
|
||||
|
||||
unsigned short family; /* 0 = don't care, AF_INET or AF_INET6 */
|
||||
char *tag; /* try to keep this tag when connected to server */
|
||||
char *address;
|
||||
|
@ -26,7 +26,6 @@ IPADDR *own_ip4, *own_ip6; /* resolved own_address if not NULL */
|
||||
time_t last_connect; /* to avoid reconnecting too fast.. */
|
||||
|
||||
unsigned int autoconnect:1;
|
||||
unsigned int no_proxy:1;
|
||||
unsigned int last_failed:1; /* if last connection attempt failed */
|
||||
unsigned int banned:1; /* if we're banned from this server */
|
||||
unsigned int dns_error:1; /* DNS said the host doesn't exist */
|
||||
|
@ -157,12 +157,6 @@ server_connect_copy_skeleton(SERVER_CONNECT_REC *src, int connect_info)
|
||||
server_connect_ref(dest);
|
||||
dest->type = module_get_uniq_id("SERVER CONNECT", 0);
|
||||
dest->reconnection = src->reconnection;
|
||||
dest->proxy = g_strdup(src->proxy);
|
||||
dest->proxy_port = src->proxy_port;
|
||||
dest->proxy_string = g_strdup(src->proxy_string);
|
||||
dest->proxy_string_after = g_strdup(src->proxy_string_after);
|
||||
dest->proxy_password = g_strdup(src->proxy_password);
|
||||
|
||||
dest->tag = g_strdup(src->tag);
|
||||
|
||||
if (connect_info) {
|
||||
|
@ -129,15 +129,6 @@ static void server_setup_fill(SERVER_CONNECT_REC *conn,
|
||||
conn->username = g_strdup(settings_get_str("user_name"));
|
||||
conn->realname = g_strdup(settings_get_str("real_name"));
|
||||
|
||||
/* proxy settings */
|
||||
if (settings_get_bool("use_proxy")) {
|
||||
conn->proxy = g_strdup(settings_get_str("proxy_address"));
|
||||
conn->proxy_port = settings_get_int("proxy_port");
|
||||
conn->proxy_string = g_strdup(settings_get_str("proxy_string"));
|
||||
conn->proxy_string_after = g_strdup(settings_get_str("proxy_string_after"));
|
||||
conn->proxy_password = g_strdup(settings_get_str("proxy_password"));
|
||||
}
|
||||
|
||||
/* source IP */
|
||||
if (source_host_ip4 != NULL) {
|
||||
conn->own_ip4 = g_new(IPADDR, 1);
|
||||
@ -159,9 +150,6 @@ static void server_setup_fill_server(SERVER_CONNECT_REC *conn,
|
||||
|
||||
sserver->last_connect = time(NULL);
|
||||
|
||||
if (sserver->no_proxy)
|
||||
g_free_and_null(conn->proxy);
|
||||
|
||||
if (sserver->family != 0 && conn->family == 0)
|
||||
conn->family = sserver->family;
|
||||
if (sserver->port > 0 && conn->port <= 0)
|
||||
@ -456,7 +444,6 @@ static SERVER_SETUP_REC *server_setup_read(CONFIG_NODE *node)
|
||||
|
||||
rec->port = port;
|
||||
rec->autoconnect = config_node_get_bool(node, "autoconnect", FALSE);
|
||||
rec->no_proxy = config_node_get_bool(node, "no_proxy", FALSE);
|
||||
rec->own_host = g_strdup(config_node_get_str(node, "own_host", NULL));
|
||||
|
||||
signal_emit("server setup read", 2, rec, node);
|
||||
@ -525,8 +512,6 @@ static void server_setup_save(SERVER_SETUP_REC *rec)
|
||||
|
||||
if (rec->autoconnect)
|
||||
iconfig_node_set_bool(node, "autoconnect", TRUE);
|
||||
if (rec->no_proxy)
|
||||
iconfig_node_set_bool(node, "no_proxy", TRUE);
|
||||
|
||||
signal_emit("server setup saved", 2, rec, node);
|
||||
}
|
||||
@ -640,13 +625,6 @@ void servers_setup_init(void)
|
||||
settings_add_str("server", "user_name", NULL);
|
||||
settings_add_str("server", "real_name", NULL);
|
||||
|
||||
settings_add_bool("proxy", "use_proxy", FALSE);
|
||||
settings_add_str("proxy", "proxy_address", "");
|
||||
settings_add_int("proxy", "proxy_port", 6667);
|
||||
settings_add_str("proxy", "proxy_string", "CONNECT %s %d");
|
||||
settings_add_str("proxy", "proxy_string_after", "");
|
||||
settings_add_str("proxy", "proxy_password", "");
|
||||
|
||||
setupservers = NULL;
|
||||
source_host_ip4 = source_host_ip6 = NULL;
|
||||
old_source_host = NULL;
|
||||
|
@ -217,8 +217,7 @@ static void server_real_connect(SERVER_REC *server, IPADDR *ip,
|
||||
|
||||
if (ip != NULL) {
|
||||
own_ip = IPADDR_IS_V6(ip) ? server->connrec->own_ip6 : server->connrec->own_ip4;
|
||||
port = server->connrec->proxy != NULL ?
|
||||
server->connrec->proxy_port : server->connrec->port;
|
||||
port = server->connrec->port;
|
||||
handle = server->connrec->use_tls ?
|
||||
net_connect_ip_ssl(ip, port, own_ip, server) : net_connect_ip(ip, port, own_ip);
|
||||
} else {
|
||||
@ -414,8 +413,7 @@ int server_start_connect(SERVER_REC *server)
|
||||
server->connect_pipe[0] = g_io_channel_new(fd[0]);
|
||||
server->connect_pipe[1] = g_io_channel_new(fd[1]);
|
||||
|
||||
connect_address = server->connrec->proxy != NULL ?
|
||||
server->connrec->proxy : server->connrec->address;
|
||||
connect_address = server->connrec->address;
|
||||
server->connect_pid =
|
||||
net_gethostbyname_nonblock(connect_address,
|
||||
server->connect_pipe[1],
|
||||
@ -610,11 +608,6 @@ void server_connect_unref(SERVER_CONNECT_REC *conn)
|
||||
if (conn->connect_handle != NULL)
|
||||
net_disconnect(conn->connect_handle);
|
||||
|
||||
g_free_not_null(conn->proxy);
|
||||
g_free_not_null(conn->proxy_string);
|
||||
g_free_not_null(conn->proxy_string_after);
|
||||
g_free_not_null(conn->proxy_password);
|
||||
|
||||
g_free_not_null(conn->tag);
|
||||
g_free_not_null(conn->address);
|
||||
g_free_not_null(conn->chatnet);
|
||||
|
@ -217,8 +217,6 @@ static void cmd_server_add_modify(const char *data, gboolean add)
|
||||
|
||||
if (g_hash_table_lookup(optlist, "auto")) rec->autoconnect = TRUE;
|
||||
if (g_hash_table_lookup(optlist, "noauto")) rec->autoconnect = FALSE;
|
||||
if (g_hash_table_lookup(optlist, "proxy")) rec->no_proxy = FALSE;
|
||||
if (g_hash_table_lookup(optlist, "noproxy")) rec->no_proxy = TRUE;
|
||||
|
||||
if (*password != '\0' && g_strcmp0(password, "-") != 0) rec->password = g_strdup(password);
|
||||
value = g_hash_table_lookup(optlist, "host");
|
||||
@ -434,8 +432,8 @@ void fe_server_init(void)
|
||||
command_bind_first("server", NULL, (SIGNAL_FUNC) server_command);
|
||||
command_bind_first("disconnect", NULL, (SIGNAL_FUNC) server_command);
|
||||
|
||||
command_set_options("server add", "4 6 !! ssl +ssl_cert +ssl_pkey +ssl_pass ssl_verify +ssl_cafile +ssl_capath +ssl_ciphers +ssl_fingerprint tls +tls_cert +tls_pkey +tls_pass tls_verify +tls_cafile +tls_capath +tls_ciphers +tls_pinned_cert +tls_pinned_pubkey auto noauto proxy noproxy -host -port noautosendcmd");
|
||||
command_set_options("server modify", "4 6 !! ssl +ssl_cert +ssl_pkey +ssl_pass ssl_verify +ssl_cafile +ssl_capath +ssl_ciphers +ssl_fingerprint tls +tls_cert +tls_pkey +tls_pass tls_verify +tls_cafile +tls_capath +tls_ciphers +tls_pinned_cert +tls_pinned_pubkey auto noauto proxy noproxy -host -port noautosendcmd");
|
||||
command_set_options("server add", "4 6 !! ssl +ssl_cert +ssl_pkey +ssl_pass ssl_verify +ssl_cafile +ssl_capath +ssl_ciphers +ssl_fingerprint tls +tls_cert +tls_pkey +tls_pass tls_verify +tls_cafile +tls_capath +tls_ciphers +tls_pinned_cert +tls_pinned_pubkey auto noauto -host -port noautosendcmd");
|
||||
command_set_options("server modify", "4 6 !! ssl +ssl_cert +ssl_pkey +ssl_pass ssl_verify +ssl_cafile +ssl_capath +ssl_ciphers +ssl_fingerprint tls +tls_cert +tls_pkey +tls_pass tls_verify +tls_cafile +tls_capath +tls_ciphers +tls_pinned_cert +tls_pinned_pubkey auto noauto -host -port noautosendcmd");
|
||||
|
||||
signal_add("server looking", (SIGNAL_FUNC) sig_server_looking);
|
||||
signal_add("server connecting", (SIGNAL_FUNC) sig_server_connecting);
|
||||
|
@ -106,8 +106,6 @@ static void cmd_server_list(const char *data)
|
||||
g_string_append(str, "(pass), ");
|
||||
if (rec->autoconnect)
|
||||
g_string_append(str, "autoconnect, ");
|
||||
if (rec->no_proxy)
|
||||
g_string_append(str, "noproxy, ");
|
||||
if (rec->use_tls) {
|
||||
g_string_append(str, "tls, ");
|
||||
if (rec->tls_cert) {
|
||||
|
@ -219,19 +219,6 @@ static void server_init(IRC_SERVER_REC *server)
|
||||
|
||||
conn = server->connrec;
|
||||
|
||||
if (conn->proxy != NULL && conn->proxy_password != NULL &&
|
||||
*conn->proxy_password != '\0') {
|
||||
cmd = g_strdup_printf("PASS %s", conn->proxy_password);
|
||||
irc_send_cmd_now(server, cmd);
|
||||
g_free(cmd);
|
||||
}
|
||||
|
||||
if (conn->proxy != NULL && conn->proxy_string != NULL) {
|
||||
cmd = g_strdup_printf(conn->proxy_string, conn->address, conn->port);
|
||||
irc_send_cmd_now(server, cmd);
|
||||
g_free(cmd);
|
||||
}
|
||||
|
||||
if (conn->sasl_mechanism != SASL_MECHANISM_NONE)
|
||||
cap_toggle(server, "sasl", TRUE);
|
||||
|
||||
@ -271,12 +258,6 @@ static void server_init(IRC_SERVER_REC *server)
|
||||
g_free(cmd);
|
||||
g_free(username);
|
||||
|
||||
if (conn->proxy != NULL && conn->proxy_string_after != NULL) {
|
||||
cmd = g_strdup_printf(conn->proxy_string_after, conn->address, conn->port);
|
||||
irc_send_cmd_now(server, cmd);
|
||||
g_free(cmd);
|
||||
}
|
||||
|
||||
server->isupport = g_hash_table_new((GHashFunc) g_istr_hash,
|
||||
(GCompareFunc) g_istr_equal);
|
||||
|
||||
|
@ -165,7 +165,6 @@ static void perl_client_fill_hash(HV *hv, CLIENT_REC *client)
|
||||
{
|
||||
(void) hv_store(hv, "nick", 4, new_pv(client->nick), 0);
|
||||
(void) hv_store(hv, "addr", 4, new_pv(client->addr), 0);
|
||||
(void) hv_store(hv, "proxy_address", 13, new_pv(client->proxy_address), 0);
|
||||
(void) hv_store(hv, "server", 6, iobject_bless(client->server), 0);
|
||||
(void) hv_store(hv, "pass_sent", 9, newSViv(client->pass_sent), 0);
|
||||
(void) hv_store(hv, "user_sent", 9, newSViv(client->user_sent), 0);
|
||||
|
Loading…
Reference in New Issue
Block a user