Skip to content

Instantly share code, notes, and snippets.

View groundcat's full-sized avatar

groundcat

  • Pennsylvania, US
  • 21:49 (UTC -04:00)
View GitHub Profile
@groundcat
groundcat / Clash-BackCN.yaml
Created December 28, 2019 02:11
Clash 翻墙回国规则
Rule:
# 国内二级域名
- DOMAIN-SUFFIX,edu.cn,PROXY
- DOMAIN-SUFFIX,gov.cn,PROXY
# AcFun
- DOMAIN-SUFFIX,acfun.cn,PROXY
- DOMAIN-SUFFIX,acfun.com,PROXY
- DOMAIN-SUFFIX,aixifan.com,PROXY
# 网易
- DOMAIN-SUFFIX,163.com,PROXY
@groundcat
groundcat / Block_Baidu_Input_HOSTS.txt
Last active May 15, 2025 15:45
屏蔽搜狗/百度输入法后台联网
#<block-baidu>
127.0.0.1 olime.baidu.com
127.0.0.1 dr-ime.baidu.com
127.0.0.1 updateime.baidu.com
127.0.0.1 tips.ime.baidu.com
127.0.0.1 typing.bae.baidu.com
127.0.0.1 pcinput.baidu.com
#</block-baidu>
@groundcat
groundcat / use-dns-over-quic-linux.md
Last active March 19, 2025 09:08
How to install DoQ (DNS-over-QUIC) client on Linux

DNS Proxy is a simple DNS proxy server that supports all existing DNS protocols including DNS-over-TLS, DNS-over-HTTPS, DNSCrypt, and DNS-over-QUIC. Moreover, it can work as a DNS-over-HTTPS, DNS-over-TLS or DNS-over-QUIC server.

1. Install DNS Proxy

VERSION=$(curl -s https://api.github.com/repos/AdguardTeam/dnsproxy/releases/latest | grep tag_name | cut -d '"' -f 4) && echo "Latest AdguardTeam dnsproxy version is $VERSION"
wget -O dnsproxy.tar.gz "https://github.com/AdguardTeam/dnsproxy/releases/download/${VERSION}/dnsproxy-linux-amd64-${VERSION}.tar.gz"
tar -xzvf dnsproxy.tar.gz
cd linux-amd64
@groundcat
groundcat / .htaccess
Last active January 17, 2025 19:39
WordPress optimization for wp-config.php
# WP ...
# Hide .htaccess and wp-config.php
<Files .htaccess wp-config.php>
order allow,deny
deny from all
</Files>
# Block wp-includes folder and files
<IfModule mod_rewrite.c>
@groundcat
groundcat / install_whois_windows.md
Created January 16, 2025 08:08
How to install and run whois command in Windows 11
import re
from typing import List, Tuple
def parse_line(line: str) -> Tuple[List[str], str]:
line = line.strip()
if not line or line.startswith('//'):
return ([], line)
domain = line.lstrip('!').lstrip('*.')
@groundcat
groundcat / singleDomainChecker.py
Created July 25, 2024 02:39
PSL Single Domain Checker
import datetime
import sys
import os
import subprocess
import re
import webbrowser
from typing import List
def is_valid_domain(domain: str) -> bool:
regex = re.compile(
@groundcat
groundcat / wireguard-and-tailscale-example.conf
Created July 19, 2024 01:16
Make Wireguard VPN works together with Tailscale
[Interface]
PrivateKey = EXAMPLE
Address = EXAMPLE
DNS = EXAMPLE
MTU = EXAMPLE
[Peer]
PublicKey = EXAMPLE
AllowedIPs = 0.0.0.0/2, 64.0.0.0/3, 96.0.0.0/6, 100.0.0.0/10, 100.128.0.0/9, 101.0.0.0/8, 102.0.0.0/7, 104.0.0.0/5, 112.0.0.0/4, 128.0.0.0/1, ::/1, 8000::/2, c000::/3, e000::/4, f000::/5, f800::/6, fc00::/8, fd00::/10, fd40::/11, fd60::/12, fd70::/13, fd78::/15, fd7a::/20, fd7a:1000::/24, fd7a:1100::/26, fd7a:1140::/28, fd7a:1150::/29, fd7a:1158::/30, fd7a:115c::/33, fd7a:115c:8000::/35, fd7a:115c:a000::/40, fd7a:115c:a100::/41, fd7a:115c:a180::/42, fd7a:115c:a1c0::/43, fd7a:115c:a1e1::/48, fd7a:115c:a1e2::/47, fd7a:115c:a1e4::/46, fd7a:115c:a1e8::/45, fd7a:115c:a1f0::/44, fd7a:115c:a200::/39, fd7a:115c:a400::/38, fd7a:115c:a800::/37, fd7a:115c:b000::/36, fd7a:115c:c000::/34, fd7a:115d::/32, fd7a:115e::/31, fd7a:1160::/27, fd7a:1180::/25, fd7a:1200::/23, fd7a:1400::/22, fd7a:1800::/21, fd7a:2000::/19, fd7a:4000::/18, fd7a:8000::/17, fd7b::/16, fd7c::/14, fd80::/9, fe00::/7
Endpoint = EXAMPLE
@groundcat
groundcat / adguard-doh-ubuntu.md
Last active June 23, 2024 16:51
Setup AdGuard DNS Over HTTPS on Ubuntu

Download the cloudflared daemon.

wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64
mv cloudflared-linux-amd64 /usr/sbin/cloudflared
chmod -x /usr/sbin/cloudflared
cloudflared --version

Start the DNS proxy on an address and port in your network.

@groundcat
groundcat / auto-delete-cf-dns.js
Created April 7, 2024 09:19 — forked from azliabdullah/auto-delete-cf-dns.js
bulk delete all DNS records in cloudflare
/**
* 1. open cloudflare dashboard, choose domain, go to DNS section
* 2. open browser's dev tool (via F12 or inspect or however)
* 3. in devtool, go to console tab
* 4. clear all existing messages
* 5. paste all script below
* 6. hit enter and watch
* 7. script only delete records displayed in the screen
* 8. if want to delete more, refresh browser and run script again
*