Skip to content

Instantly share code, notes, and snippets.

View lifansama's full-sized avatar
🌴
On vacation

lifansama lifansama

🌴
On vacation
View GitHub Profile
@lifansama
lifansama / log
Created August 18, 2023 01:58
使用OPQBot从端,Specified client not found
(qq) root@Debian:~/venv/qq# ehforwarderbot -p qq
2023-08-18 09:35:04,047 [Level 99]: ehforwarderbot.__main__ (__main__.init; __main__.py:129)
Initializing slave milkice.qq...
Traceback (most recent call last):
File "/root/venv/qq/lib/python3.11/site-packages/efb_qq_slave/ClientMgr.py", line 25, in __init__
c = entry_point.load()
^^^^^^^^^^^^^^^^^^
File "/root/venv/qq/lib/python3.11/site-packages/pkg_resources/__init__.py", line 2518, in load
return self.resolve()
^^^^^^^^^^^^^^
@lifansama
lifansama / energized_dnscrypt_update
Created September 29, 2022 15:04 — forked from TheGuardianWolf/energized_dnscrypt_update
DNSCrypt-proxy energized protection update
#!/usr/bin/env bash
NEWFILE='/tmp/cloaking-rules.energized.txt'
ORIGINALFILE='/etc/dnscrypt-proxy/cloaking-rules.energized.txt'
out=$(curl -s --fail -L https://raw.githubusercontent.com/EnergizedProtection/block/master/spark/formats/dnsmasq.conf) && echo "$out" | sed -E "s/^address=\/(.*)\/(0\.0\.0\.0)\/$/\1 \2/" > $NEWFILE && (cmp --silent $ORIGINALFILE $NEWFILE || (mv $NEWFILE $ORIGINALFILE && cat /etc/dnscrypt-proxy/cloaking-rules.*.txt > /etc/dnscrypt-proxy/cloaking-rules.txt && systemctl restart dnscrypt-proxy))
@echo off
echo select your command
:start
echo 1 = ping qq.com
echo 2 = naive
echo 3 = kill ping
set /p num=
if "%num%"=="1" goto cmd1
if "%num%"=="2" goto cmd2
@lifansama
lifansama / README.md
Created April 1, 2022 06:16 — forked from plugnburn/README.md
JJY.js: Web Audio API based JJY transmitter

JJY.js: JJY time signal emulation/transmission library

Usage

  1. Make sure that the watch/clock is configured to receive JJY 40 KHz signal (for most Casio Waveceptor/G-Shock watches, the easiest way is to enter the engineer menu by pressing Mode+Light+Receive and select J 40 reception mode, for all other watches you need to set the home city to Tokyo)
  2. Make sure your device clock is in sync before running the emulator.
  3. From the page, run:
Abandon

代理服务器 Cake 队列规则常用参数推荐

为什么选用 Cake

Cake 使用主动队列管理(AQM)技术保持全局同步,可以控制延迟,有效利用宽带。同时它还可以保证每个主机,每个流公平的分享宽带。

使用 Cake 的条件

Cake 与 kernel 4.19 并入主线,因此使用 Cake 需要 kernel 和 iproute2 版本大于 4.19。如何确认 kernel 和 iproute2 版本,以及如何升级本文不做详细说明。

如何启用 Cake

以 root 身份执行命令 tc qdisc replace dev eth0 root cake,其中 eth0 是网络接口名。

Vmess + TCP + TLS 方式的 HTTP 分流和网站伪装

背景

  • 目前 Vmess + WebSocket + TLS (以下简称 wss)方式,因其特征如同 HTTPS 流量,可以隐藏 V2Ray 路径,主动侦测会得到正常 HTTP 网站响应,具有良好的伪装能力,目前被广泛用于反审查。

  • 但是如此强大的伪装能力,需要付出严重的性能代价:TLS 1.3 握手需要消耗 1-rtt,WS 握手也需要消耗 1-rtt,增大了握手延迟。V2Ray 增加了 mux 以减少握手的发生,然而实际使用中 mux 体验并不好,很多用户选择关闭。

  • 最近兴起了一个新的反审查工具——Trojan,这个工具将一个类似 Socks 的协议直接通过 TLS 传输,并将认证失败的流量交由 Web 服务器处理。降低 WS 延迟的同时,提供与 wss 方式一样的伪装能力。但是该工具较为年轻,没有路由功能,各平台图形化客户端也不完善。

@lifansama
lifansama / v2ray-as-ss-over-v2plugin-server-config.json
Created March 8, 2019 16:06 — forked from icpz/v2ray-as-ss-over-v2plugin-server-config.json
`shadowsocks over v2ray-plugin' as client work with `v2ray' as server
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "info"
},
"inbounds": [
{
"port": "10000", /* this is the server port for client */
"listen": "127.0.0.1",
@lifansama
lifansama / shadowsocks-libev.sh
Created March 8, 2019 07:58 — forked from yzyzsun/shadowsocks-libev.sh
shadowsocks-libev server setup script on CentOS 7
cd /etc/yum.repos.d
curl -O https://copr.fedorainfracloud.org/coprs/librehat/shadowsocks/repo/epel-7/librehat-shadowsocks-epel-7.repo
yum -y install shadowsocks-libev
setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/ss-server
cat > /etc/shadowsocks-libev/config.json << 'EOF'
{
"server": "0.0.0.0",
"server_port": 443,
"password": "p@$$w0rd",
"method": "aes-128-gcm"