Skip to content

Instantly share code, notes, and snippets.

View Bryan2333's full-sized avatar

BryanLiang Bryan2333

  • Earth
  • 15:21 (UTC +08:00)
View GitHub Profile
@Bryan2333
Bryan2333 / singbox-tproxy
Last active September 15, 2025 05:52
sing-box tproxy脚本
#!/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"
@Bryan2333
Bryan2333 / custom_font.js
Last active January 1, 2026 02:44
自定义字体
// ==UserScript==
// @name 自定义字体
// @namespace http://tampermonkey.net/
// @version 1.2
// @description 设置自定义字体,修复图标显示并优化中英文
// @match *://*/*
// @grant GM_addStyle
// @run-at document-start
// ==/UserScript==
@Bryan2333
Bryan2333 / zhihu_surprise_emoji.js
Created January 18, 2026 13:41
知乎表情包替换:[惊喜] → [可怜]
// ==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
@Bryan2333
Bryan2333 / yass_to_naive.md
Last active March 12, 2026 09:33
如何将yass集成到naiveproxy插件里面

Replacing NaiveProxy with Yass in NekoBoxForAndroid

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.

1. The Challenge: Plugin Architecture & Routing Loops

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.

@Bryan2333
Bryan2333 / main.go
Last active May 5, 2026 14:32
msys/git的wrapper脚本 让非msys2环境的程序也可以正常调用git
package main
import (
"fmt"
"os"
"os/exec"
"os/signal"
"regexp"
"strings"
"syscall"