mirror of
https://github.com/3proxy/3proxy.git
synced 2025-05-17 18:02:48 +08:00
Fixed service name detection for auto / tlspr
Some checks failed
C/C++ CI / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Some checks failed
C/C++ CI / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
This commit is contained in:
parent
57841074b9
commit
dc4e8d3427
11
src/auto.c
11
src/auto.c
@ -22,8 +22,15 @@ void * autochild(struct clientparam* param) {
|
|||||||
param->res = 801;
|
param->res = 801;
|
||||||
dolog(param, (unsigned char *)"");
|
dolog(param, (unsigned char *)"");
|
||||||
}
|
}
|
||||||
if(*param->clibuf == 4 || *param->clibuf == 5) return sockschild(param);
|
if(*param->clibuf == 4 || *param->clibuf == 5) {
|
||||||
if(*param->clibuf == 22) return tlsprchild(param);
|
param->service = S_SOCKS;
|
||||||
|
return sockschild(param);
|
||||||
|
}
|
||||||
|
if(*param->clibuf == 22) {
|
||||||
|
param->service = S_TLSPR;
|
||||||
|
return tlsprchild(param);
|
||||||
|
}
|
||||||
|
param->service = S_PROXY;
|
||||||
return proxychild(param);
|
return proxychild(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ int dobuf2(struct clientparam * param, unsigned char * buf, const unsigned char
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'N':
|
case 'N':
|
||||||
if(param->service < 15) {
|
if(param->service <= MAX_SERVICE) {
|
||||||
len = (conf.stringtable)? (int)strlen((char *)conf.stringtable[SERVICES + param->service]) : 0;
|
len = (conf.stringtable)? (int)strlen((char *)conf.stringtable[SERVICES + param->service]) : 0;
|
||||||
if(len > 20) len = 20;
|
if(len > 20) len = 20;
|
||||||
memcpy(buf+i, (len)?conf.stringtable[SERVICES + param->service]:(unsigned char*)"-", (len)?len:1);
|
memcpy(buf+i, (len)?conf.stringtable[SERVICES + param->service]:(unsigned char*)"-", (len)?len:1);
|
||||||
|
@ -28,9 +28,9 @@ unsigned char * strings[] = {
|
|||||||
/* 15 */ (unsigned char *)"DNSPR",
|
/* 15 */ (unsigned char *)"DNSPR",
|
||||||
/* 16 */ (unsigned char *)"FTPPR",
|
/* 16 */ (unsigned char *)"FTPPR",
|
||||||
/* 17 */ (unsigned char *)"SMTPP",
|
/* 17 */ (unsigned char *)"SMTPP",
|
||||||
/* 18 */ (unsigned char *)"ZOMBIE",
|
/* 18 */ (unsigned char *)"AUTO",
|
||||||
/* 19 */ NULL,
|
/* 19 */ (unsigned char *)"TLSPR",
|
||||||
/* 20 */ NULL,
|
/* 20 */ (unsigned char *)"ZOMBIE",
|
||||||
/* 21 */ NULL,
|
/* 21 */ NULL,
|
||||||
/* 22 */ NULL,
|
/* 22 */ NULL,
|
||||||
/* 23 */ NULL,
|
/* 23 */ NULL,
|
||||||
|
@ -181,13 +181,14 @@ typedef enum {
|
|||||||
S_DNSPR,
|
S_DNSPR,
|
||||||
S_FTPPR,
|
S_FTPPR,
|
||||||
S_SMTPP,
|
S_SMTPP,
|
||||||
S_REVLI,
|
|
||||||
S_REVCO,
|
|
||||||
S_ZOMBIE,
|
|
||||||
S_AUTO,
|
S_AUTO,
|
||||||
S_TLSPR
|
S_TLSPR,
|
||||||
|
S_ZOMBIE
|
||||||
}PROXYSERVICE;
|
}PROXYSERVICE;
|
||||||
|
|
||||||
|
#define MAX_SERVICE S_ZOMBIE
|
||||||
|
|
||||||
|
|
||||||
struct clientparam;
|
struct clientparam;
|
||||||
struct node;
|
struct node;
|
||||||
struct symbol;
|
struct symbol;
|
||||||
|
Loading…
Reference in New Issue
Block a user