Skip to content

Instantly share code, notes, and snippets.

View ptpt52's full-sized avatar
⚽
The only way out is through.

PTPT52 ptpt52

⚽
The only way out is through.
View GitHub Profile
@ptpt52
ptpt52 / be6lpro.md
Created September 30, 2026 14:02
Tenda BE6L Pro 刷入 X-WRT / OpenWrt 教程

Tenda BE6L Pro 刷入 X-WRT / OpenWrt 教程

本教程面向希望在 Tenda BE6L Pro 上刷入 X-WRT / OpenWrt 的用户。

重要: 刷机涉及 Bootloader、NAND Flash 和系统分区操作,错误操作可能导致设备无法启动。执行任何写 Flash 操作前,请确认型号、硬件版本、镜像文件以及分区布局完全匹配。

一、刷机思路

BE6L Pro 的刷机过程建议采用“先临时启动 initramfs,再写入 sysupgrade 固件”的方式:

@ptpt52
ptpt52 / gist:fec871eb3530288e00d1a03b5cf595ca
Last active November 9, 2026 13:35
Tenda AX12L Pro 刷 X-WRT 教程(串口刷机)

Tenda AX12L Pro 刷 X-WRT 教程(串口刷机)

适用设备:Tenda AX12L Pro(同款异名:JD12L Pro、RX12L Pro、TX12L Pro)
固件版本:X-WRT v26.04_b202609281234
难度:中级(需要串口工具和 TFTP 服务器)


一、设备规格

LVS 域名白名单内核模块设计文档

1. 背景与目标

LVS 作为高性能的四层负载均衡器,原生仅基于 IP/端口转发,不解析应用层流量,无法实现基于域名的访问控制。实际生产中有基于域名的白名单需求,需拦截非白名单域名的 HTTP/HTTPS 流量,并可在拦截时阻断连接。

本模块设计目标:

  • 支持域名白名单过滤(HTTP Host、TLS SNI)
  • 支持拦截非法域名连接并阻断后续包
  • 可选使用内核连接跟踪(conntrack)或自定义轻量状态表实现高性能
@ptpt52
ptpt52 / b.sh
Last active April 16, 2023 00:52
用tmpfs编译openwrt
#!/bin/bash
#setup environment for tmpfs build for openwrt/x-wrt.
mkdir -p tmpfs_local/host tmpfs_local/hostpkg
mkdir tmpfs
#mount tmpfs size=24G (total 32G ram) for build_dir.
sudo mount -t tmpfs -o size=24G tmpfs tmpfs/
@ptpt52
ptpt52 / log 1
Created March 22, 2023 09:33
strongswan l2tp/ipsec psk test log
Wed Mar 22 17:30:03 2023 daemon.info : 08[ENC] parsed ID_PROT request 0 [ SA V V V V V V ]
Wed Mar 22 17:30:03 2023 daemon.info : 08[IKE] received NAT-T (RFC 3947) vendor ID
Wed Mar 22 17:30:03 2023 daemon.info : 08[IKE] received draft-ietf-ipsec-nat-t-ike-02 vendor ID
Wed Mar 22 17:30:03 2023 daemon.info : 08[IKE] received draft-ietf-ipsec-nat-t-ike-02\n vendor ID
Wed Mar 22 17:30:03 2023 daemon.info : 08[IKE] received draft-ietf-ipsec-nat-t-ike-00 vendor ID
Wed Mar 22 17:30:03 2023 daemon.info : 08[IKE] received FRAGMENTATION vendor ID
Wed Mar 22 17:30:03 2023 daemon.info : 08[IKE] received DPD vendor ID
Wed Mar 22 17:30:03 2023 daemon.info : 08[IKE] 192.168.16.190 is initiating a Main Mode IKE_SA
Wed Mar 22 17:30:03 2023 authpriv.info : 08[IKE] 192.168.16.190 is initiating a Main Mode IKE_SA
Wed Mar 22 17:30:03 2023 daemon.info : 08[CFG] selected proposal: IKE:AES_CBC_128/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024
root@OpenWrt:~# /etc/init.d/network reload
[ 121.287227] mc_detach: disabled snooping on br-lan.
Command failed: Not found
Default Service Class Count: 8
Custom Service Class Count: 1
Command failed: Not found
Command failed: Not found
Command failed: Not found
qcawifi qcawificfg80211 disable radio wifi0
Disable ol_stats for Lithium platforms
Welcome to minicom 2.8
OPTIONS:
Port /dev/ttyUSB0, 17:13:45
Press CTRL-A Z for help on special keys
===================================================================
MT7621 stage1 code 10:33:55 (ASIC)
>> Got DRAM size 0MB
Retrying ...
>> Applying AC timing parameters (try 2)
Expected DRAM size: 512MB
>> Setting DDR/CPU PLL ...
Using 3PLL mode with External loopback
DDR/CPU clock will be set to 1200MHz/880MHz
Hit any key within 10s to stop dump activity...resetting ...
Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.3.1.1-00059
S - IMAGE_VARIANT_STRING=MAABANAZA
S - OEM_IMAGE_VERSION_STRING=CRM
S - Boot Config, 0x000002c1
B - 128 - PBL, Start
B - 1562 - bootable_media_detect_entry, Start
IPQ5018# reset
resetting ...
Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.3.1.1-00042
S - IMAGE_VARIANT_STRING=MAABANAZA
S - OEM_IMAGE_VERSION_STRING=CRM
S - Boot Config, 0x000002c1
B - 127 - PBL, Start