mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 15:59:41 +08:00
socks: a UDP association is not relayed direct when its parent fails
This commit is contained in:
1 parent
4f4862e2c1
commit
1772ded781
1 file changed
+7
-4
+7
-4
@@ -158,8 +158,10 @@ static void udpreset(struct clientparam *param)
|
|||||||
/*
|
/*
|
||||||
* Authorize param->req and (re)build the server side of the association:
|
* Authorize param->req and (re)build the server side of the association:
|
||||||
* a parent proxy chain and/or an external address may be selected by the ACL.
|
* a parent proxy chain and/or an external address may be selected by the ACL.
|
||||||
* Returns the authorization result. param->remsock is INVALID_SOCKET if the
|
* Returns the authorization result. param->remsock is INVALID_SOCKET when
|
||||||
* socket can not be created, in this case the association can not continue.
|
* the authorization refused the association or the socket can not be
|
||||||
|
* created; the association can not continue then, so that a parent the
|
||||||
|
* rules demand is never quietly replaced by a direct relay.
|
||||||
*/
|
*/
|
||||||
static int udpreconnect(struct clientparam *param)
|
static int udpreconnect(struct clientparam *param)
|
||||||
{
|
{
|
||||||
@@ -185,9 +187,10 @@ static int udpreconnect(struct clientparam *param)
|
|||||||
param->remsock = INVALID_SOCKET;
|
param->remsock = INVALID_SOCKET;
|
||||||
}
|
}
|
||||||
udpreset(param);
|
udpreset(param);
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
if (udpbind(param)) return res? res : 11;
|
if (udpbind(param)) return 11;
|
||||||
return res;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int udpsockmap(struct clientparam *param, int timeo)
|
int udpsockmap(struct clientparam *param, int timeo)
|
||||||
|
|||||||
Reference in new issue
Block a user