mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
PROXY: merge proxy methods into buildsystem
This patch adds the code and rules to build the various proxy methods.
This commit is contained in:
parent
bb276c0b80
commit
2e89752708
2 changed files with 18 additions and 0 deletions
|
|
@ -33,6 +33,12 @@ libcore_a_SOURCES = \
|
|||
network-openssl.c \
|
||||
network-proxy.c \
|
||||
network-proxy.h \
|
||||
network-proxy-simple.c \
|
||||
network-proxy-simple.h \
|
||||
network-proxy-http.c \
|
||||
network-proxy-http.h \
|
||||
network-proxy-socks5.c \
|
||||
network-proxy-socks5.h \
|
||||
network-proxy-priv.h \
|
||||
nicklist.c \
|
||||
nickmatch-cache.c \
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
|
||||
#include "network-proxy.h"
|
||||
#include <string.h>
|
||||
#include "network-proxy-simple.h"
|
||||
#include "network-proxy-http.h"
|
||||
#include "network-proxy-socks5.h"
|
||||
|
||||
struct network_proxy *
|
||||
network_proxy_create(char const *type)
|
||||
|
|
@ -25,6 +28,15 @@ network_proxy_create(char const *type)
|
|||
if (type==NULL)
|
||||
return NULL;
|
||||
|
||||
if (strcmp(type, "simple")==0 || type[0]=='\0')
|
||||
return _network_proxy_simple_create();
|
||||
|
||||
if (strcmp(type, "http")==0)
|
||||
return _network_proxy_http_create();
|
||||
|
||||
if (strcmp(type, "socks5")==0)
|
||||
return _network_proxy_socks5_create();
|
||||
|
||||
g_error("unsupported proxy type '%s'", type);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue