seevik2580 / tor-ip-changer

request new identity every X seconds interval using TOR client
GNU General Public License v3.0
402 stars 119 forks source link

Never same IP again - feature request #52

Closed renekroka closed 3 years ago

renekroka commented 3 years ago

Hello, As title says, I would appericate feature where you can choose that you won"t ever get assigned same IP as before when using the switch ip feature. I would love to see this feature implemented and you might recieve nice btc tip for it :)

seevik2580 commented 3 years ago

Hello, to be honest, it's very tough.. for example .. it would be very difficult to try this in country where you have only one or two or maybe three exit nodes... when you deplete all three ip addresses there will be nowhere to connect. According to TOR documentation, you can specify ExcludeExitNodes ip1, ip2, ip3 in torrc file and reload config every time you add new ip.. but again .. when you deplete all of them then it will not connect to anything.. I guess i can make programmatically timestamps to ip and delete excluded ip after specified time, but still... i can try few tests, but no promises. I've seen this mechanism in application Advanced Onion Router, but its not work very well. its very buggy. but you can try it by youself.. anyways thanks for idea :)

renekroka commented 3 years ago

Hmm, sounds like a difficult task :P

seevik2580 commented 3 years ago

i tried some tests and its not much difficult and it works like i said :D when i deplete all addresses then tor start to gave me errors. image

example: blacklisted: 120 seconds change interval: 10 seconds country: czech republic number of exitNodes: 5

image image

in nutshell: ipchanger checks this every changing interval if an ip and time now minus their timestamps are lower than unique time in settings. if no then ip is whitelisted again, if yes, it keeps blacklisted.

i managed this even for multiproxy feature where every single proxy has its own blacklist image

the difficult part is to what to do if everything is depleted :D

my ideas: 1) i make button to flush all blacklisted ips 2) automatically whitelist first blacklisted ip in list 3) i make window to select which ip can be whitelisted permanently 4) if remaining usable exit nodes = 1 then never blacklist last used ip and wait until remaining usable exit nodes > 1

do you have any ideas ? 😄

renekroka commented 3 years ago

Thanks for working on this, what about once all IPs are used / blacklisted we wait until new set of unused ips are ready and assign them, once those newly assigned ips are used / blacklisted, we repeat the cycle of waiting for unused ones.

ipchanger will create a list of used ips to make sure they will never be assigned again, the user can choose if only for current ipchanger session, or for all sessions ever.

seevik2580 commented 3 years ago

well that sounds great, i think i can make it :)

seevik2580 commented 3 years ago

its done, well amost.. i have to finish some little things

i will try to publish till end of weekend

image

seevik2580 commented 3 years ago

published https://github.com/seevik2580/tor-ip-changer/commit/62ac7f72be45a3e31d746ad204b71d172148ce30

renekroka commented 3 years ago

Hi thanks for publishing it so quickly, i dont have much time rn to test it out, but i will soon hopefully and also send u Bitcoin tip, thanks a lot :)

seevik2580 commented 3 years ago

thanks, i appreciate it. if you find any bugs, feel free to report it. and also if you have any other good feature requests :)