Skip to content

Instantly share code, notes, and snippets.

View janlay's full-sized avatar

Janlay Wu janlay

View GitHub Profile
janlay /
Last active April 16, 2023 16:27
OpenAPI Proxy for Cloudflare Workers
janlay /
Last active October 23, 2023 04:29
Surge Modules

Here are some Surge modules created by me.

Tesla China

This module makes Tesla app access its services targeted in China mainland. Install it with this link.

DNS Daily Sweeper

Automatically flushes DNS records everyday. Install it with this link.

janlay /
Last active October 8, 2022 03:22
jq Module for OpenSubtitles

This module picks the best subtitle from OpenSubtitles' search result. Created by @janlay


OpenSubtitles's search result


  • language: Required. Format should be recognized by OpenSubtitles like "en", "zh", "zh-CN"
  • group: Optional. Movie's release group name
janlay /
Last active September 26, 2022 15:59
Clash tun and Telegram

Clash tun and Telegram

This gist provides key guideline to make Clash tun handle Telegram's pure IP traffic.

You may want to change the corresponding items in the script

  • The IP list file telegram.list is located in /etc/asn/
  • 7892 is redir-port in Clash's config file
  • iptables module iptables-mod-extra is required for the --match-set usage


  1. Prepare your Clash service with:
janlay /
Last active March 28, 2024 02:20
魂签 (Soulsign) 脚本



这里存放由我创建或改进的魂签 (Soulsign) 脚本


  1. 从这里复制你想要的脚本 Raw URL
  2. 打开魂签「任务管理」
  3. 点击「添加脚本」按钮
  4. 粘贴 URL 并点击「保存」按钮

Keybase proof

I hereby claim:

  • I am janlay on github.
  • I am janlay ( on keybase.
  • I have a public key ASAdsgFM0gJM4sbu3Jm2dr4rysHJIdVt4leRb1UI_JGX3wo

To claim this, I am signing this object:

janlay /
Last active April 7, 2021 08:52
Backup Bitwarden Data
set -e
# Backup db and certs in $BITWARDEN_DIR into $TARGET_DIR/$FILENAME_PREFIX$DATE.tar.gz
janlay / edge-ramdisk.reg
Created June 11, 2020 07:10
Open Microsoft Edge with RAMDisk's caching directory
Windows Registry Editor Version 5.00
@="\"C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe\" --disk-cache-dir=R:\\MSEdge -- \"%1\""
@="\"C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe\" --disk-cache-dir=R:\\MSEdge -- \"%1\""
@="\"C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe\" --disk-cache-dir=R:\\MSEdge -- \"%1\""
janlay /
Last active April 8, 2024 07:43
Rule sets for Surge & Clash

Janlay's public ruleset

Enjoy all the common rulesets brought by janlay.

A quick guideline

In the rules section of Surge/Clash config, use the shared rulesets in this order:

  1. blocked-domains
  2. quick-direct
  3. loc-sens
  4. traffic
  5. \
janlay / tput-table
Created April 9, 2020 04:06
Full preview for tput foreground and background
# author:
set -e
cols=$(bc <<< "$(tput cols) / 3 - 2")
echo -n ' '
for col in $(seq 0 $cols); do