mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-02 17:52:19 +00:00
Enhancements
Add basic support for generating sing-box configs. Use cpp-httplib as web server. Optimize codes.
This commit is contained in:
32 files changed
+10286
-234
No files matched your search
@@ -266,3 +266,33 @@ enhanced-mode-by-rule = true
|
||||
}
|
||||
|
||||
{% endif %}
|
||||
{% if request.target == "singbox" %}
|
||||
|
||||
{
|
||||
"log": {
|
||||
"disabled": false,
|
||||
"level": "info",
|
||||
"output": "box.log",
|
||||
"timestamp": true
|
||||
},
|
||||
"dns": {},
|
||||
"ntp": {
|
||||
"enabled": false,
|
||||
"server": "time.apple.com",
|
||||
"server_port": 123,
|
||||
"interval": "30m"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"type": "socks",
|
||||
"tag": "socks-in",
|
||||
"listen": "127.0.0.1",
|
||||
"listen_port": 2080
|
||||
}
|
||||
],
|
||||
"outbounds": [],
|
||||
"route": {},
|
||||
"experimental": {}
|
||||
}
|
||||
|
||||
{% endif %}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"log": {
|
||||
"disabled": false,
|
||||
"level": "info",
|
||||
"output": "box.log",
|
||||
"timestamp": true
|
||||
},
|
||||
"dns": {},
|
||||
"ntp": {
|
||||
"enabled": false,
|
||||
"server": "time.apple.com",
|
||||
"server_port": 123,
|
||||
"interval": "30m"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"type": "socks",
|
||||
"tag": "socks-in",
|
||||
"listen": "127.0.0.1",
|
||||
"listen_port": 2080
|
||||
}
|
||||
],
|
||||
"outbounds": [],
|
||||
"route": {},
|
||||
"experimental": {}
|
||||
}
|
||||
@@ -43,6 +43,9 @@ clash_rule_base=base/forcerule.yml
|
||||
;mellow_rule_base=base/mellow.conf
|
||||
;quan_rule_base=base/quan.conf
|
||||
;quanx_rule_base=base/quanx.conf
|
||||
;loon_rule_base=base/loon.conf
|
||||
;sssub_rule_base=base/shadowsocks_base.json
|
||||
;singbox_rule_base=base/singbox.json
|
||||
|
||||
;Options for renaming nodes
|
||||
;rename=Test-(.*?)-(.*?)-(.*?)\((.*?)\)@\1\4x测试线路_自\2到\3
|
||||
|
||||
@@ -10,6 +10,9 @@ clash_rule_base = "base/forcerule.yml"
|
||||
#mellow_rule_base = "base/mellow.conf"
|
||||
#quan_rule_base = "base/quan.conf"
|
||||
#quanx_rule_base = "base/quanx.conf"
|
||||
#loon_rule_base = "base/loon.conf"
|
||||
#sssub_rule_base = "base/shadowsocks_base.json"
|
||||
#singbox_rule_base = "base/singbox.json"
|
||||
|
||||
# Options for adding emojis
|
||||
#add_emoji = true
|
||||
|
||||
@@ -14,6 +14,9 @@ custom:
|
||||
# mellow_rule_base: base/mellow.conf
|
||||
# quan_rule_base: base/quan.conf
|
||||
# quanx_rule_base: base/quanx.conf
|
||||
# loon_rule_base: base/loon.conf
|
||||
# sssub_rule_base: base/shadowsocks_base.json
|
||||
# singbox_rule_base: base/singbox.json
|
||||
|
||||
# rename_node:
|
||||
# - {import: snippet/rename.txt}
|
||||
|
||||
@@ -26,7 +26,7 @@ exclude_remarks=(到期|剩余流量|时间|官网|产品|平台)
|
||||
enable_filter=false
|
||||
;Script used for filtering nodes. Supports inline script and script path. A "filter" function with 1 argument which is a node should be defined in the script.
|
||||
;Example: Inline script: Set value to content of script. Replace all line break with "\n".
|
||||
; Script path: Set value to "path:/path/to/script.js".
|
||||
; Script path: set value to "path:/path/to/script.js".
|
||||
;filter_script=function filter(node) {\n const info = JSON.parse(node.ProxyInfo);\n if(info.EncryptMethod.includes('chacha20'))\n return true;\n return false;\n}
|
||||
|
||||
;Setting an external config file as default when none is specified, supports local files/URL
|
||||
@@ -59,6 +59,9 @@ loon_rule_base=base/all_base.tpl
|
||||
;Shadowsocks Android config base used by the generator, supports local files/URL
|
||||
sssub_rule_base=base/all_base.tpl
|
||||
|
||||
;sing-box config base used by the generator, supports local files/URL
|
||||
singbox_rule_base=base/all_base.tpl
|
||||
|
||||
;Proxy used to download configs, rulesets or subscriptions, set to NONE or empty to disable it, set to SYSTEM to use system proxy.
|
||||
;Accept cURL-supported proxies (http:// https:// socks4a:// socks5://)
|
||||
;Additional support for CORS proxy ( https://github.com/Rob--W/cors-anywhere https://github.com/Zibri/cloudflare-cors-anywhere etc.), prefix the address with "cors:" to recognize the address as CORS proxy.
|
||||
@@ -237,6 +240,7 @@ clash.log_level=info
|
||||
/mellow=/sub?target=mellow
|
||||
/surfboard=/sub?target=surfboard
|
||||
/loon=/sub?target=loon
|
||||
/singbox=/sub?target=singbox
|
||||
/ss=/sub?target=ss
|
||||
/ssd=/sub?target=ssd
|
||||
/sssub=/sub?target=sssub
|
||||
|
||||
@@ -25,8 +25,8 @@ exclude_remarks = ["(到期|剩余流量|时间|官网|产品)"]
|
||||
# Enable script support for filtering nodes
|
||||
enable_filter = false
|
||||
# Script used for filtering nodes. Supports inline script and script path. A "filter" function with 1 argument which is a node should be defined in the script.
|
||||
# Example: Inline script: Set value to content of script.
|
||||
# Script path: Set value to "path:/path/to/script.js".
|
||||
# Example: Inline script: set value to content of script.
|
||||
# Script path: set value to "path:/path/to/script.js".
|
||||
#filter_script = '''
|
||||
#function filter(node) {
|
||||
# const info = JSON.parse(node.ProxyInfo);
|
||||
@@ -66,6 +66,9 @@ loon_rule_base = "base/all_base.tpl"
|
||||
# Shadowsocks Android config base used by the generator, supports local files/URL
|
||||
sssub_rule_base = "base/all_base.tpl"
|
||||
|
||||
# sing-box config base used by the generator, supports local files/URL
|
||||
singbox_rule_base = "base/all_base.tpl"
|
||||
|
||||
# Proxy used to download rulesets or subscriptions, set to NONE or empty to disable it, set to SYSTEM to use system proxy.
|
||||
# Accept cURL-supported proxies (http:// https:// socks4a:// socks5://)
|
||||
|
||||
@@ -266,6 +269,10 @@ target = "/sub?target=surfboard"
|
||||
uri = "/loon"
|
||||
target = "/sub?target=loon"
|
||||
|
||||
[[aliases]]
|
||||
uri = "/singbox"
|
||||
target = "/sub?target=singbox"
|
||||
|
||||
[[aliases]]
|
||||
uri = "/ss"
|
||||
target = "/sub?target=ss"
|
||||
|
||||
@@ -19,6 +19,7 @@ common:
|
||||
quanx_rule_base: base/all_base.tpl
|
||||
loon_rule_base: base/all_base.tpl
|
||||
sssub_rule_base: base/all_base.tpl
|
||||
singbox_rule_base: base/all_base.tpl
|
||||
proxy_config: SYSTEM
|
||||
proxy_ruleset: SYSTEM
|
||||
proxy_subscription: NONE
|
||||
@@ -116,6 +117,7 @@ aliases:
|
||||
- {uri: /mellow, target: "/sub?target=mellow"}
|
||||
- {uri: /surfboard, target: "/sub?target=surfboard"}
|
||||
- {uri: /loon, target: "/sub?target=loon"}
|
||||
- {uri: /singbox, target: "/sub?target=singbox"}
|
||||
- {uri: /ss, target: "/sub?target=ss"}
|
||||
- {uri: /ssd, target: "/sub?target=ssd"}
|
||||
- {uri: /sssub, target: "/sub?target=sssub"}
|
||||
|
||||
Reference in new issue
Block a user