Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add random server option #48

Open
Martin-K24 opened this issue Aug 12, 2024 · 0 comments
Open

Add random server option #48

Martin-K24 opened this issue Aug 12, 2024 · 0 comments

Comments

@Martin-K24
Copy link

I'm not sure how to do it extactly actions.py.
but... it would look something like this.

Add "random-server" option in actions.py that uses import random to select a random server from list in config.
I'm sure it would be something like how mirror works but without spliting it and using random imported into it

Then update connection option -S or --random-server and default configuration added to None in cli.py.

    ## Connection options
    send_parser.add_argument("-s", "--server", default=argparse.SUPPRESS, help="Instance URL (default: https://paste.i2pd.xyz/)")
    send_parser.add_argument("-S", "--random-server", default=argparse.SUPPRESS, help="Select random URL instance from server_list in config file")
    # default configuration
    CONFIG = {
        'server': 'https://paste.i2pd.xyz/',
        'server_list': None,

Config file option in ~/.config/pbincli/pbincli.conf

server_list=server1,server2,server3,etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant