Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
modify instructions for use
Browse files Browse the repository at this point in the history
  • Loading branch information
Toperlock committed Jan 20, 2024
1 parent bf0dc62 commit 91174c9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 24 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 操作说明去看[英文文档](https://github.com/Toperlock/sing-box-subscribe/blob/main/instructions/README.md),中文文档操作说明不再提供

### sing-box 1.8.0+ 已发布,配置需要修改。已上传rule_set模板,并且默认生成最新配置文件适配 sing-box 1.8.0。用旧版singbox请选择`config_template_groups_tun.json`模板
### sing-box 1.8.0+ 已发布,配置需要修改。已上传rule_set模板,并且默认生成最新配置文件适配 sing-box 1.8.0。~~用旧版singbox请选择`config_template_groups_tun.json`模板~~(已删除旧版配置模板)

### 使用 `/config/URL` 可以后面添加 `/&file=2` 参数选择 `config_template_groups_tun.json` 模板。两条订阅的形式也可以后面加 `/&file=2` 参数
### 使用 `/config/URL` 可以后面添加 `/&file=2` 参数选择 `config_template_groups_v6_rule_set_tun` 模板。两条订阅的形式也可以后面加 `/&file=2` 参数

### 根据已有的qx,surge,loon,clash规则列表自定义规则集[https://github.com/Toperlock/sing-box-geosite](https://github.com/Toperlock/sing-box-geosite)

Expand Down
36 changes: 21 additions & 15 deletions instructions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ It is not suitable for people who are completely unfamiliar with the sing-box co

Please refer to: [http://sing-box.sagernet.org/configuration](http://sing-box.sagernet.org/configuration/).

## The SSR protocol script is not parsed by default. If the subscription link contains the SSR protocol, an error will be reported.
**The SSR protocol script is not parsed by default. If the subscription link contains the SSR protocol, an error will be reported!!!**

## The upper limit of the vecel server's processing time is 10 seconds. If the clash file is too large, it will fail due to processing timeout.
**The upper limit of the vecel server's processing time is 10 seconds. If the clash file is too large, it will fail due to processing timeout!!!**

## Feature

Expand All @@ -21,7 +21,7 @@ For example, the website I built [https://sing-box-subscribe.vercel.app](https:/
> Enter a link in this format in sing-box, you may need to add `url=` in front of `URL_LINK`
```
https://xxxxxxx.vercel.app/config/url=https://xxxxxxsubscribe?token=123456/&file=https://github.com/Toperlock/sing-box-subscribe/raw/main/config_template/config_template_groups_tun.json
https://xxxxxxx.vercel.app/config/url=https://xxxxxxsubscribe?token=123456/&file=https://github.com/Toperlock/sing-box-subscribe/raw/main/config_template/config_template_groups_rule_set_tun.json
```

### 2023.10.26 Update: Support adding `emoji`, `tag`, `prefix`, `ua`, `file` parameters after the link. Use `&` to connect multiple parameters. The usage is the same as the parameters in `providers.json`
Expand All @@ -30,7 +30,7 @@ https://xxxxxxx.vercel.app/config/url=https://xxxxxxsubscribe?token=123456/&file

The above example shows: enable emoji, add ♥ before the node name, use v2rayng user agent, and use `https://xxxxxxxxx.json` as the generated sing-box configuration template

Example: https://sing-box-subscribe.vercel.app/config/https://gist.githubusercontent.com/Toperlock/b1ca381c32820e8c79669cbbd85b68ac/raw/dafae92fbe48ff36dae6e5172caa1cfd7914cda4/gistfile1.txt/&file=https://github.com/Toperlock/sing-box-subscribe/raw/main/config_template/config_template_groups_tun.json
Example: https://sing-box-subscribe.vercel.app/config/https://gist.githubusercontent.com/Toperlock/b1ca381c32820e8c79669cbbd85b68ac/raw/dafae92fbe48ff36dae6e5172caa1cfd7914cda4/gistfile1.txt/&file=https://github.com/Toperlock/sing-box-subscribe/raw/main/config_template/config_template_groups_rule_set_tun.json

### 2023.11.04 Update: Two sub links can be processed, the format is: `/config/URL encoding`, `emoji`, `tag`, `prefix`, `UA` parameters cannot be written (supports 3 sub links by 2024.1.1)

Expand All @@ -46,9 +46,9 @@ Example: https://sing-box-subscribe.vercel.app/config/https%3A%2F%2Fgist.githubu

Example: https://sing-box-subscribe.vercel.app/config/https://gist.githubusercontent.com/Toperlock/b1ca381c32820e8c79669cbbd85b68ac/raw/dafae92fbe48ff36dae6e5172caa1cfd7914cda4/gistfile1.txt/&file=2

### 2023.11.30 Update: sing-box 1.8.0+ has been released, the configuration needs to be modified. The `rule_set` template has been uploaded, and the latest configuration file is generated by default to adapt to sing-box 1.8.0. If you use the old version of sing-box, please choose the `config_template_groups_tun.json` template.
### 2023.11.30 Update: sing-box 1.8.0+ has been released, the configuration needs to be modified. The `rule_set` template has been uploaded, and the latest configuration file is generated by default to adapt to sing-box 1.8.0. If you use the old version of sing-box, ~~please choose the `config_template_groups_tun.json` template~~.(Configurations below version 1.8 have been cancelled.)

Use `/config/URL` to add the `/&file=2` parameter to select the `config_template_groups_tun.json` template. The form of two sublinks can also be followed by the `/&file=2` parameter.
Use `/config/URL` to add the `/&file=2` parameter to select the `config_template_groups_v6_rule_set_tun.json` template. The form of two sublinks can also be followed by the `/&file=2` parameter.

### Demo video

Expand Down Expand Up @@ -184,23 +184,29 @@ For Windows systems, it's recommended to add the commands to a batch program for

Before using, make sure to edit the `providers.json` file and the `.json` template files in the `config_template` directory.

A lazy configuration `config_template_groups_tun` file is included, which allows filtering nodes based on different categories:
A lazy configuration `config_template_groups_rule_set_tun` file is included, which allows filtering nodes based on different categories:
* Implement `Openai` routing rules
* Implement `Youtube` routing rules
* Implement `Google` routing rules
* Implement `Github` routing rules
* Implement `Telegram` routing rules
* Implement `Twitter` routing rules
* Implement `Facebook` routing rules
* Implement `Amazon` routing rules
* Implement `Instagram` routing rules
* Implement `Bilibili` routing rules
* Implement `Bahamut` routing rules
* Implement `Spotify` routing rules
* Implement `TikTok` routing rules
* Implement `Netflix` routing rules
* Implement `Disney+` routing rules
* Implement `Apple` routing rules
* Implement `Amazon` routing rules
* Implement `Microsoft` routing rules
* Implement `Game` routing rules
* Implement `Bilibili` routing rules
* Implement `Youtube` routing rules
* Implement `Netflix` routing rules
* Implement `Hbo` routing rules
* Implement `Disney` routing rules
* Implement `Prime Video` routing rules


# providers.json File
In this file, you can add subscription links and basic settings.
```json
Expand All @@ -209,7 +215,7 @@ In this file, you can add subscription links and basic settings.
{
"url": "https://4gviet.com/api/v1/client/subscribe?token=xx",
"tag": "airport1_tag", //You can keep the default without modification
"enabled": true,
"enabled": true, //Enable conversion of this link
"emoji": 1, //Add flag emoji
"subgroup": "",
"prefix": "", //Do not add node name prefix
Expand All @@ -218,7 +224,7 @@ In this file, you can add subscription links and basic settings.
{
"url": "https://5gtocdocao.com/api/v1/client/subscribe?token=xx",
"tag": "airport2_tag", //You can keep the default without modification
"enabled": false,
"enabled": false, //Disable conversion of this link
"emoji": 0, //Do not add flag emoji
"subgroup": "named", //Name the subscription link
"prefix": "❤️node_name prefix - ", //Add node name prefix
Expand All @@ -231,7 +237,7 @@ In this file, you can add subscription links and basic settings.
},
"save_config_path": "./config.json",
"auto_backup": false,
"exclude_protocol": "ssr", //Not parsing ssr nodes
"exclude_protocol": "ssr", //Not parsing ssr nodes!!!
"config_template": "", //Customize the correct web page json configuration template link
"Only-nodes": false //Output the complete sing-box configuration
}
Expand Down
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def process_subscribes(subscribes):
for subscribe in subscribes:
if 'enabled' in subscribe and not subscribe['enabled']:
continue
if 'sing-box-subscribe.vercel.app' in subscribe['url']:
continue
_nodes = get_nodes(subscribe['url'])
if _nodes and len(_nodes) > 0:
add_prefix(_nodes, subscribe)
Expand Down
14 changes: 7 additions & 7 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,23 @@ <h1>Edit TEMP_JSON_DATA</h1>
</div>
</div>
<div class="config-content">
<h3 style="margin: 8px 0; font-size: 14px;"><a href="https://github.com/Toperlock/sing-box-subscribe#%E9%A1%B5%E9%9D%A2%E6%93%8D%E4%BD%9C%E6%AD%A5%E9%AA%A4" target="_blank" rel="noopener noreferrer">请务必:点击查看操作说明</a></h3>
<h3 style="margin: 8px 0; font-size: 14px;"><a href="https://github.com/Toperlock/sing-box-subscribe/tree/main/instructions#steps-for-page-manipulation" target="_blank" rel="noopener noreferrer">Please be sure to: Click to view operation instructions.</a></h3>
<h3 style="margin: 8px 0; font-size: 14px;"><a href="https://github.com/Toperlock/sing-box-subscribe#%E9%A1%B5%E9%9D%A2%E6%93%8D%E4%BD%9C%E6%AD%A5%E9%AA%A4" target="_blank" rel="noopener noreferrer">请务必:点击查看操作说明!!!</a></h3>
<h3 style="margin: 8px 0; font-size: 14px;"><a href="https://github.com/Toperlock/sing-box-subscribe/tree/main/instructions#steps-for-page-manipulation" target="_blank" rel="noopener noreferrer">Please be sure to: Click to view operation instructions!!!</a></h3>
<h3 style="margin: 8px 0; font-size: 14px;"><a href="https://github.com/Toperlock/sing-box-subscribe#providersjson%E6%96%87%E4%BB%B6" target="_blank" rel="noopener noreferrer">请务必:点击查看参数含义</a></h3>
<h3 style="margin: 8px 0; font-size: 14px;"><a href="https://github.com/Toperlock/sing-box-subscribe/tree/main/instructions#providersjson-file" target="_blank" rel="noopener noreferrer">Please be sure to: Click to view parameter meanings.</a></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="1" data-color="red"><span style="font-weight: bold; color: red; margin: 5px 0; font-size: 14px;">2024-1-10:我的vercel免费套餐容量要被你们占满了,有github账号的请fork本项目使用自己搭建的订阅转换网站,不然后续我会决定关闭此网站</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="2"><span style="font-weight: bold; color: black; margin: 5px 0; font-size: 14px;">前提:在此网页正确填写订阅链接,生成配置失败是因为同一时间别人也在生成配置,导致你填写的内容被复原。建议使用/config/URL的形式</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="3" data-color="red"><span style="font-weight: bold; color: red; margin: 5px 0; font-size: 14px;">“groups_rule_set_tun.json”模板是给 sing-box 1.8.0+ 使用的。旧版sing-box请使用其他模板</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="4"><span style="font-weight: bold; color: black; margin: 5px 0; font-size: 14px;">填写订阅地址在引号 “” 内,注意订阅地址末尾不要有换行,这很容易被忽视!!!(为什么很喜欢填到enable为false的url里面?why????)</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="3" data-color="red"><span style="font-weight: bold; color: red; margin: 5px 0; font-size: 14px;">“groups_rule_set_tun.json”模板是给 sing-box 1.8.0+ 使用的。</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="4"><span style="font-weight: bold; color: black; margin: 5px 0; font-size: 14px;">填写订阅地址在引号 “” 内,注意订阅地址末尾不要有换行,这很容易被忽视!!!(为什么很喜欢填到enable为false的url里面?why????看不懂false的意思吗???</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="5" data-color="red"><span style="font-weight: bold; color: red; margin: 5px 0; font-size: 14px;">提醒: 点击保存后请立即生成配置文件!!!</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="6"><span style="font-weight: bold; color: black; margin: 5px 0; font-size: 14px;">不然别人也会看到你保存的 TEMP_JSON_DATA 内容</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="7" data-color="red"><span style="font-weight: bold; color: red; margin: 5px 0; font-size: 14px;">“订阅地址”是以 "http://" 开头的【包含】节点信息的v2/clash链接或者是以 "vmess://","hysteria2://"... 之类开头的单条URI节点链接,多条URI请在每条末尾添加换行符:\n 代替换行(请你明白json写法规范),也可以填写base64内容</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="8"><span style="font-weight: bold; color: black; margin: 5px 0; font-size: 14px;">机场提供的订阅链接能直接在浏览器打开,这脚本就能使用。请你自行检查是否可以。已屏蔽gitlab链接。不看说明的傻逼玩意</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="8"><span style="font-weight: bold; color: black; margin: 5px 0; font-size: 14px;">机场提供的订阅链接能直接在浏览器打开,这脚本就能使用。请你自行检查是否可以。如果浏览器能打开订阅,但还是转换失败请你放弃使用此项目</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="9" data-color="red"><span style="font-weight: bold; color: red; margin: 5px 0; font-size: 14px;">需要特殊环境才能打开的订阅链接,请你在 TEMP_JSON_DATA 修改 "User-Agent" 或者先行把机场订阅链接内容复制到gist里,脚本才会解析成功。或者本地运行脚本</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="10"><span style="font-weight: bold; color: black; margin: 5px 0; font-size: 14px;">全部都是 SSR 协议会报错,或者请删掉左边方框内 exclude_protocol 引号里面的 ssr 这个三个字符即可</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="10"><span style="font-weight: bold; color: black; margin: 5px 0; font-size: 14px;">全部都是 SSR 协议会报错,或者请删掉左边方框内 exclude_protocol 引号里面的 ssr 这个三个字符即可!!!!!!</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="11" data-color="red"><span style="font-weight: bold; color: red; margin: 5px 0; font-size: 14px;">机场订阅里有hy2新协议,请修改 "User-Agent" 为:clashmeta。球球你了,别塞文件大于1MB的clash,你只需要保留proxies字段,别写那破鸡巴规则了,vercel服务器解析超时了懂吗老弟</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="12"><span style="font-weight: bold; color: black; margin: 5px 0; font-size: 14px;">以上不是废话,没成功生成配置请你仔细阅读以上内容</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="13" data-color="red"><span style="font-weight: bold; color: red; margin: 5px 0; font-size: 14px;">因为没用数据库,不会返回配置文件链接。生成配置内容后复制到gist里当作 sing-box remote 链接</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="13" data-color="red"><span style="font-weight: bold; color: red; margin: 5px 0; font-size: 14px;">不看说明的都是傻逼,自以为是的大聪明</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;" data-translate="14"><span style="font-weight: bold; color: black; margin: 5px 0; font-size: 14px;">生成配置成功后请不要用第三方输入法复制内容,会有长度限制复制不全</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;"><span style="font-weight: bold; color: red; margin: 5px 0; font-size: 14px;">Một số Link Tiếng Việt không hoạt động với script này, vui lòng chạy nó trên local</span></h3>
<h3 style="margin: 8px 0; font-size: 14px;"><a href="https://github.com/Toperlock/sing-box-subscribe/blob/main/instructions/README.md#-demonstration-video" target="_blank" rel="noopener noreferrer">Video hoạt động</a></h3>
Expand Down

0 comments on commit 91174c9

Please sign in to comment.