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

不支持本地Hysteria2链接 #8

Closed
kj54321 opened this issue Oct 7, 2023 · 2 comments
Closed

不支持本地Hysteria2链接 #8

kj54321 opened this issue Oct 7, 2023 · 2 comments

Comments

@kj54321
Copy link

kj54321 commented Oct 7, 2023

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
Copy link
Owner

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

install install

@kj54321
Copy link
Author

kj54321 commented Oct 7, 2023

谢谢,暂时只能模板2

@kj54321 kj54321 closed this as completed Oct 7, 2023
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

2 participants