socks: a SOCKS4a request is not a connect to the null address
C/C++ CI Linux / ubuntu-24.04-arm (push) Canceled after 0s
C/C++ CI Linux / ubuntu-latest (push) Canceled after 0s
C/C++ CI MacOS / macos-15 (push) Canceled after 0s
C/C++ CI Windows / windows-2022 (push) Canceled after 0s
C/C++ CI cmake / macos-15 (push) Canceled after 0s
C/C++ CI cmake / ubuntu-24.04-arm (push) Canceled after 0s
C/C++ CI cmake / ubuntu-latest (push) Canceled after 0s
C/C++ CI cmake / windows-2022 (push) Canceled after 0s
C/C++ CI cmake / ubuntu-latest (wolfSSL) (push) Canceled after 0s

This commit is contained in:
Vladimir Dubrovin committed 2026-11-18 21:37:33 +03:00
1 parent 84f6ee6ce4
commit 8b298657ce
1 file changed
+4 -1
+4 -1
View File
@@ -119,7 +119,10 @@ void * sockschild(struct clientparam* param) {
} }
res = socks5_setaddr(param->srv->family, c, buf, &param->req); res = socks5_setaddr(param->srv->family, c, buf, &param->req);
if(res == 1) {RETURN(997);} if(res == 1) {RETURN(997);}
if(res == 2 && command == 1) {RETURN(431);} /* The null address is no destination to connect to, except in
SOCKS4a, where it says that the destination is the name which
follows it. */
if(res == 2 && ver == 5 && command == 1) {RETURN(431);}
param->sinsr = param->req; param->sinsr = param->req;
myinet_ntop(*SAFAMILY(&param->sinsr), SAADDR(&param->sinsr), (char *)buf, 64); myinet_ntop(*SAFAMILY(&param->sinsr), SAADDR(&param->sinsr), (char *)buf, 64);
break; break;