Toperlock / sing-box-subscribe

https://sing-box-subscribe-doraemon.vercel.app
1.78k stars 1.73k forks source link

不支持本地Hysteria2链接 #8

Closed kj54321 closed 11 months ago

kj54321 commented 11 months ago

RT 问题复现:

  1. 创建本地文件 local.txt cat local.txt hysteria2://123@[xxxx:xxxx:xxxx:3::4c]:443/?insecure=1&sni=mydomain

  2. 编辑 providers.json cat providers.json { "subscribes":[ { "url": "./local.txt", "tag": "机场1", "enabled": true, "emoji": 1, "prefix": "" }, { "url": "./local2.txt", "tag": "机场2", "enabled": false, "emoji": 0, "prefix": "❤️机场前缀 - " } ], "auto_set_outbounds_dns":{ "proxy": "", "direct": "" }, "save_config_path": "./config.json", "auto_backup": false, "exlude_protocol":"", "User-Agent":"" }

  3. 运行 main.py python3 main.py /usr/lib/python3/dist-packages/paramiko/transport.py:236: CryptographyDeprecationWarning: Blowfish has been deprecated "class": algorithms.Blowfish, 1、config_template_groups_tun 2、config_template_no_groups_tun 3、config_template_tun 4、config_template_tun_2 输入序号,载入对应config模板(直接回车默认选第一个配置模板):1 处理./local.txt 发现 🌌 Google 出站下的节点数量为 0 ,会导致sing-box无法运行,请检查config模板是否正确。 Traceback (most recent call last): File "/home/kj54321/Downloads/sing-box-subscribe/main.py", line 420, in <module> final_config = combin_to_config(config,nodes) File "/home/kj54321/Downloads/sing-box-subscribe/main.py", line 340, in combin_to_config config_path = json.loads(temp_json_data).get("save_config_path", "config.json") File "/usr/lib/python3.10/json/__init__.py", line 339, in loads raise TypeError(f'the JSON object must be str, bytes or bytearray, ' TypeError: the JSON object must be str, bytes or bytearray, not NoneType

Toperlock commented 11 months ago

请选择no_groups模板。因为config_template_groups_tun模板里面有分组筛选节点名称,分组没筛选到节点会报错。 hysteria2://123@[xxxx:xxxx:xxxx:3::4c]:443/?insecure=1&sni=mydomain转换效果见图二

install install
kj54321 commented 11 months ago

谢谢,暂时只能模板2