sergiotapia / torrentinim

A very low memory-footprint, self hosted API-only torrent search engine. Sonarr + Radarr Compatible, native support for Linux, Mac and Windows.
MIT License
782 stars 35 forks source link

Proxy support #17

Open Mihara opened 3 years ago

Mihara commented 3 years ago

So I've been trying to set up torrentinim, and bumped into a problem: A bunch of tracker sites are banned around here and thus inaccessible. Of course, I have circumvention methods, but they're primarily a SOCKS proxy.

So I tried to run torrentinim through tsocks. Getting tsocks to work at all took some time, but I'm definite it is working:

$ TSOCKS_CONF_FILE=/xxx/etc/tsocks.conf tsocks wget -qO - https://www.showmemyip.com/ | grep "<title>"
                <title>Show Me My IP! - Your IP address is: xx.xx.xx.xx</title>

But when I try to run torrentinim under tsocks, this happens:

$ TSOCKS_CONF_FILE=/xxx/etc/tsocks.conf tsocks torrentinim                            
2021-08-12T18:28:00+03:00 [eztv] Starting EZTV crawl                                                     
2021-08-12T18:28:00+03:00 [1337x] Starting 1337x crawl                                                   
2021-08-12T18:28:00+03:00 [1337x] Download html: https://1337x.to/cat/Anime/1/
2021-08-12T18:28:00+03:00 [nyaa] Starting Nyaa crawl                                                     
2021-08-12T18:28:00+03:00 [nyaa-pantsu] Starting NyaaPantsu crawl                                        
2021-08-12T18:28:00+03:00 [yts] Starting YTS crawl                                                       
2021-08-12T18:28:00+03:00 [torrentdownloads] Starting TorrentDownloads.me crawl                                                                                                                                    
2021-08-12T18:28:00+03:00 [thepiratebay] Starting ThePirateBay crawl                                     
2021-08-12T18:28:00+03:00 [rarbg] Starting Rarbg crawl                                                   
Torrentinim is running, bambino. http://localhost:50123                                                  
2021-08-12T18:28:00+03:00 [eztv] Crawler error, restarting...                                            
2021-08-12T18:28:00+03:00 [eztv] Starting EZTV crawl                                                     
2021-08-12T18:28:00+03:00 [nyaa] Crawler error, restarting...           
2021-08-12T18:28:00+03:00 [nyaa] Starting Nyaa crawl                                                     
2021-08-12T18:28:00+03:00 [nyaa-pantsu] Crawler error, restarting...                                     
2021-08-12T18:28:00+03:00 [nyaa-pantsu] Starting NyaaPantsu crawl                                        
2021-08-12T18:28:00+03:00 [yts] Crawler error, restarting...                                                                                                                                                       
2021-08-12T18:28:00+03:00 [yts] Starting YTS crawl                                                       
2021-08-12T18:28:00+03:00 [torrentdownloads] Crawler error, restarting...                             
2021-08-12T18:28:00+03:00 [torrentdownloads] Starting TorrentDownloads.me crawl                          
2021-08-12T18:28:00+03:00 [thepiratebay] Crawler error, restarting...                                                                                                                                              
2021-08-12T18:28:00+03:00 [thepiratebay] Starting ThePirateBay crawl                                     
2021-08-12T18:28:00+03:00 [rarbg] Crawler error, restarting...                                           
2021-08-12T18:28:00+03:00 [rarbg] Starting Rarbg crawl     

And it just loops infinitely.

Is there any hope of native proxy support? Failing that, any ideas why it's not working?

sergiotapia commented 2 years ago

@Mihara I am not sure if Nim's httpclient supports tsocks. I'm going to ask around and see what I can find. The error you see suggest that Torrentinim's crawlers can't connect to the endpoint urls.