mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-24 02:55:40 +08:00
Defer SSL init to first command in ssl_plugin
This commit is contained in:
parent
604cc22d16
commit
c96d415020
@ -326,8 +326,13 @@ static struct filter ssl_filter = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
int mitm = 0;
|
int mitm = 0;
|
||||||
|
int ssl_inited = 0;
|
||||||
|
|
||||||
static int h_mitm(int argc, unsigned char **argv){
|
static int h_mitm(int argc, unsigned char **argv){
|
||||||
|
if(!ssl_inited) {
|
||||||
|
ssl_init();
|
||||||
|
ssl_inited = 1;
|
||||||
|
}
|
||||||
if((mitm&1)) return 1;
|
if((mitm&1)) return 1;
|
||||||
if(mitm) usleep(100*SLEEPTIME);
|
if(mitm) usleep(100*SLEEPTIME);
|
||||||
ssl_filter.next = pl->conf->filters;
|
ssl_filter.next = pl->conf->filters;
|
||||||
@ -389,9 +394,9 @@ __declspec(dllexport)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ssl_release();
|
ssl_release();
|
||||||
|
ssl_inited = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ssl_init();
|
|
||||||
tcppmfunc = (PROXYFUNC)pl->findbyname("tcppm");
|
tcppmfunc = (PROXYFUNC)pl->findbyname("tcppm");
|
||||||
if(!tcppmfunc){return 13;}
|
if(!tcppmfunc){return 13;}
|
||||||
proxyfunc = (PROXYFUNC)pl->findbyname("proxy");
|
proxyfunc = (PROXYFUNC)pl->findbyname("proxy");
|
||||||
|
Loading…
Reference in New Issue
Block a user