Skip to content

Instantly share code, notes, and snippets.

View steveyiyo's full-sized avatar
👋
I'm so cute!

SteveYi steveyiyo

👋
I'm so cute!
View GitHub Profile
@steveyiyo
steveyiyo / run_iperf3_with_random_speed.sh
Created March 19, 2021 03:45
Run iperf3 with the random speed
#!/bin/bash
stop=0
while [ $stop -le 10 ]; do
speed=$(shuf -i 1000000000-10000000000 -n 1)
echo "$speed"
iperf3 -c 103.158.187.18 -b "$speed"
done
@steveyiyo
steveyiyo / cf-worker-b2.js
Last active February 24, 2024 02:58
Cloudflare Worker 搭配 Backblaze B2
'use strict';
const b2Domain = ''; //你要在Cloudflare上綁定的Backblaze網域
const b2Bucket = ''; //Backblaze B2的存儲桶名稱
const b2UrlPath = `/file/${b2Bucket}/`;
addEventListener('fetch', event => {
return event.respondWith(fileReq(event));
});
// define the file extensions we wish to add basic access control headers to
const corsFileTypes = ['png', 'jpg', 'gif', 'jpeg', 'webp'];
@steveyiyo
steveyiyo / vhost_proxy.conf
Last active January 27, 2021 13:32
nginx vhost proxy 配置文件
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /usr/local/nginx/conf/ssl/whois.steveyi.net.crt;
ssl_certificate_key /usr/local/nginx/conf/ssl/whois.steveyi.net.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;