Here is a suggestion for you.
Create a new txt file named used.txt When you FINISH USING a proxy, write it to the used.txt file. When you want to use a new proxy, retrieve each proxy from the proxy file and compare it with the used.txt file.If this proxy is in the used.txt file, it means the proxy has been used, so skip it and check with other proxies.
Alternatively, another way is to delete resources after they have been used, but this may not be ideal because if the proxy has not completed all of your tasks, it will also be deleted because it has been used.
Please note what I said above, that the proxy should only be saved to the used.txt file when it has been "FINISHED USING", because if there is any issue that prevents you from completing your task with this proxy, it will still be retrieved in the next run, as it has not been saved to the used.txt file and has not completed its mission yet :)
