misc
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
|
||||
########################
|
||||
# example configuration and wiki #
|
||||
example configuration / documentation
|
||||
########################
|
||||
|
||||
# http://dreamacro.github.io/clash/ >> wiki clash premium
|
||||
# http://https://wiki.metacubex.one/ >> wiki clash meta
|
||||
~[clash premium documentation](http://dreamacro.github.io/clash/)~
|
||||
|
||||
[mihomo documentation](https://wiki.metacubex.one/)
|
||||
@@ -499,7 +499,7 @@ start_box() {
|
||||
# busybox check
|
||||
busybox_code=$(busybox | head -n 1 | busybox awk '{print $2}' | sed -e 's/^v//' -e 's/-osm0sis$//' -e 's/-Magisk$//')
|
||||
if [ "$(echo "${busybox_code}" | busybox awk -F. '{printf "%03d%03d%03d\n", $1, $2, $3}')" -lt "$(echo "1.36.1" | busybox awk -F. '{printf "%03d%03d%03d\n", $1, $2, $3}')" ]; then
|
||||
log info "current busybox version $busybox_code"
|
||||
log Info "Current busybox v${busybox_code}"
|
||||
log Error "Please update your busybox to version 1.36.1+ latest"
|
||||
exit 1
|
||||
fi
|
||||
@@ -557,7 +557,7 @@ start_box() {
|
||||
esac
|
||||
|
||||
# show the current version of busybox
|
||||
log Info "current busybox version $busybox_code"
|
||||
log Info "Current busybox v${busybox_code}"
|
||||
|
||||
# Check permissions, check for bin existence, delete old logs, create a TUN if necessary, run box, and wait for 1 second
|
||||
box_permission
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
|
||||
########################
|
||||
# example configuration and wiki #
|
||||
example configuration / documentation
|
||||
########################
|
||||
|
||||
# http://sing-box.sagernet.org/configuration/
|
||||
# https://gist.github.com/CHIZI-0618/fc3495cd15b3ab3d53c77872ebece8ae
|
||||
# https://gist.github.com/CHIZI-0618/fc3495cd15b3ab3d53c77872ebece8ae
|
||||
# https://github.com/yaotthaha/sing-box-pub/tree/dev-yaott#ruleprovider-支持
|
||||
# https://gist.github.com/CHIZI-0618/fc3495cd15b3ab3d53c77872ebece8ae
|
||||
[sing-box documentation](http://sing-box.sagernet.org/configuration)
|
||||
@@ -26,18 +26,6 @@
|
||||
"outbound": "any",
|
||||
"server": "local",
|
||||
"disable_cache": true
|
||||
},
|
||||
{
|
||||
"type": "logical",
|
||||
"mode": "and",
|
||||
"rules": [
|
||||
{
|
||||
"network": "udp",
|
||||
"port": 443,
|
||||
"geosite": "youtube"
|
||||
}
|
||||
],
|
||||
"server": "rcode"
|
||||
}
|
||||
],
|
||||
"strategy": "prefer_ipv4"
|
||||
@@ -80,38 +68,6 @@
|
||||
{
|
||||
"port": 53,
|
||||
"outbound": "dns"
|
||||
},
|
||||
{
|
||||
"domain_regex": [
|
||||
"^.*adtival.network$",
|
||||
"^.*googlesyndication.com$"
|
||||
],
|
||||
"outbound": "default"
|
||||
},
|
||||
{
|
||||
"ip_cidr": [
|
||||
"0.0.0.0/8",
|
||||
"100.64.0.0/10",
|
||||
"127.0.0.0/8",
|
||||
"192.168.0.0/16",
|
||||
"::/128",
|
||||
"::1/128",
|
||||
"fe80::/10"
|
||||
],
|
||||
"skip_resolve": true,
|
||||
"outbound": "block"
|
||||
},
|
||||
{
|
||||
"type": "logical",
|
||||
"mode": "and",
|
||||
"rules": [
|
||||
{
|
||||
"network": "udp",
|
||||
"port": 443,
|
||||
"geosite": "youtube"
|
||||
}
|
||||
],
|
||||
"outbound": "block"
|
||||
}
|
||||
],
|
||||
"final": "default"
|
||||
@@ -124,4 +80,18 @@
|
||||
"store_selected": true
|
||||
}
|
||||
}
|
||||
// http://sing-box.sagernet.org/configuration/
|
||||
/* Since sing-box 1.8.0
|
||||
"experimental": {
|
||||
"cache_file": {
|
||||
"enabled": true,
|
||||
"path": "cache.db",
|
||||
"store_fakeip": false
|
||||
},
|
||||
"clash_api": {
|
||||
"external_controller": "0.0.0.0:9090",
|
||||
"external_ui": "/data/adb/box/sing-box/dashboard"
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -106,7 +106,7 @@ if [ "${backup_box}" = "true" ]; then
|
||||
restore_config() {
|
||||
config_dir="$1"
|
||||
if [ -d "${temp_dir}/$config_dir" ]; then
|
||||
cp -r "${temp_dir}/$config_dir/"* "/data/adb/box/$config_dir/"
|
||||
cp -rf "${temp_dir}/$config_dir/"* "/data/adb/box/$config_dir/"
|
||||
fi
|
||||
}
|
||||
restore_config "clash"
|
||||
@@ -118,7 +118,7 @@ if [ "${backup_box}" = "true" ]; then
|
||||
kernel_name="$1"
|
||||
if [ ! -f "/data/adb/box/bin/$kernel_name" ] && [ -f "${temp_dir}/bin/$kernel_name" ]; then
|
||||
ui_print "- restore $kernel_name kernel"
|
||||
cp -r "${temp_dir}/bin/$kernel_name" "/data/adb/box/bin/$kernel_name"
|
||||
cp -rf "${temp_dir}/bin/$kernel_name" "/data/adb/box/bin/$kernel_name"
|
||||
fi
|
||||
}
|
||||
restore_kernel "curl"
|
||||
@@ -126,8 +126,8 @@ if [ "${backup_box}" = "true" ]; then
|
||||
restore_kernel "xray"
|
||||
restore_kernel "sing-box"
|
||||
restore_kernel "v2fly"
|
||||
restore_kernel "xclash/clash_meta"
|
||||
restore_kernel "xclash/clash_premium"
|
||||
restore_kernel "xclash/mihomo"
|
||||
restore_kernel "xclash/premium"
|
||||
|
||||
ui_print "- restore logs, pid and uid.list"
|
||||
cp "${temp_dir}/run/"* "/data/adb/box/run/"
|
||||
|
||||
Reference in New Issue
Block a user