diff --git a/src/core/Makefile.am b/src/core/Makefile.am index ce4b4bb6..c664739b 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -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 \ diff --git a/src/core/network-proxy.c b/src/core/network-proxy.c index cedf96b5..cb5f9417 100644 --- a/src/core/network-proxy.c +++ b/src/core/network-proxy.c @@ -18,6 +18,9 @@ #include "network-proxy.h" #include +#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; }