mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
ip_cloaking: clarify logic
This also slightly changes mangled IPs but the mangling is on the same level.
This commit is contained in:
parent
5067fe0e81
commit
d9439a0eee
1 changed files with 5 additions and 11 deletions
|
@ -106,19 +106,13 @@ do_host_cloak_ip(const char *inbuf, char *outbuf)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (ipv6)
|
if (ipv6 && sepcount < totalcount / 2)
|
||||||
{
|
continue;
|
||||||
case 1:
|
|
||||||
if (sepcount < totalcount / 2)
|
if (!ipv6 && sepcount < 2)
|
||||||
break;
|
continue;
|
||||||
case 0:
|
|
||||||
if (sepcount < 2)
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
*tptr = chartable[(*tptr + accum) % 20];
|
*tptr = chartable[(*tptr + accum) % 20];
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
accum = (accum << 1) | (accum >> 31);
|
accum = (accum << 1) | (accum >> 31);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue