Skip to content

Instantly share code, notes, and snippets.

View holoto's full-sized avatar
😄
none

holoto holoto

😄
none
View GitHub Profile
#bdc6ce
#b2b6bb
#9babc1
#b3c4df
@holoto
holoto / gist:495814fc91c44345a139ea4e371b39d5
Created August 20, 2021 11:35
oracle arm vps best vnc docker image
docker run -d \
-e TZ=Europe/Zurich \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--shm-size='10GB' \
--restart unless-stopped \
-e PUID=0 -e PGID=0 \
--privileged --cap-add net_admin \
--cap-add sys_module \
-e VNC_PASSWORD='VNC_PASSWORD' \
-e withUser='VNC_PASSWORD' \
@holoto
holoto / gist:cd5ecd5bf88a20569dbc1943c8bb6137
Created January 16, 2022 14:13
formart date filename
7zz a $(date +'%Y-%m-%d')-$(openssl rand -hex 10).zip foldername
@holoto
holoto / gist:6fa0cd8548c8a7076b3b2e46c3a0a451
Created June 22, 2024 10:52
use Cloudflare Workers to download-proxy
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
const url = new URL(request.url)
const targetUrl = url.searchParams.get('url')
if (!targetUrl) {
return new Response('Missing "url" parameter', { status: 400 })
@holoto
holoto / gist:8a2a01d77d3f1d3d474e2a31db050708
Created June 23, 2024 02:15
Cloudflare-Workers-Download-Proxy v2
const DEFAULT_ACCEPT_LANGUAGE = 'de-DE,de;q=0.9,en;q=0.8';
function getFileName(url) {
const urlObj = new URL(url);
const pathname = urlObj.pathname;
return pathname.substring(pathname.lastIndexOf('/') + 1);
}
const randomHeaders = {
'User-Agent': () => {
@holoto
holoto / gist:1b619a7705bc1251564ab0156ac4abb4
Created July 2, 2024 13:27
Applying openwrt random MAC address
#quac
qhuawei=("00:A0:C6" "64:9C:81" "88:12:4E" "8C:FD:F0")
#CISCO
ddhuawei=("08:ec:f5" "08:f3:fb" "0c:11:67" "0c:27:24" "0c:68:03" "0c:75:bd" "0c:85:25" "0c:d0:f8" "10:06:ed" "10:8c:cf" "10:b3:c6" "10:b3:d5" "10:b3:d6" "10:bd:18" "10:f3:11" "10:f9:20" "14:16:9d" "14:a2:a0" "18:33:9d" "18:59:f5" "18:80:90" "18:8b:45" "18:8b:9d" "18:9c:5d" "18:e7:28" "18:ef:63" "1c:17:d3" "1c:1d:86" "1c:6a:7a" "1c:aa:07" "1c:d1:e0" "1c:de:a7" "1c:e8:5d" "20:37:06" "20:3a:07" "20:4c:9e" "20:bb:c0" "20:cf:ae" "24:01:c7" "24:16:9d" "24:7e:12" "24:81:3b" "24:b6:57" "24:e9:b3" "24:36:da" "28:34:a2" "28:52:61" "28:6f:7f")
NEWMAC=$(printf ${huawei[$(head -30 /dev/urandom | tr -dc "0123456789" | head -c1)]} && hexdump -n3 -e'/1 ":%02x"' /dev/urandom)
location /md5 {
proxy_ssl_name 'doh tls domain name';
proxy_ssl_server_name on;
proxy_ssl_session_reuse off;
proxy_pass https://127.0.0.1:1543/dns-query;
proxy_set_header Host 'doh tls domain name';
./speedtest-go --custom-url=http://speedtest1.online.sh.cn:8080 -t 20
./speedtest-go --custom-url=http://speedtest.one-punch.win:8080 -t 20