custom cloak for tor HS users
This commit is contained in:
parent
ff50430c76
commit
436240f3e1
|
@ -773,6 +773,11 @@ Client_HostnameDisplayed(CLIENT *Client)
|
||||||
{
|
{
|
||||||
assert(Client != NULL);
|
assert(Client != NULL);
|
||||||
|
|
||||||
|
/* Client is using Tor HS */
|
||||||
|
if (strcmp(Client_IPAText(Client), "127.0.0.1") == 0) {
|
||||||
|
return "TorHS";
|
||||||
|
}
|
||||||
|
|
||||||
/* Client isn't cloaked at all, return real hostname: */
|
/* Client isn't cloaked at all, return real hostname: */
|
||||||
if (!Client_HasMode(Client, 'x'))
|
if (!Client_HasMode(Client, 'x'))
|
||||||
return Client_Hostname(Client);
|
return Client_Hostname(Client);
|
||||||
|
@ -947,9 +952,16 @@ Client_MaskCloaked(CLIENT *Client)
|
||||||
|
|
||||||
assert (Client != NULL);
|
assert (Client != NULL);
|
||||||
|
|
||||||
|
/* Custom mask for Tor clients */
|
||||||
|
if (strcmp(Client_IPAText(Client), "127.0.0.1") == 0) {
|
||||||
|
snprintf(Mask_Buffer, GETID_LEN, "%s!%s@%s", Client->id, Client->user,
|
||||||
|
"TorHS");
|
||||||
|
}
|
||||||
|
|
||||||
/* Is the client using cloaking at all? */
|
/* Is the client using cloaking at all? */
|
||||||
if (!Client_HasMode(Client, 'x'))
|
else if (!Client_HasMode(Client, 'x')) {
|
||||||
return Client_Mask(Client);
|
return Client_Mask(Client);
|
||||||
|
}
|
||||||
|
|
||||||
snprintf(Mask_Buffer, GETID_LEN, "%s!%s@%s", Client->id, Client->user,
|
snprintf(Mask_Buffer, GETID_LEN, "%s!%s@%s", Client->id, Client->user,
|
||||||
Client_HostnameDisplayed(Client));
|
Client_HostnameDisplayed(Client));
|
||||||
|
|
Loading…
Reference in New Issue