Skip to content

Instantly share code, notes, and snippets.

@wbmins
wbmins / build_openwrt.sh
Last active February 8, 2026 06:03
openwrt-x86_64自定镜像构建脚本,默认包含包(luci zoneinfo-asia lsd curl openssh-sftp-server vim luci-i18n-base-zh-cn luci-app-firewall luci-i18n-firewall-zh-cn luci-i18n-package-manager-zh-cn luci-i18n-momo-zh-cn)
#!/bin/bash
# 如果出错则停止运行
set -e
# --- 1. 变量配置区 ---
VERSION="${1:-25.12.0-rc4}"
# 自动提取前两位作为 Prefix (例如 25.12)
PREFIX=$(echo $VERSION | cut -d. -f1-2)
ARCH="x86-64"
install_jdk_if_missing() {
local JDK_URL="https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.18%2B8/OpenJDK17U-jdk_x64_linux_hotspot_17.0.18_8.tar.gz"
local JDK_TAR="OpenJDK17U-jdk_x64_linux_hotspot_17.0.18_8.tar.gz"
local JDK_DIR="jdk-17.0.18+8"
local INSTALL_DIR="/opt/jdk"
local PROFILE_FILE="/root/.profile"
[ -x "$INSTALL_DIR/bin/java" ] && { echo "[JDK] already installed"; return 0; }
cd /tmp || return 1
[ -f "$JDK_TAR" ] || curl -LO "$JDK_URL"
tar -xzf "$JDK_TAR"
@wbmins
wbmins / custom.sh
Last active January 26, 2026 10:46
OpenWrt 旁路由设置
#!/bin/ash
set -euo pipefail
mkdir -p /var/lock
###############################仅针对旁路由设置###############################
# 禁用 IPv6
/etc/init.d/odhcpd disable
echo 'net.ipv6.conf.all.disable_ipv6 = 1' >> /etc/sysctl.conf
@wbmins
wbmins / JableDownload.js
Last active November 2, 2025 09:56
[tampermonkey ] jable download 脚本,配合 https://github.com/nilaoda/N_m3u8DL-RE使用
// ==UserScript==
// @name Jable 视频下载
// @namespace http://tampermonkey.net/
// @version 1.4
// @description 在 Jable 视频页添加大下载图标按钮,捕获到 m3u8 后再添加按钮
// @author Pluto
// @match https://en.jable.tv/videos/*
// @grant GM_xmlhttpRequest
// @connect 192.168.1.6 //这里指向下面go程序的ip
// @run-at document-start
@wbmins
wbmins / bypass.bat
Created August 24, 2025 10:38
设置网络为旁路由 192.168.1.5
@echo off
:: 网络清理与静态IP设置脚本
:: 请以管理员身份运行
echo 正在执行网络清理与旁路由配置......
echo.
:: ================ 第一步:清理 Profiles 下的所有子项 ================
echo 1/2 正在清理 Profiles 下的所有网络子项...