mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Make filtermaxsize, parentretries, delimchar and maxseg per service
Like the timeouts, each service now keeps the values given before it instead of reading the global ones while its connections run. setopts() takes the service's maxseg. The TLS handshakes wait the service's CONNECT_TO, kept in its SSL configuration, rather than the global one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bab80ef684
commit
ca0b5e0c88
10 files changed
+30
-20
No files matched your search
+4
-4
@@ -670,15 +670,15 @@ int parseusername(char *username, struct clientparam *param, int extpasswd){
|
||||
int parseconnusername(char *username, struct clientparam *param, int extpasswd, uint16_t port){
|
||||
char *sb, *se;
|
||||
if(!username || !*username) return 1;
|
||||
if ((sb=strchr(username, conf.delimchar)) == NULL){
|
||||
if ((sb=strchr(username, param->srv->delimchar)) == NULL){
|
||||
if(!*param->hostname && param->remsock == INVALID_SOCKET) return 2;
|
||||
if(*param->hostname)parsehostname((char *)param->hostname, param, *SAPORT(¶m->req)? ntohs(*SAPORT(¶m->req)) : port);
|
||||
return parseusername(username, param, extpasswd);
|
||||
}
|
||||
while ((se=strchr(sb+1, conf.delimchar)))sb=se;
|
||||
while ((se=strchr(sb+1, param->srv->delimchar)))sb=se;
|
||||
*(sb) = 0;
|
||||
if(parseusername(username, param, extpasswd)) return 3;
|
||||
*(sb) = conf.delimchar;
|
||||
*(sb) = param->srv->delimchar;
|
||||
if(parsehostname(sb+1, param, *SAPORT(¶m->req)? ntohs(*SAPORT(¶m->req)) : port)) return 4;
|
||||
return 0;
|
||||
}
|
||||
@@ -803,7 +803,7 @@ int doconnect(struct clientparam * param){
|
||||
param->sinsl = param->srv->extsa;
|
||||
}
|
||||
*SAPORT(¶m->sinsl) = 0;
|
||||
setopts(param->remsock, ¶m->srv->srvsockopts);
|
||||
setopts(param->remsock, ¶m->srv->srvsockopts, param->srv->maxseg);
|
||||
|
||||
#ifndef _WIN32
|
||||
/* not on Windows, see the accepting side in proxymain.c */
|
||||
|
||||
Reference in new issue
Block a user