mirror of
https://github.com/3proxy/3proxy.git
synced 2026-05-13 13:30:12 +08:00
Fix issues with -s
Some checks failed
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Some checks failed
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
This commit is contained in:
parent
5fdd4a4d6f
commit
aaa04116a8
@ -620,7 +620,7 @@ static void * ef_server_acl(struct node * node){
|
||||
}
|
||||
|
||||
static void * ef_server_singlepacket(struct node * node){
|
||||
return &((struct srvparam *)node->value) -> singlepacket;
|
||||
return &((struct srvparam *)node->value) -> s_option;
|
||||
}
|
||||
|
||||
static void * ef_server_needuser(struct node * node){
|
||||
|
||||
@ -82,7 +82,7 @@ void * dnsprchild(struct clientparam* param) {
|
||||
*s2 = (len - (int)(s2 - buf)) - 1;
|
||||
|
||||
type = ((unsigned)buf[len+1])*256 + (unsigned)buf[len+2];
|
||||
if((type==0x01 || type==0x1c) && !param->srv->singlepacket){
|
||||
if((type==0x01 || type==0x1c) && !param->srv->s_option){
|
||||
ip = udpresolve((type==0x1c)?AF_INET6:AF_INET, (unsigned char *)host, addr, &ttl, param, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -531,7 +531,7 @@ int MODULEMAINFUNC (int argc, char** argv){
|
||||
#ifdef WITHSPLICE
|
||||
if(isudp || srv.service == S_ADMIN)
|
||||
#endif
|
||||
srv.singlepacket = 1 + atoi(argv[i]+2);
|
||||
srv.s_option = 1 + atoi(argv[i]+2);
|
||||
#ifdef WITHSPLICE
|
||||
else
|
||||
if(*(argv[i]+2)) srv.usesplice = atoi(argv[i]+2);
|
||||
|
||||
@ -279,7 +279,6 @@ log("done send to client from buf");
|
||||
if(param->srvoffset == param->srvinbuf)param->srvoffset = param->srvinbuf =0;
|
||||
if(param->srvinbuf < param->srvbufsize) TOSERVERBUF = 1;
|
||||
needaction = 0;
|
||||
if(param->srv->singlepacket) RETURN(0);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@ -522,7 +522,7 @@ struct srvparam {
|
||||
int maxchild;
|
||||
int backlog;
|
||||
int paused, version;
|
||||
int singlepacket;
|
||||
int s_option;
|
||||
int needuser;
|
||||
int silent;
|
||||
int transparent;
|
||||
|
||||
@ -191,7 +191,7 @@ void * tlsprchild(struct clientparam* param) {
|
||||
}
|
||||
else if (parsehostname(sni, param, param->srv->targetport? ntohs(param->srv->targetport):443)) RETURN (100);
|
||||
if (!param->hostname)param->hostname = (unsigned char *)strdup(sni);
|
||||
if(param->srv->singlepacket && snipos && res > 1){
|
||||
if(param->srv->s_option && snipos && res > 1){
|
||||
int len;
|
||||
|
||||
len = socksend(param, param->remsock, param->clibuf+param->clioffset,snipos + (res/2), conf.timeouts[STRING_S]);
|
||||
|
||||
@ -56,7 +56,7 @@ void * udppmchild(struct clientparam* param) {
|
||||
param->operation = UDPASSOC;
|
||||
authres = (*param->srv->authfunc)(param);
|
||||
if(authres) { RETURN(authres); }
|
||||
if(!param->srv->singlepacket)hashadd(&udp_table, param, ¶m, MAX_COUNTER_TIME);
|
||||
if(!param->srv->s_option)hashadd(&udp_table, param, ¶m, MAX_COUNTER_TIME);
|
||||
if(!param->srvbuf){
|
||||
if(!(param->srvbuf = malloc(UDPBUFSIZE)))RETURN(11);
|
||||
param->srvbufsize = UDPBUFSIZE;
|
||||
@ -78,7 +78,7 @@ void * udppmchild(struct clientparam* param) {
|
||||
param->waitserver64 = 0x7fffffffffffffff;
|
||||
param->res = udpsockmap(param, conf.timeouts[STRING_L]);
|
||||
_3proxy_sem_lock(udpinit);
|
||||
if(!param->srv->singlepacket)hashdelete(&udp_table, param);
|
||||
if(!param->srv->s_option)hashdelete(&udp_table, param);
|
||||
|
||||
CLEANRET:
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ static int socks5_udp_skip_hdr(unsigned char *buf, int len)
|
||||
* 3 three parent proxies (prepend 2 headers / strip 2 headers)
|
||||
*
|
||||
* param->waitserver64 non-zero: skip client socket polling (server→client only)
|
||||
* param->srv->singlepacket non-zero: return after first datagram sent to client
|
||||
* param->srv->s_option non-zero: return after first datagram sent to client
|
||||
* param->ctrlsock TCP control socket from the client; INVALID_SOCKET if none.
|
||||
*/
|
||||
int udpsockmap(struct clientparam *param, int timeo)
|
||||
@ -213,7 +213,7 @@ int udpsockmap(struct clientparam *param, int timeo)
|
||||
param->srv->so._sendto(param->sostate, param->clisock,
|
||||
(char *)param->srvbuf + sendoff, sendlen, 0,
|
||||
(struct sockaddr *)&sin, SASIZE(&sin));
|
||||
if (param->srv->singlepacket) return 0;
|
||||
if (param->srv->s_option && param->srv->service == S_UDPPM) return 0;
|
||||
}
|
||||
|
||||
if ((ctrlsock_idx >= 0 && fds[ctrlsock_idx].revents) ||
|
||||
|
||||
@ -379,7 +379,7 @@ void * adminchild(struct clientparam* param) {
|
||||
int limited = 0;
|
||||
|
||||
|
||||
limited =param->srv->singlepacket;
|
||||
limited =param->srv->s_option;
|
||||
pp.inbuf = 0;
|
||||
pp.cp = param;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user