The UBB.threads7 series, up until 7.6.0 just reads the REMOTE_ADDR server variable; you would have to use grep to return every instance of that variable and adjust it (such as say, adding the above php bit to the ubbthreads.php file and replacing the calls for remote addr to use $user_ip).

If you where behind CloudFlare I'd suggest installing their apache module to change the addresses accordingly, but I'm not sure if "CloudProxy" has one available.

You could try using that bit (though generally I'm against changing server variables, and I'm not sure how well smarty will play with it):
PHP Code
if(isset($_SERVER['HTTP_X_SUCURI_CLIENTIP']))
{
	$_SERVER["REMOTE_ADDR"] = $_SERVER['HTTP_X_SUCURI_CLIENTIP'];
} 

In the ubbthreads.php file; before:
Code
// include all of the required libraries