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:
Vladimir DubrovinandClaude Opus 5.5 committed 2026-10-13 15:33:35 +03:00
1 parent bab80ef684
commit ca0b5e0c88
10 files changed
+30 -20

No files matched your search

+4 -4
View File
@@ -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(&param->req)? ntohs(*SAPORT(&param->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(&param->req)? ntohs(*SAPORT(&param->req)) : port)) return 4;
return 0;
}
@@ -803,7 +803,7 @@ int doconnect(struct clientparam * param){
param->sinsl = param->srv->extsa;
}
*SAPORT(&param->sinsl) = 0;
setopts(param->remsock, &param->srv->srvsockopts);
setopts(param->remsock, &param->srv->srvsockopts, param->srv->maxseg);
#ifndef _WIN32
/* not on Windows, see the accepting side in proxymain.c */