Update Warp configure
This commit is contained in:
11
core/cli.py
11
core/cli.py
@ -220,7 +220,16 @@ def uninstall_warp():
|
||||
@click.option('--domestic-sites', '-d', is_flag=True, help='Use WARP for Iran domestic sites')
|
||||
@click.option('--block-adult-sites', '-x', is_flag=True, help='Block adult content (porn)')
|
||||
def configure_warp(all: bool, popular_sites: bool, domestic_sites: bool, block_adult_sites: bool):
|
||||
run_cmd(['bash', Command.CONFIGURE_WARP.value, str(all).lower(), str(popular_sites).lower(), str(domestic_sites).lower(), str(block_adult_sites).lower()])
|
||||
options = {
|
||||
"all": all,
|
||||
"popular_sites": popular_sites,
|
||||
"domestic_sites": domestic_sites,
|
||||
"block_adult_sites": block_adult_sites
|
||||
}
|
||||
|
||||
options = {k: 'true' if v else 'false' for k, v in options.items()}
|
||||
run_cmd(['bash', Command.CONFIGURE_WARP.value,
|
||||
options['all'], options['popular_sites'], options['domestic_sites'], options['block_adult_sites']])
|
||||
|
||||
# endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user