使用 felixonmars 数据源 apple 保存 felixonmars/apple 数据源 --all 使用以上全部数据源 指定数据源并配合以下参数时不会进入交互模式,适用于自动/无人职守模式 -d 跳过代理设置使用直连,使用参数 "-p" 时参数 "-d" 无效 -p 主机名(IP 或域名):端口 非交互模式使用 HTTP 代理,无效地址或无法链接代理时会直接结束脚本 ''') txt1 = direct_domains txt2 = os.path.join(file_dir, 'directdomains.txt') data_source = data_source_manager.get_source(*sys.argv) if parse_set_proxy(data_source) is None: txt = txt1 if '-u' in sys.argv else txt2 download_domains_as_txt(txt, data_source) sys.exit(0) Tips2 = ''' *********************************************** * 请选择数据来源,可多选: * * felixonmars ------ 按 1 * * 保存 apple 数据 -- 按 7 * * 全部 ---------- 按 8 * * 测试空白列表 -- 按 9 * * 退出 ---------- 按 0 * *********************************************** '''
hk 保存香港数据 --17mon 使用 17mon 数据源 --gaoyifan 使用 gaoyifan 数据源 --all 使用以上全部数据源 指定数据源并配合以下参数时不会进入交互模式,适用于自动/无人职守模式 -d 跳过代理设置使用直连,使用参数 "-p" 时参数 "-d" 无效 -p 主机名(IP 或域名):端口 非交互模式使用 HTTP 代理,无效地址或无法链接代理时会直接结束脚本 ''') ipdb1 = direct_ipdb ipdb2 = os.path.join(file_dir, 'directip.db') data_source = data_source_manager.get_source(*sys.argv) if parse_set_proxy(data_source): data_source = 0 if data_source: ipdb = ipdb1 if '-u' in sys.argv else ipdb2 download_cniplist_as_db(ipdb, data_source) sys.exit(0) Tips2 = ''' *********************************************** * 请选择数据来源,可多选: * * APNIC --------- 按 1 * * 17mon --------- 按 2 * * gaoyifan ------ 按 3 * * 全部 ---------- 按 6 * * 保存澳门数据 -- 按 7 * * 保存香港数据 -- 按 8 *
-u 下载的证书文件不放入脚本目录而是更新到相邻的 cert/cacerts 目录 交互模式下参数 "-u" 无效 指定可用数据源,交互模式中无效 --all 更新所有证书数据源 指定数据源并配合以下参数时不会进入交互模式,适用于自动/无人职守模式 -d 跳过代理设置使用直连,使用参数 "-p" 时参数 "-d" 无效 -p 主机名(IP 或域名):端口 非交互模式使用 HTTP 代理,无效地址或无法链接代理时会直接结束脚本 ''') if parse_set_proxy(int('--all' in sys.argv)) is None: for ds in (ds_GOOGLE, ds_MOZILLA): if '-u' not in sys.argv: ds.path = os.path.basename(ds.path) _update(ds) sys.exit(0) import copy while True: if '-u' in sys.argv: cwd = 0 else: cwd = select_path(0, 1) if cwd is None: continue dss = copy.deepcopy((ds_GOOGLE, ds_MOZILLA))