Mydayyy / pbcli

pbcli is a command line client which allows to upload and download pastes from privatebin directly from the command line.
MIT License
10 stars 4 forks source link

Idea / Feature request - Random host selection #9

Open nain-F49FF806 opened 2 months ago

nain-F49FF806 commented 2 months ago

Privatebin.info [link] has ability to forward to random healthy privatebin instances. One can try this by going to the following url: https://privatebin.info/directory/forward-me

It seems they are responding with a 303 (See Other) HTTP status response along with the url of a randomly selected instance. The details can be found here: https://privatebin.info/directory/about#faq-forward

The idea:

pbcli could have a --random-host flag. When set by user, the CLI application should make a request to above url, fetch the privatebin host provided in the response. And then set that as the active instance for the current invocation.

Mydayyy commented 2 months ago

Greetings,

I did not know that they offer such an API, that is really neat. I think it would be a good addition to implement. I will put that on my ToDo list.

Best Regards Mydayyy