Git Product home page Git Product logo

box_for_magisk's People

Contributors

actions-user avatar armv7a avatar bugme2 avatar chadgreen01 avatar code-dramatist avatar cxyzzz avatar dependabot-preview[bot] avatar easternday avatar flyflas avatar github-actions[bot] avatar jeelsboobz avatar maskedeken avatar meiweijia avatar nep-timeline avatar poweran2020 avatar renovate[bot] avatar riffchz avatar rockxsj avatar sandatjepil avatar sinoobie avatar taamarin avatar tearmoon avatar tw4452852 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

box_for_magisk's Issues

[bug汇报] 启动后手机异常耗电

miui 13.0.14 (kernelSU)
说实话我不知道是不是miui问题
无论在流量还是wifi下耗电均是客户端的数倍甚至数十倍,且这个情况在box4中也存在

1.已分应用代理所需应用。
2.确定是使用该模块产生的耗电量(已排除产生大量数据传输导致的耗电,在使用例如nekobox客户端时没有这么大的耗电)。
3.已尝试关闭ipv6。
4.使用sing-box和xray内核均有此情况。
5.已尝试切换小核来运行sing-box。

入站设置:

"inbounds": [
{
"type": "tproxy",
"tag": "tproxy-in",
"listen": "::",
"listen_port": 9898,
"sniff": true,
"sniff_override_destination": false
}
],

路由设置:

"route": {
"auto_detect_interface": false,
"rules": [
{
"outbound": "dns-out",
"port": [
53
]
},
{
"domain_suffix": [
"api.installer.xiaomi.com",
"appcenter.ms",
"app-measurement.com",
"firebase.io",
"crashlytics.com",
"google-analytics.com"
],
"outbound": "block"
},
{
"domain_suffix": [
"googleapis.cn"
],
"outbound": "proxy"
},
{
"geosite": [
"cn"
],
"outbound": "bypass"
},
{
"geoip": [
"cn"
],
"outbound": "bypass"
},
{
"geoip": [
"private"
],
"outbound": "bypass"
},
{
"ip_cidr": [
"224.0.0.0/3",
"ff00::/8"
],
"outbound": "block",
"source_ip_cidr": [
"224.0.0.0/3",
"ff00::/8"
]
}
]
}
6fa6e79ff32151df206e3dac51c60e9f

开启IPv6会导致DNS泄露

使用Box For Magisk并开启IPv6会导致DNS出现泄露问题,使用Clash For Magisk未出现泄露问题

如何升级busybox

启动时提示我
11:19 am [Info]: Current busybox v1.34.1
11:19 am [Error]: Please update your busybox to version 1.36.1+ latest
要求busybox升级
必须要升级吗

ipv6 问题

问题:
在安装box for magisk 之后。WiFi的ipv6变为了内网地址(fe开头)。在卸载box for magisk 之后,WiFi可以正常获得公网ipv6。配置文件已经开启ipv6。

配置:

# setting.ini
ipv6="true"
# clash meta 配置
ipv6: true

版本:
box for magisk: v1.3.0
clash meta: v1.15.1

请求添加放行ipv6

我看了脚本要么只能关闭ipv6,要么只能代理ipv6,不能放行ipv6直连?

box.tool更新的问题,

在MIUI14上使用box.tool更新时,无法更新下载对应的资源,能否更改为使用curl进行下载相关资源?

谷歌商店和网页端的控制面板打不开,edge浏览器可以代理上

你好,我的设备是红米k30pro,系统版本MIUI14.0.3稳定版,浏览器打开ip234.in发现可以代理上,但是谷歌商店打不开,网页端的控制面板也打不开,试过0.5.1和0.7版本都不行,之前用0.2.1和0.5.1都是没问题,但是昨天重装系统之后就一直存在这个问题

Screenshot_2023-04-12-23-46-59-051_com google android gms
Screenshot_2023-04-12-23-41-04-725_com microsoft emmx

运行日志里面前段都是error,后段应该是正常的,不知道怎么上传日志文件,放几张截图吧

Screenshot_2023-04-13-00-02-32-146_bin mt plus
Screenshot_2023-04-13-00-02-39-385_bin mt plus
Screenshot_2023-04-13-00-04-39-142_bin mt plus
Screenshot_2023-04-13-00-04-51-833_bin mt plus
Screenshot_2023-04-13-00-04-55-848_bin mt plus

iptables 报错

/data/adb/box/scripts/box.iptables enable
18:41 [info]: use TPROXY: TCP + UDP.
18:41 [info]: creating iptables transparent proxy rules.
18:41 [info]: softap+ wlan+ swlan+ ap+ rndis+ transparent proxy.
18:41 [info]: transparent proxy for all apps.
"ptables v1.8.7 (legacy): REDIRECT: Bad value for "--to-ports" option: "1053
Try iptables -h' or 'iptables --help' for more information. "ptables v1.8.7 (legacy): REDIRECT: Bad value for "--to-ports" option: "1053 Try iptables -h' or 'iptables --help' for more information.
18:41 [info]: create iptables transparent proxy rules done.
18:41 [warn]: disable IPv6.
18:41 [info]: clash connected.

关于绕过WiFi

希望增加绕过指定WiFi名称的设置,家里有软路由想绕过家里的AP在连其他AP希望走代理,我看模块有个配置好像只能绕过网卡

vowifi drops after box proxy on

After turn on the transparent proxy, the wifi calling drops, tested on Tproxy and Mixed mode, is there any way to make the wifi calling work?

clash无了

今天clash core和clash for window,都删库了

Can't turn on TUN,Start TUN listening error: build android rules: read packages list: invalid interned reference: 65280, exists: 35

Version: 1.4.3
Core: mihomo
phone: meizu20pro
network_mode="mixed"
tun=true
issue= tun mode can't turn on,error show as log below。and the entire device cannot connect to the network.
checked: command "ifconfig" not found "utun" or "tun*",/dev/net/tun dynamic link is correctly established.

run log:

08:49 pm [Info]: Good day
08:49 pm [Info]: xclash [ mihomo ] setup completed
08:49 pm [Info]: Current busybox v1.36.1
08:49 pm [Info]: Using kernel in /data/adb/box/bin/clash.
08:49 pm [Info]: Mihomo Meta alpha-ee6b974 android arm64 with go1.20.11 Tue Dec  5 12:31:26 UTC 2023
Use tags: with_gvisor
08:49 pm [Info]: deleting and backup logs
08:49 pm [Info]: crontab disabled.
08:49 pm [Info]: client-list: [ clash sing-box xray v2fly ]
08:49 pm [Info]: choose: clash, start the service.
08:49 pm [Info]: config /data/adb/box/clash/config.yaml
08:49 pm [Info]: type (tun) already exists in /data/adb/box/clash/config.yaml
08:49 pm [Info]: clash service is running.
08:49 pm [Info]: Proxy-mode: blacklist, Network-mode: mixed
08:49 pm [Info]: clash has started with the 'root:net_admin' user group.
08:49 pm [Info]: clash status: S (sleeping) (PID: 8812)
08:49 pm [Info]: clash memory usage: 70 MB, swap: 0 KB
08:49 pm [Info]: clash CPU usage: 28.1%
08:49 pm [Info]: clash list of allowed CPUs : 0-7 
08:49 pm [Info]: clash Which CPU running on : 3
08:49 pm [Info]: battery temperature: 32°C
08:49 pm [Info]: clash running time: 0:04
08:49 pm [Debug]: enhanced-mode: redir-host, fake-ip-range: 198.18.0.1/16, listen-port: 1053, mode: rule
08:49 pm [Info]: Using Mixed: tcp(redirect) + udp(tun).
08:49 pm [Info]: Creating iptables transparent proxy rules.
08:49 pm [Info]: ap+ wlan+ rndis+ swlan+ transparent proxy.
08:49 pm [Info]: Transparent proxy for all apps.
08:49 pm [Info]: Creating iptables transparent proxy rules done.
08:49 pm [Warning]: Disabling IPv6.
08:49 pm [Warning]: tun_device: 'utun' not found
08:49 pm [Info]: clash connected.

Clash.log:

45773705Z] Start initial configuration in progress      
�[36mINFO�[0m[2023-12-05T12:49:49.746585059Z] Geodata Loader mode: memconservative         
�[36mINFO�[0m[2023-12-05T12:49:49.751334643Z] Start initial GeoIP rule private => 🎯 全球直连, records: 18 
�[36mINFO�[0m[2023-12-05T12:49:49.860967924Z] Start initial GeoSite rule private => 🎯 全球直连, records: 136 
�[36mINFO�[0m[2023-12-05T12:49:49.938307612Z] Start initial GeoSite rule category-ads-all => 🍃 广告过滤, records: 66019 
�[36mINFO�[0m[2023-12-05T12:49:49.958445476Z] Start initial GeoSite rule geolocation-!cn => 🚀 节点选择, records: 19340 
�[36mINFO�[0m[2023-12-05T12:49:49.964131674Z] Start initial GeoIP rule !CN => 🚀 节点选择, records: 10537 
�[36mINFO�[0m[2023-12-05T12:49:49.964314226Z] Initial configuration complete, total time: 218ms 
�[36mINFO�[0m[2023-12-05T12:49:49.965173861Z] RESTful API listening at: [::]:9090          
�[36mINFO�[0m[2023-12-05T12:49:50.020001101Z] Sniffer is closed                            
�[36mINFO�[0m[2023-12-05T12:49:50.020024486Z] Use tcp concurrent                           
�[36mINFO�[0m[2023-12-05T12:49:50.020283861Z] DNS server listening at: [::]:1053           
�[36mINFO�[0m[2023-12-05T12:49:50.020552299Z] Redirect proxy listening at: [::]:9797       
�[36mINFO�[0m[2023-12-05T12:49:50.020695476Z] Mixed(http+socks) proxy listening at: [::]:7890 
�[33mWARN�[0m[2023-12-05T12:49:50.021631153Z] [TUN] default interface changed by monitor,  => wlan0 
�[31mERRO�[0m[2023-12-05T12:49:50.026778445Z] Start TUN listening error: build android rules: read packages list: invalid interned reference: 65280, exists: 35 
�[33mWARN�[0m[2023-12-05T12:53:14.849426023Z] [TCP] dial 🎯 全球直连 (match Match/) 10.3.235.194:48716 --> 124.70.116.158:5223 error: dial tcp 124.70.116.158:5223: i/o timeout 
�[33mWARN�[0m[2023-12-05T12:53:14.986298627Z] [TCP] dial 🎯 全球直连 (match RuleSet/Tencent) 10.3.235.194:45948 --> dns.weixin.qq.com.cn:443 error: dial tcp 116.130.224.205:443: i/o timeout
dial tcp 111.206.147.210:443: i/o timeout
dial tcp 116.130.224.150:443: i/o timeout
dial tcp 60.28.172.100:443: i/o timeout
dial tcp 111.206.147.156:443: i/o timeout
dial tcp 111.206.148.27:443: i/o timeout 
�[33mWARN�[0m[2023-12-05T12:53:15.032235137Z] [TCP] dial 🎯 全球直连 (match Match/) 10.3.235.194:39418(com.tencent.mm, uid=10207) --> 157.255.209.167:80 error: dial tcp 157.255.209.167:80: i/o timeout 
�[33mWARN�[0m[2023-12-05T12:53:16.022459772Z] [TCP] dial 🎯 全球直连 (match Match/) 10.3.235.194:40464(com.tencent.mm, uid=10207) --> 157.255.191.75:80 error: dial tcp 157.255.191.75:80: i/o timeout 
�[33mWARN�[0m[2023-12-05T12:53:16.828463835Z] [TCP] dial 🎯 全球直连 (match RuleSet/Tencent) 10.3.235.194:37392 --> h.trace.qq.com:443 error: dial tcp 116.162.34.57:443: i/o timeout
dial tcp 116.162.34.122:443: i/o timeout 
�[33mWARN�[0m[2023-12-05T12:53:17.546451751Z] [TCP] dial 🎯 全球直连 (match Match/) 10.3.235.194:49052(com.tencent.mm, uid=10207) --> 157.255.191.88:443 error: dial tcp 157.255.191.88:443: i/o timeout 
�[33mWARN�[0m[2023-12-05T12:53:17.916480449Z] [TCP] dial 🎯 全球直连 (match Match/) 10.3.235.194:47790 --> 157.148.47.172:8002 error: dial tcp 157.148.47.172:8002: i/o timeout 
�[33mWARN�[0m[2023-12-05T12:53:20.04150899Z] [TCP] dial 🎯 全球直连 (match Match/) 10.3.235.194:43070(com.tencent.mm, uid=10207) --> 157.255.209.219:80 error: dial tcp 157.255.209.219:80: i/o timeout 
�[33mWARN�[0m[2023-12-05T12:53:21.839872739Z] [TCP] dial 🎯 全球直连 (match RuleSet/Tencent) 10.3.235.194:37820 --> h.trace.qq.com:443 error: dial tcp 116.162.34.122:443: i/o timeout
dial tcp 116.162.34.57:443: i/o timeout 
�[33mWARN�[0m[2023-12-05T12:53:22.558255082Z] [TCP] dial 🎯 全球直连 (match Match/) 10.3.235.194:38466(com.tencent.mm, uid=10207) --> 157.255.209.167:443 error: dial tcp 157.255.209.167:443: i/o timeout 
�[33mWARN�[0m[2023-12-05T12:53:23.082151124Z] [TCP] dial 🎯 全球直连 (match RuleSet/Tencent) 10.3.235.194:44446 --> dns.weixin.qq.com.cn:80 error: dial tcp 60.28.172.100:80: i/o timeout
dial tcp 111.206.147.210:80: i/o timeout
dial tcp 111.206.147.156:80: i/o timeout
dial tcp 111.206.148.27:80: i/o timeout
dial tcp 116.130.224.205:80: i/o timeout
dial tcp 116.130.224.150:80: i/o timeout 
�[33mWARN�[0m[2023-12-05T12:53:23.083489041Z] [TCP] dial 🎯 全球直连 (match Match/) 10.3.235.194:49700(com.tencent.mm, uid=10207) --> 157.148.49.105:80 error: dial tcp 157.148.49.105:80: i/o timeout 
�[33mWARN�[0m[2023-12-05T12:53:25.058747425Z] [TCP] dial 🎯 全球直连 (match Match/) 10.3.235.194:46612(com.tencent.mm, uid=10207) --> 157.255.191.88:80 error: dial tcp 157.255.191.88:80: i/o timeout 
�[33mWARN�[0m[2023-12-05T12:53:27.570720549Z] [TCP] dial 🎯 全球直连 (match Match/) 10.3.235.194:43210(com.tencent.mm, uid=10207) --> 183.47.122.25:8080 error: dial tcp 183.47.122.25:8080: i/o timeout 

config.yaml:

redir-port: 9797
mixed-port: 7890
tproxy-port: 9898
mode: rule
allow-lan: true
unified-delay: false
tcp-concurrent: true
enable-process: true
find-process-mode: strict
bind-address: '*'
log-level: debug
ipv6: false

external-controller: 0.0.0.0:9090
external-ui: /data/adb/box/clash/dashboard
secret: ""
#external-ui-url: "https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip"
#面板可选,打开dashboard文件夹自行查看和修改
#interface-name: tun0   #出口网卡名称 可用来桥接VPN类软件
geodata-mode: true
geox-url:
  geoip: "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat"
  geosite: "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat"
  mmdb: "https://raw.githubusercontent.com/Loyalsoldier/geoip/release/Country.mmdb"
  
geo-auto-update: true # 是否自动更新 geodata
geo-update-interval: 1 # 更新间隔,单位:小时
  
profile:
  store-selected: true
  store-fake-ip: true

sniffer:
  enable: false
  sniff:
    TLS:
      ports: [443, 8443]
    HTTP:
      ports: [80, 8080-8880]
      override-destination: true

tun:
  enable: true
  device: utun
  stack: system
  #可切换# gvisor / lwip / system
  dns-hijack:
    - any:53
    - tcp://any:53
  auto-route: true
  auto-detect-interface: true
  strict-route: false
  include-android-user: [0, 10]

dns:
  enable: true
  listen: 0.0.0.0:1053
  prefer-h3: true
  ipv6: false
  enhanced-mode: redir-host #fake-ip
  use-hosts: true 
  fake-ip-range: 198.18.0.1/16
  fake-ip-filter:
    - localhost.ptlogin2.qq.com
    - '*.lan'
    - '*.linksys.com'
    - '*.ntp.*'
  nameserver:
    - https://223.5.5.5/dns-query
    - https://120.53.53.53/dns-query
  proxy-server-nameserver:
    - https://120.53.53.53/dns-query
    - https://223.5.5.5/dns-query
  namesever-policy:
    "geosite:cn,private,googlefcm":
      - https://223.5.5.5/dns-query
      - https://120.53.53.53/dns-query
    "rule-set:GoogleFCM": 
      - https://223.5.5.5/dns-query
      - https://120.53.53.53/dns-query
    "rule-set:userDirect": 
      - https://223.5.5.5/dns-query
      - https://120.53.53.53/dns-query
    "geosite:geolocation-!cn":
      - https://8.8.4.4/dns-query#DNS
      - https://1.0.0.1/dns-query#DNS
    "geoip:!cn":
      - https://8.8.4.4/dns-query#DNS
      - https://1.0.0.1/dns-query#DNS
    "rule-set:userProxy": 
      - https://223.5.5.5/dns-query#DNS
      - https://120.53.53.53/dns-query#DNS
proxies:
p: &p
  type: http
  interval: 1800
  health-check:
    enable: true
    url: http://www.gstatic.com/generate_204
    interval: 120
fb: &fb
  type: fallback
  url: http://www.gstatic.com/generate_204
  interval: 180
  tolerance: 30
  use:
    - EFcloud
    - Free
s: &s
  type: select
  use:
    - EFcloud
    - Free
t: &t
  type: url-test
  url: http://www.gstatic.com/generate_204
  interval: 120
  tolerance: 30
  use:
    - EFcloud
    - Free
pr: &pr
  type: select
  proxies:
    - 🚀 节点选择
    - ♻️ 自动选择
    - 🇸🇬 新加坡节点
    - 🇭🇰 香港节点
    - 🇨🇳 **节点
    - 🇯🇵 日本节点
    - 🇺🇲 美国节点
    - 🏳️‍🌈 原生/解锁
    - 🏳️‍⚧️ 其他地区
    - 专线
    - 直连
    - PASS
c: &c
  type: http
  behavior: classical
  interval: 86400
f: &f
  type: file
  behavior: classical
#——————————————————————————————————————————————————
proxy-providers:
  EFcloud:
    <<: *p
    url: ""
    path: ./provide/EFcloud.yaml
  Free:
    <<: *p
    url: "https://jetstream.site/api/v1/public/services/41618/55d7412e848eedfb93100a9c56f570f8?client=clash"
    path: ./provide/free.yaml
#——————————————————————————————————————————————————
proxy-groups:
  - name: DNS
    type: select
    proxies:
      - 🇺🇲 美国节点
      - 🇯🇵 日本节点
      - 🇭🇰 香港节点
      - 🇨🇳 **节点
      - 🇸🇬 新加坡节点
      - 🏳️‍⚧️ 其他地区
      - 直连
  - name: 🚀 节点选择
    type: select
    proxies:
      - 🚧 故障转移
      - ♻️ 自动选择
      - 🇸🇬 新加坡节点
      - 🇭🇰 香港节点
      - 🇨🇳 **节点
      - 🇯🇵 日本节点
      - 🇺🇲 美国节点
      - 🏳️‍🌈 原生/解锁
      - 🏳️‍⚧️ 其他地区
      - 专线
      - 直连
  - name: 专线
    filter: "IPLC|IEPL|CN2|GAPN|CUVIP|AIA|iplc|iepl"
    <<: *s
  - name: 🚧 故障转移
    proxies:
        - 🛵 直连节点
        - ♻️ 自动选择
    <<: *fb
  - name: 🛵 直连节点
    filter: "直连|direct"
    <<: *s
  - name: 🏳️‍🌈 原生/解锁
    filter: "原生|解锁"
    <<: *s
  - name: 🏳️‍⚧️ 其他地区
    filter: "^((?!(🇭🇰|香港|HK|HongKong|Hong Kong|HKG|🇸🇬|新加坡|狮城|Singapore|SG|🇯🇵|日|日本|东京|Japan|JP|🇺🇲|美|美国|US|United States|UnitedStates|America|Korea|KR|🇹🇼|台|**|TW|Tai Wan)).)*$"
    <<: *s
  - name: 🇺🇲 美国节点
    filter: "🇺🇲|美|美国|US|United States|UnitedStates|America"
    <<: *fb
  - name: 🇭🇰 香港节点
    filter: "🇭🇰|香港|HK|HongKong|HKG|Hong Kong"
    <<: *t
  - name: 🇨🇳 **节点
    filter: "🇹🇼|台|**|TW|Tai Wan"
    <<: *t
  - name: 🇸🇬 新加坡节点
    filter: "🇸🇬|新加坡|狮城|Singapore|SG"
    <<: *t
  - name: 🇯🇵 日本节点
    filter: "🇯🇵|日|日本|东京|Japan|JP"
    <<: *t
  - name: ♻️ 自动选择
    <<: *t
#——————————————————————————————————————————————————
  - name: 🌎 GoogleFCM
    <<: *pr
  - name: 📢 Google
    <<: *pr
  - name: 📲 Telegram
    <<: *pr
  - name: 🧺 Amazon
    <<: *pr
  - name: 📺 Netflix
    <<: *pr
  - name: 📹 YouTube
    <<: *pr
  - name: 🍋 BiliBili
    <<: *pr
  - name: 🎮 Games
    <<: *pr
  - name: 🪟 Microsoft
    <<: *pr
#——————————————————————————————————————————————————
  - name: 🎯 全球直连
    type: select
    proxies:
      - 直连
      - 🚀 节点选择
  - name: 🍃 广告过滤
    type: select
    proxies:
      - 拦截
      - PASS
  - name: 直连
    type: select
    proxies:
      - DIRECT
  - name: 拦截
    type: select
    proxies:
      - REJECT
#——————————————————————————————————————————————————
rule-providers:
  userProxy:  
    <<: *f
    path: ./rule_providers/userProxy.yaml
  userDirect:
    <<: *f
    path: ./rule_providers//userDirect.yaml
  GoogleFCM:
    <<: *c
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/GoogleFCM/GoogleFCM.yaml"
    path: ./rule_providers/GoogleFCM.yaml
  Google:
    <<: *c
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Google/Google.yaml"
    path: ./rule_providers/Google.yaml
  Amazon:
    <<: *c
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Amazon/Amazon.yaml"
    path: ./rule_providers/Amazon.yaml
  YouTube:
    <<: *c
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/YouTube/YouTube.yaml"
    path: ./rule_providers/YouTube.yaml
  Microsoft:
    <<: *c
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Microsoft/Microsoft.yaml"
    path: ./rule_providers/Microsoft.yaml
  Telegram:
    <<: *c
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Telegram/Telegram.yaml"
    path: ./rule_providers/Telegram.yaml
  Netflix:
    <<: *c
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Netflix/Netflix.yaml"
    path: ./rule_providers/Netflix.yaml
  GitHub:
    <<: *c
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/GitHub/GitHub.yaml"
    path: ./rule_providers/GitHub.yaml
  BiliBili:
    <<: *c
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/BiliBili/BiliBili.yaml"
    path: ./rule_providers/BiliBili.yaml
  Advertising:
    <<: *c
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Advertising/Advertising_Classical.yaml"
    path: ./rule_providers/Advertising.yaml
  WeChat:
    <<: *c
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/WeChat/WeChat.yaml"
    path: ./rule_providers/WeChat.yaml
  Tencent:
    <<: *c
    url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Tencent/Tencent.yaml"
    path: ./rule_providers/Tencent.yaml
#——————————————————————————————————————————————————
rules: 
  - RULE-SET,userDirect,🎯 全球直连
  - RULE-SET,userProxy,🚀 节点选择
  - RULE-SET,WeChat,🎯 全球直连
  - RULE-SET,Tencent,🎯 全球直连
  - RULE-SET,GoogleFCM,🌎 GoogleFCM
  - RULE-SET,Amazon,🧺 Amazon
  - RULE-SET,Google,📢 Google
  - RULE-SET,YouTube,📹 YouTube
  - RULE-SET,Netflix,📺 Netflix
  - RULE-SET,Microsoft,🪟 Microsoft
  - RULE-SET,GitHub,🪟 Microsoft
  - RULE-SET,Telegram,📲 Telegram
  - RULE-SET,BiliBili,🍋 BiliBili
  - RULE-SET,Advertising,🍃 广告过滤
  - GEOIP,private,🎯 全球直连
  - GEOSITE,private,🎯 全球直连
  - GEOSITE,category-ads-all,🍃 广告过滤
  - GEOSITE,geolocation-!cn,🚀 节点选择
  - GEOIP,!CN,🚀 节点选择
  - MATCH,🎯 全球直连

setting.ini:

  #!/system/bin/sh

if [ ! -d /data/adb/modules/busybox-ndk ]; then
export PATH="/data/adb/magisk:/data/adb/ksu/bin:$PATH:/system/bin"
fi

# Take the current time
current_time=$(date +"%I:%M %P")

# define the settings and paths
settings="/data/adb/box/settings.ini"

# set the port numbers for tproxy and redir
tproxy_port="9898"
redir_port="9797"

# enable/disable port detection: true / false
port_detect="false"

# enable/disable IPv6: true / false
ipv6="false"

# list of available kernel binaries
bin_list=( "clash" "sing-box" "xray" "v2fly" )

# for run and download premium or mihomo
# put kernel premium and mihomo into /data/adb/box/bin directory
xclash_option="mihomo"
# select the client to use : clash / sing-box / xray / v2fly
bin_name=clash

# This script is used to set the user and group for the BFM core files.
box_user_group="root:net_admin"

# redirect: tcp only,
# tproxy: for tcp + udp with tproxy,
# mixed: mode with redirect[tcp] + tun[udp]
network_mode="mixed"

# blacklist / whitelist / tun (only tun auto-route)
proxy_mode="blacklist"

# list of package names to be proxied
# android Package Name, For example: ("com.android.captiveportallogin" "com.tencent.mm")
packages_list=()

# The gid in the list will be bypassed or proxied according to the proxy_mode configuration, and the gid can be arbitrarily specified by the busybox setuidgid command
gid_list=()

# Display AP info by typing "ifconfig" in terminal
ap_list=( "ap+" "wlan+" "rndis+" "swlan+" )
# Ignore AP in the out list
ignore_out_list=()

# Set cgroup to limit memory usage
cgroup_memcg="false"
memcg_limit="25M"

# Set cgroup to cpuset usage
cgroup_cpuset="false"
# 0f=0-3 / f0=4-7 / ff=0-7, recommended default: ff
mask_cpuset="ff"

# Set cgroup to blkio usage
cgroup_blkio="false"

# Set box directory variables
box_dir="/data/adb/box"
box_run="${box_dir}/run"
box_log="${box_run}/runs.log"
box_pid="${box_run}/box.pid"
bin_dir="${box_dir}/bin"
bin_path="${bin_dir}/${bin_name}"

# if you don't want to generate the /run/${bin_name}.log file (because it will grow in size over time), replace "${box_run}/${bin_name}.log" to "/dev/null"
bin_log="${box_run}/${bin_name}.log"
# bin_log="/dev/null"

system_packages_file="/data/system/packages.list"
uid_list=("/data/adb/box/run/appuid.list")

# Update subscription & geox
# Set update interval using cron, for more information: https://crontab.guru/
# set 'true' to enable Cron job
interva_update="0 0,6,12,18,22 * * *" # will update every hour 00,06,12,18
run_crontab="false"

# type "su -c /data/adb/box/scripts/box.tool geox" to update geox
update_geo="false"

# if "renew=true" it will update config.yaml not subscription configuration
# type "su -c /data/adb/box/scripts/box.tool subs" to update subscription
renew=false
update_subscription="false"
# ex: clash subscription url
subscription_url_clash="" # this is just an example.

# clash configuration
name_clash_config="config.yaml"
clash_config="${box_dir}/clash/${name_clash_config}"
# clash subscription 
name_provide_clash_config="subscription.yaml"
clash_provide_config="${box_dir}/clash/provide/${name_provide_clash_config}"
# support rules specified in subscriptions, This is useful when the subscription contains customized rules as well.
custom_rules_subs="false"
name_provide_clash_rules="rules.yaml"
clash_provide_rules="${box_dir}/clash/provide/${name_provide_clash_rules}"

# sing configuration
name_sing_config="config.json"
sing_config="${box_dir}/sing-box/${name_sing_config}"

normal="\033[0m"
orange="\033[1;38;5;208m"
red="\033[1;31m"
green="\033[1;32m"
yellow="\033[1;33m"
blue="\033[1;34m"

log() {
# Selects the text color according to the parameters
case $1 in
  Info) color="${blue}" ;;
  Error) color="${red}" ;;
  Warning) color="${yellow}" ;;
  *) color="${green}" ;;
esac
# Add messages to time and parameters
message="${current_time} [$1]: $2"
if [ -t 1 ]; then
  # Prints messages to the console
  echo -e "${color}${message}${normal}"
else
  # Print messages to a log file
  echo "${message}" >> ${box_log} 2>&1
fi
}

关于订阅自动更新问题

因为机场不太稳定的原因我一般一个小时更新一次指定订阅,在clash中的config中proxy_providers字段下的订阅我会使用interval为3600使订阅一小时更新一次,这个在1.1版本以前一直可以生效,按时更新,但是1.2.1中,设置该字段无法按时更新订阅
同时我尝试在settings.ini中设置corntab进行定时更新,我将run_corntab设置为ture,并使用interva_update="0 * * * *"字段进行更新,但是模块运行后该字段被删除,而使用模块默认的interval=daily进行更新(这个间隔对我来说太长了),请教一下有何解决办法

[功能建议]支持自定义ua/适配clash订阅链

目前我所用的v2board面板机场会根据请求订阅时的ua来分发不同的配置,比如ua中含有clash会直接下发clash配置文件,没有匹配到ua则默认下发base64编码的ss订阅链
我知道可以直接通过直接修改box.tool内的ua,但这个文件好像会被模块的更新覆盖,所以还是希望能在settings.ini中直接设置,或者针对clash的订阅链直接设置ua为clash

无法与tailscale共存

在开启tun时候无法开启tailscale

在输入su -c /data/adb/box/scripts/box.iptables disable关闭透明代理后可以共存

或是使用其他的cfm也可以共存

想知道如何解决

listen tcp 0.0.0.0:9898: bind: address already in use

When I use sing-box core instead of Clash, I get this error. How do I fix this error?

version=v1.4.3

05:15 pm [Info]: Good day
05:15 pm [Info]: Current busybox v1.36.1
05:15 pm [Info]: Using kernel in /data/adb/box/bin/sing-box.
05:15 pm [Info]: sing-box version 1.8.0-beta.6

Environment: go1.21.5 android/arm64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api
Revision: c83b11d683e8ce6e73adc98a08ecb404bcfb26e0
CGO: enabled
05:15 pm [Info]: deleting and backup logs
05:15 pm [Info]: crontab disabled.
05:15 pm [Info]: client-list: [ clash sing-box xray v2fly ]
05:15 pm [Info]: choose: sing-box, start the service.
05:15 pm [Info]: config /data/adb/box/sing-box/config.json
05:15 pm [Info]: type [Tproxy] already exists in /data/adb/box/sing-box/config.json
05:15 pm [Info]: sing-box cgroup memcg: false
05:15 pm [Info]: sing-box cgroup cpuset: false
05:15 pm [Info]: sing-box cgroup blkio: false
05:15 pm [Info]: sing-box skipped port detection.
05:15 pm [Error]: �[31mFATAL�[0m[0000] start service: initialize inbound/tproxy[tproxy-in]: listen tcp 0.0.0.0:9898: bind: address already in use
05:15 pm [Error]: sing-box service is not running.
05:15 pm [Error]: please check sing-box.log for more information.
05:15 pm [Error]: killing stale pid 20296
05:15 pm [Error]: failed to check BOX user group, please make sure sing-box kernel is started.
05:15 pm [Warning]: Cleaning up iptables transparent proxy rules.
05:15 pm [Warning]: Cleaning up iptables transparent proxy rules done.

关于多个订阅select的问题

我在config中的proxy providers里添加了一共三个订阅链接,在proxy groups中我需要一个name为proxy,属性为select的代理组,在需要时我可以选择使用哪个订阅链接来进行代理操作,但是在proxy的use中添加proxy group名会报错无法启动,如下:

  • { name: 'proxy', type: select, use: [nano,less,Sakura] }
  • { name: 'nano', type: url-test, use: ["@nano"] }
  • { name: 'less', type: select, use: ["@less"] }
  • { name: 'Sakura', type: select, use: ["@Sakura"] }
    log中错误是未找到nano,less,Sakura组,查阅clash的文档后使用的proxies字段添加group名也无法启动,请问要怎么实现proxy自选订阅代理呢?

Subscription file storage location error

When using "su -c /data/adb/box/scripts/box.tool subgeo" to update Clash subscription, the subscription file will directly overwrite config.yaml, causing Clash to fail to start

与wireguard无法一起使用

请问与wireguard无法一起使用是因为内核问题(我现在使用的是Clash内核),还是wireguard实现原理的冲突。

无法启动sing-box service

提示:
Asia/Shanghai
**移动 / LTE,Unknown
Fri Dec 8 12:06:17 CST 2023
version=v1.4.3

12:06 pm [Info]: Good day
12:06 pm [Info]: Current busybox v1.36.1
12:06 pm [Info]: Using kernel in /data/adb/box/bin/sing-box.
12:06 pm [Info]: sing-box version 1.8.0-alpha.15

Environment: go1.21.5 android/arm64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api
Revision: 7993c23d69bbdcb66bbe8764cbba0a379a8da536
CGO: enabled
12:06 pm [Info]: deleting and backup logs
12:06 pm [Info]: crontab disabled.
12:06 pm [Info]: client-list: [ clash sing-box xray v2fly ]
12:06 pm [Info]: choose: sing-box, start the service.
12:06 pm [Info]: config /data/adb/box/sing-box/config.json
12:06 pm [Info]: type [Tun] already exists in /data/adb/box/sing-box/config.json
12:06 pm [Info]: sing-box cgroup memcg: false
12:06 pm [Info]: sing-box cgroup cpuset: false
12:06 pm [Info]: sing-box cgroup blkio: false
12:06 pm [Info]: sing-box skipped port detection.
12:06 pm [Error]: INFO[0000] router: loaded geoip database: 12 codes
INFO[0000] router: loaded geosite database: 1465 codes
INFO[0000] router: updated default interface wlan0, index 17, vpn disabled
INFO[0000] router: updated packages list: 394 packages, 25 shared users
TRACE[0000] inbound/tun[0]: creating stack
INFO[0000] inbound/tun[0]: started at tun0
INFO[0000] inbound/socks[socks-in]: tcp server started at 127.0.0.1:10808
INFO[0000] inbound/mixed[mixed-in]: tcp server started at 127.0.0.1:10810
cmd: Failure calling service settings: Failed transaction (2147483646)
FATAL[0000] start service: initialize inbound/mixed[mixed-in]: set system proxy: execute (/system/bin/settings) settings put global http_proxy 127.0.0.1:10810: exit status 2
12:06 pm [Error]: sing-box service is not running.
12:06 pm [Error]: please check sing-box.log for more information.
12:06 pm [Error]: killing stale pid 30965

查到有解决办法是用两次su,但是在我这里没有效果

android 13版本5.15.74内核iptables规则报错

➜  adb /data/adb/box/scripts/box.iptables disable
09:42 [warn]: cleaning up iptables transparent proxy rules.
iptables: Bad rule (does a matching rule exist in that chain?).
iptables: Bad rule (does a matching rule exist in that chain?).
iptables: Too many links.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables v1.8.7 (legacy): Couldn't find target `BOX_EXTERNAL'

Try `iptables -h' or 'iptables --help' for more information.
iptables v1.8.7 (legacy): Couldn't find target `BOX_LOCAL'

Try `iptables -h' or 'iptables --help' for more information.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: Bad rule (does a matching rule exist in that chain?).
iptables: Bad rule (does a matching rule exist in that chain?).
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: No chain/target/match by that name.
iptables: Bad rule (does a matching rule exist in that chain?).
iptables: Bad rule (does a matching rule exist in that chain?).
RTNETLINK answers: No such file or directory
RTNETLINK answers: No such process
ip6tables v1.8.7 (legacy): Couldn't find target `BOX_EXTERNAL'

Try `ip6tables -h' or 'ip6tables --help' for more information.
ip6tables v1.8.7 (legacy): Couldn't find target `DIVERT'

Try `ip6tables -h' or 'ip6tables --help' for more information.
ip6tables v1.8.7 (legacy): Couldn't find target `BOX_LOCAL'

Try `ip6tables -h' or 'ip6tables --help' for more information.
ip6tables: Bad rule (does a matching rule exist in that chain?).
ip6tables: Bad rule (does a matching rule exist in that chain?).
ip6tables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
ip6tables: No chain/target/match by that name.
ip6tables: Bad rule (does a matching rule exist in that chain?).
ip6tables: Bad rule (does a matching rule exist in that chain?).
09:42 [warn]: clean up iptables transparent proxy rules done.

Screenshot_2023-05-16-09-44-44-547_me.weishu.kernelsu.jpg

增加守护进程

最近在使用clash meta的时候,内核容易遇到Connection Already Exists的panic,导致clash meta崩溃。希望box能够有一个守护进程,在内核挂掉的时候,重启clash。

订阅链接操作门槛高

能否直接在Dashboard网页里面进行订阅链接的添加和更新?现在这个样子添加订阅链接必须要手动编辑文本添加,非常麻烦,操作门槛很高。要学习怎样添加订阅链接,怎样让它自动下载更新订阅。到现在都没整明白。
能否直接在Dashboard网页里面进行订阅链接的添加和更新?图形化的界面可以大大降低操作门槛

sing-box开启后没有网络

sing-box的模式可以在神秘和E5 86 95的box4上正常使用,但是在box_for_root上却无法使用,替换了内核也不行
Screenshot_2023-08-24-19-31-23-594_bin mt plus-edit
Screenshot_2023-08-24-19-30-53-924_bin mt plus-edit

日志文件定时清理

如果长时间使用日志文件会变的非常大,亦或者是由于经常重启产生很多个日志文件,能否添加定时清理功能?或者重定向到系统日志里(不知道这样会不会影响系统性能)

安装v0.4后手机无限重启

小米10 MIUI14(安卓13)
每次自动重启都会进入小米官方rec,选择开机,进入桌面未解锁屏幕之前都是正常的,解锁进入桌面后过几秒后就会再次进入小米官方rec。通过那短暂的几秒进入magisk关闭本模块,重启后就恢复正常了。

license question

First thanks for making your module available here! Can you please clarify what license applies to it?

关于透明代理的问题

如果应用启用了doh或者开启了系统的dot时就会导致所有流量走不了代理,关闭后分流正常。试了下用settings put global http_proxy 127.0.0.1:7891;设置系统代理后不关闭doh/dot也能用,但感觉这好像不是很好的解决办法,请问还有更好的解决办法吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.