mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 18:45:40 +08:00
SSL plugin commands renamed
plugin /path/to/SslPlugin.dll ssl_plugin ssl_certcache /path/to/cache/ ssl_mitm proxy -p3128 ssl_nomitm proxy -p3129
This commit is contained in:
parent
347d7736c7
commit
22e7d9cdae
@ -325,21 +325,21 @@ static struct filter ssl_filter = {
|
||||
ssl_filter_close
|
||||
};
|
||||
|
||||
int strip = 0;
|
||||
int mitm = 0;
|
||||
|
||||
static int h_strip(int argc, unsigned char **argv){
|
||||
if((strip&1)) return 1;
|
||||
if(strip) usleep(100*SLEEPTIME);
|
||||
static int h_mitm(int argc, unsigned char **argv){
|
||||
if((mitm&1)) return 1;
|
||||
if(mitm) usleep(100*SLEEPTIME);
|
||||
ssl_filter.next = pl->conf->filters;
|
||||
pl->conf->filters = &ssl_filter;
|
||||
strip++;
|
||||
mitm++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int h_nostrip(int argc, unsigned char **argv){
|
||||
static int h_nomitm(int argc, unsigned char **argv){
|
||||
struct filter * sf;
|
||||
if(!(strip&1)) return 1;
|
||||
if(strip) usleep(100*SLEEPTIME);
|
||||
if(!(mitm&1)) return 1;
|
||||
if(mitm) usleep(100*SLEEPTIME);
|
||||
if(pl->conf->filters == &ssl_filter) pl->conf->filters = ssl_filter.next;
|
||||
else for(sf = pl->conf->filters; sf && sf->next; sf=sf->next){
|
||||
if(sf->next == &ssl_filter) {
|
||||
@ -347,7 +347,7 @@ static int h_nostrip(int argc, unsigned char **argv){
|
||||
break;
|
||||
}
|
||||
}
|
||||
strip++;
|
||||
mitm++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -361,9 +361,9 @@ static int h_certpath(int argc, unsigned char **argv){
|
||||
}
|
||||
|
||||
static struct commands ssl_commandhandlers[] = {
|
||||
{ssl_commandhandlers+1, "ssl_strip", h_strip, 1, 1},
|
||||
{ssl_commandhandlers+2, "ssl_nostrip", h_nostrip, 1, 1},
|
||||
{NULL, "ssl_certpath", h_certpath, 2, 2},
|
||||
{ssl_commandhandlers+1, "ssl_mitm", h_mitm, 1, 1},
|
||||
{ssl_commandhandlers+2, "ssl_nomitm", h_nomitm, 1, 1},
|
||||
{NULL, "ssl_certcache", h_certpath, 2, 2},
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user