TA_SetCustomProxy() and IPs with leading zerosSolved

Hi Wyatt,

TA_SetCustomProxy() returns an error when the IP address is 192.168.012.034 and the real IP 192.168.12.34. In theory the first form is acceptable too.Temporary I'll sanitize this kind of addresses but are you going to do something for this?

Thanks in advance,

Alessandro

This is not a bug. TurboActivate is working as expected (following the industry standard of allowing IP addresses to be decimal, octal, or hex). When a number leads with "0" it's no longer a decimal number, it's an octal number. So, "012" in octal is "10" in decimal. Hence the IP address not working as a proxy (because it's a completely different address!)

More info: https://linux.die.net/man/3/inet_addr

Long story short: if you want to be more liberal with your input (and ignore octal addresses), you certainly can, but you'll have to pass the cleaned IP address to TurboActivate.