This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export SSL_FEATURES="no-engine no-apps no-tests no-external-tests no-trace enable-zlib enable-zstd enable-tfo enable-weak-ssl-ciphers enable-ssl3 enable-ct enable-ktls enable-sm2 enable-sm4 enable-sm3 enable-ec_nistp_64_gcc_128 -DOPENSSL_TLS_SECURITY_LEVEL=0" | |
export SSL_CFLAGS="-O3 -march=haswell -mtune=haswell -mavx2 -funroll-loops -D_FORTIFY_SOURCE=2 -fPIC -pipe -flto=thin" | |
export SSL_LINKER_FLAGS="-fuse-ld=lld -fintegrated-as -static -ljemalloc -Wl,-z,relro,-z,now,--lto-O3,-O3,--as-needed" | |
## deps | |
# sudo apt install libatomic-ops-dev libperl-dev | |
apk add build-base cmake clang lld llvm pcre2-dev perl-dev zstd-dev zstd-static libatomic libatomic_ops-dev libatomic_ops-static jemalloc-static zlib-dev zlib-static linux-headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export SSL_QUIC_PREFIX="$HOME/.local/babassl" | |
export SSL_FEATURES="--api=1.1.1 no-legacy no-tests no-external-tests no-trace no-unit-test zlib enable-weak-ssl-ciphers enable-ssl3 enable-ct enable-ktls enable-ntls enable-sm2 enable-sm4 enable-sm3 enable-optimize-chacha-choose enable-ec_nistp_64_gcc_128 enable-ec_sm2p_64_gcc_128 enable-zuc enable-bulletproofs enable-sm2_threshold enable-ec_elgamal enable-twisted_ec_elgamal enable-cert-compression -DOPENSSL_TLS_SECURITY_LEVEL=0" | |
export SSL_CFLAGS="-O3 -march=haswell -mtune=haswell -mavx2 -funroll-loops -D_FORTIFY_SOURCE=2 -fPIC -pipe -flto=thin" | |
export SSL_LINKER_FLAGS="-fuse-ld=lld -fintegrated-as -static -ljemalloc -Wl,-z,relro,-z,now,--lto-O3,-O3,--as-needed" | |
## deps | |
# sudo apt install libatomic-ops-dev libperl-dev | |
apk add build-base cmake clang lld llvm pcre2-dev perl-dev zstd-dev zstd-static libatomic libatomic_ops-dev libatomic_ops-static jemalloc-static zlib-dev zlib-static linux-headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import struct | |
import sys | |
import os | |
if len(sys.argv) < 2: | |
print('Usage: ' + os.path.basename(sys.argv[0]) + ' input_file') | |
exit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import struct | |
import sys | |
import os | |
if len(sys.argv) < 2: | |
print('Usage: ' + os.path.basename(sys.argv[0]) + ' input_file') | |
exit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/AOSP/kernel/manifest -b common-android12-5.10 --git-lfs --repo-url='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo' --no-tags --current-branch --depth=1 | |
repo sync -j1 --force-sync --fail-fast --no-tags --current-branch -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# CHANGE THESE | |
auth_email="[email protected]" | |
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings | |
zone_name="example.com" | |
record_name="www.example.com" | |
# MAYBE CHANGE THESE | |
ip=$(curl -s https://api-ipv4.ip.sb/ip) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Step 1: Fill in EMAIL, TOKEN, DOMAIN and SUBDOMAIN. Your API token is here: https://www.cloudflare.com/a/account/my-account | |
# Make sure the token is the Global token, or has these permissions: #zone:read, #dns_record:read, #dns_records:edit | |
# Step 2: Create an A record on Cloudflare with the subdomain you chose | |
# Step 3: Run "./ddns.sh -l" to get the zone_id and rec_id of the record you created. | |
# Fill in ZONE_ID and REC_ID below | |
# This step is optional, but will save you 2 requests every time you this script | |
# Step 4: Run "./ddns.sh". It should tell you that record was updated or that it didn't need updating. | |
# Step 5: Run it every hour with cron. Use the '-s' flag to silence normal output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
haproxy.conf | |
============ | |
frontend spdy | |
mode tcp | |
bind xxx.xxx.xxx.xxx:443 ssl crt /etc/haproxy/ssl.pem crt /etc/haproxy/certs.d npn spdy/3.1,http/1.1 ciphers AES256+EECDH:AES256+EDH:AES128+EDH:EECDH:!aNULL:!eNULL:!LOW:!DES:!3DES:!RC4; no-sslv3 | |
option tcplog | |
log global | |
# route to nginx |