手机(Twitter / Google Play)在"网关指向局域网虚拟机 + sing-box TUN 透明代理"模式下 频繁发生原生崩溃(SIGABRT)。共采集 32 个 tombstone。
根因不是代理的流量处理,而是 Cronet(Chromium 网络栈)的 fd 竞态被触发。
解决方案: 通过 RA(Router Advertisement)给手机的默认接口下发一个 IPv6 地址和
| // vim: set shiftwidth=2 tabstop=2: | |
| { | |
| "$schema": "https://opencode.ai/config.json", | |
| "shell": "C:/msys64/usr/bin/bash.exe", | |
| "snapshot": false, | |
| "watcher": { | |
| "ignore": [ | |
| "node_modules/**", | |
| "**/node_modules/**", | |
| "dist/**", |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "os/signal" | |
| "regexp" | |
| "strings" | |
| "syscall" |
This guide documents the process of integrating a custom proxy core (yass_cli) into NekoBoxForAndroid by disguising it
as the NaiveProxy plugin, without modifying the NekoBox application source code.
NekoBox uses a plugin architecture where it extracts native libraries (.so files) from a plugin APK and executes them
as background child processes. When running a plugin, NekoBox generates a JSON configuration file specific to that plugi
n (e.g., naive_config.json) and passes the file path as a command-line argument.
| // ==UserScript== | |
| // @name 知乎表情包替换:[惊喜] → [可怜] | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description 利用 CSS 瞬间替换知乎的 [惊喜] 表情 | |
| // @author BryanLiang | |
| // @match *://www.zhihu.com/* | |
| // @match *://zhuanlan.zhihu.com/* | |
| // @grant GM_addStyle | |
| // @run-at document-start |
| // ==UserScript== | |
| // @name 自定义字体 | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.2 | |
| // @description 设置自定义字体,修复图标显示并优化中英文 | |
| // @match *://*/* | |
| // @grant GM_addStyle | |
| // @run-at document-start | |
| // ==/UserScript== |
| #!/bin/bash | |
| [[ "$EUID" -eq 0 ]] || { echo "This script must be run as root!"; exit 1; } | |
| ## 网卡 | |
| INTERFACE=$(ip route show default | awk '/default/ {print $5}') | |
| INTERFACE="${INTERFACE:-wlan0}" | |
| ## TProxy流量标记 | |
| TPROXY_MARK="0x1" |
| #!/bin/bash | |
| POWER_SOURCE="$(< /sys/class/power_supply/ADP0/online)" | |
| case "$POWER_SOURCE" in | |
| "0") kscreen-doctor output.eDP-1.mode.2880x1800@60 > /dev/null 2>&1 ;; | |
| "1") kscreen-doctor output.eDP-1.mode.2880x1800@90 > /dev/null 2>&1 ;; | |
| esac |
| -- Global to remember if night color was on before mpv | |
| local night_color_was_enabled = false | |
| -- Run a shell command and capture its stdout | |
| local function execute_command(cmd) | |
| local handle = io.popen(cmd) | |
| local result = handle:read("*a") | |
| handle:close() | |
| return result | |
| end |
| # Defined in /home/bryan/.config/fish/functions/proxy.fish @ line 1 | |
| function proxy | |
| set -l DEFAULT_PROXY "http://127.0.0.1:7890" | |
| set -l PROXY_URL_FORMAT "^(http|https|socks5|socks5h)://[a-zA-Z0-9.-]+:[0-9]+\$" | |
| function __set_proxy | |
| set -gx HTTP_PROXY $argv[1] | |
| set -gx http_proxy $HTTP_PROXY | |
| set -gx HTTPS_PROXY $HTTP_PROXY |