diff --git a/src/plugins/SSLPlugin/ssl_plugin.c b/src/plugins/SSLPlugin/ssl_plugin.c index 0ba95bf..56ae11f 100644 --- a/src/plugins/SSLPlugin/ssl_plugin.c +++ b/src/plugins/SSLPlugin/ssl_plugin.c @@ -310,11 +310,11 @@ static FILTER_ACTION ssl_filter_client(void *fo, struct clientparam * param, voi } static FILTER_ACTION ssl_filter_predata(void *fo, struct clientparam * param){ - if(param->operation != HTTP_CONNECT) return PASS; + if(param->operation != HTTP_CONNECT && param->operation != CONNECT) return PASS; if(dossl(param, NULL, NULL)) { return REJECT; } - param->redirectfunc = proxyfunc; + if(!param->redirectfunc) param->redirectfunc = proxyfunc; return CONTINUE; } diff --git a/src/socks.c b/src/socks.c index 3fedd00..9f61293 100644 --- a/src/socks.c +++ b/src/socks.c @@ -203,6 +203,8 @@ void * sockschild(struct clientparam* param) { RETURN(res); } + + if(command > 1) { if(so._bind(param->remsock,(struct sockaddr *)¶m->sinsl,SASIZE(¶m->sinsl))) { *SAPORT(¶m->sinsl) = 0; @@ -272,6 +274,17 @@ fflush(stderr); socksend(param->clisock, buf, 8, conf.timeouts[STRING_S]); } + if (param->npredatfilters){ + int action; + + action = handlepredatflt(param); + if(action == HANDLED){ + param->res = 0; + } + if(action != PASS){ + param->res = 19; + } + } if (param->res == 0) { switch(command) { case 1: