mirror of
https://github.com/rofl0r/proxychains-ng.git
synced 2024-12-22 12:18:47 +00:00
Fix random_chain on Mac OS X
On Mac OS X, random chain was broken and returned always the last proxy from the config file. Use fix as suggested by @ravomavain. Closes #75.
This commit is contained in:
parent
260578d00e
commit
0f6b226b15
@ -464,7 +464,7 @@ static proxy_data *select_proxy(select_type how, proxy_data * pd, unsigned int p
|
|||||||
case RANDOMLY:
|
case RANDOMLY:
|
||||||
do {
|
do {
|
||||||
k++;
|
k++;
|
||||||
i = 0 + (unsigned int) (proxy_count * 1.0 * rand() / (RAND_MAX + 1.0));
|
i = rand() % proxy_count;
|
||||||
} while(pd[i].ps != PLAY_STATE && k < proxy_count * 100);
|
} while(pd[i].ps != PLAY_STATE && k < proxy_count * 100);
|
||||||
break;
|
break;
|
||||||
case FIFOLY:
|
case FIFOLY:
|
||||||
|
Loading…
Reference in New Issue
Block a user