Skip to content

Instantly share code, notes, and snippets.

View fefz's full-sized avatar
💭
I may be slow to respond.

swing fefz

💭
I may be slow to respond.
View GitHub Profile
@fefz
fefz / baidu_http.js
Created August 13, 2026 10:31
baidu_http
var httpStatus = -1;
var CONNECTED = 0;
var WAIT_RESPONSE = 1;
var FORWARDING = 2;
function tunnelDidConnected() {
_writeHeader();
httpStatus = CONNECTED;
return true;
}
@fefz
fefz / cf_snippets.js
Last active August 3, 2026 06:06
cf_snippets
import{connect as t}from"cloudflare:sockets"
;const uid1="49c44885",uid2="c6b1",uid3="48d0",uid4="8bd3",uid5="ad0ea86a48df"
;const e=[uid1,uid2,uid3,uid4,uid5].join("-"),r="509eece82eb6910bebef9af9496092d3244b6c0d69ef3aaa4b12c565",n=e,a=16383,s=65532,o=65532,i=65536,c=262144,l=524288,h=4,u=2,y=2048,f=28672,d=52428800,p=65536,w=32766,g=1048576,b=393216,m=262144,L=131072,A=192,k=64,E=524288,T=512,v=511,U=20,x=64,C=3e5,O=600,S=900,B=220,P=2,$=3,M=["http","socks","https"],I="pool.vrs.ccwu.cc",R=t=>`${String(t||"global").toLowerCase().replace(/[^a-z0-9-]/g,"")||"global"}.${I}!txt`,W=t=>/^(?:auto|text\.com(?::443)?)$/i.test(t?.trim()||""),N=new Uint8Array(16),K=new Uint8Array(56),H=[0,0,0,0,1,1,2,2,3,3,4,4,4,4,4,4]
;for(let t,r=0;r<16;r++)N[r]=(15&((t=e.charCodeAt(2*r+H[r]))>64?t+9:t))<<4|15&((t=e.charCodeAt(2*r+H[r]+1))>64?t+9:t)
;const[D,j,F,q,z,G,V,X,_,Z,J,Q,Y,tt,et,rt]=N;for(let t=0;t<56;t++)K[t]=r.charCodeAt(t)
;const[nt,at,st]=[new TextEncoder,new TextDecoder,new Uint8Array([5,2,0,2])],ot=new Uint8Array(0),it
@fefz
fefz / clash_base_gen.yml
Created July 21, 2026 00:04
clash_base_gen
# =====================================================================
# Clash 基础模板 — 自用
# 配合 ACL4SSR 订阅转换使用
# =====================================================================
port: 7890
socks-port: 7891
allow-lan: true
mode: Rule
log-level: info
@fefz
fefz / alice_sb.json
Last active September 25, 2025 03:46
Alice Feee Sing-Box Rule
{
"version": 2,
"rules": [
{
"domain_suffix": [
"dazn-api.com",
"dazn.com",
"dazndn.com",
"indazn.com",
@fefz
fefz / alice_free.yaml
Last active August 10, 2025 09:32
Alice free unlocked domain
# Media & AI Rule Set
# Generated on: 2025-07-30
payload:
# DAZN
- DOMAIN-SUFFIX,dazn-api.com
- DOMAIN-SUFFIX,dazn.com
- DOMAIN-SUFFIX,dazndn.com
- DOMAIN-SUFFIX,indazn.com
- DOMAIN-SUFFIX,d151l6v8er5bdm.cloudfront.net
@fefz
fefz / haproxy.cfg
Created October 2, 2020 03:58
use Haproxy to route different proxy app
# haproxy1.8 version
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
stats timeout 30s
user haproxy
group haproxy
# HTTP 端口
port: 7890
# SOCKS5 端口
socks-port: 7891
# Linux 及 macOS 的 redir 端口
# redir-port: 7892
allow-lan: false
@fefz
fefz / nginx-tls.conf
Last active September 11, 2018 14:07 — forked from gavinhungry/nginx-tls.conf
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Name: nginx-tls.conf
# Auth: Gavin Lloyd <gavinhungry@gmail.com>
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related
# to SSL/TLS are omitted here.
#
# Example: https://www.ssllabs.com/ssltest/analyze.html?d=gavinhungry.io
#
@fefz
fefz / parasitic-combination-inheritance.js
Created November 29, 2017 01:40 — forked from w1shen/parasitic-combination-inheritance.js
Parasitic Combination Inheritance
function obj(o) {
function F() {}
F.prototype = o;
return new F();
}
function inheritPrototype(sub, sup) {
var p = obj(sup.prototype);
p.constructor = sub;
sub.prototype = p;
@fefz
fefz / sh
Last active August 20, 2017 23:48
access google voice
#!/bin/bash
#replace `curl link` with your curl link
test(){
res=$(`curl link` -s)
if [[ ${res:0-9:5} -eq "again" ]]; then
echo ${res:0-9:5}
sleep 3
test
elif [[ ! ${res:0-9:5} -eq "again" ]]; then
echo "exit"