Skip to content

Instantly share code, notes, and snippets.

View janlay's full-sized avatar

Janlay Wu janlay

View GitHub Profile
@janlay
janlay / README.md
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
janlay / README.md
Last active March 28, 2024 02:20
魂签 (Soulsign) 脚本

About

魂签,一款用于自动签到的Chrome插件

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

Usage

  1. 从这里复制你想要的脚本 Raw URL
  2. 打开魂签「任务管理」
  3. 点击「添加脚本」按钮
  4. 粘贴 URL 并点击「保存」按钮
@janlay
janlay / README.md
Last active March 4, 2024 05:25
Yet another config for Surge.app

Install

  1. Modify index.txt with your output path and proxy info
  2. Use Text Builder to build configuration for Surge: $ text-builder -index /path/to/index.txt Or run $ sh build-all to build all your index files.
  3. Import configuration via AirDrop/iTunes/Dropbox/iCloud

本人不提供任何保证和技术支持,使用者自负风险。
There are no guarantees, no any support. Use it at your own risk.

@janlay
janlay / whitelist.pac
Last active February 29, 2024 20:23
A white-list based PAC.
/*
* A white-list based PAC without regexp, by @janlay
* It's just simple and fast.
* Last update: Oct 20, 2015
* Special thanks to @Paveo
*/
function FindProxyForURL(url, host) {
// REPLACE PROXY WITH YOUR OWN'S
var PROXY = "SOCKS 127.0.0.1:8801;SOCKS5 127.0.0.1:8801;PROXY 127.0.0.1:8800";
var BLACKHOLE = "127.0.0.2";
@janlay
janlay / README.md
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
janlay / README.md
Last active April 16, 2023 16:27
OpenAPI Proxy for Cloudflare Workers
@janlay
janlay / README.md
Last active October 8, 2022 03:22
jq Module for OpenSubtitles

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

Input:

OpenSubtitles's search result

Arguments:

  • language: Required. Format should be recognized by OpenSubtitles like "en", "zh", "zh-CN"
  • group: Optional. Movie's release group name
@janlay
janlay / README.md
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

Usage

  1. Prepare your Clash service with:
@janlay
janlay / README.md
Last active June 27, 2022 15:27
Delete and unfavorite tweets

Delete and unfavorite tweets

This util deletes your historical tweets from a downloaded archive file, unfavorites tweets from your public profile.

No guarantee, no support, use it at your own risk.

Preparations

  1. Apply to become a Twitter developer first.
    Once your Twitter developer account application is approved, You can create a new app and get its Consumer API keys and generate Access token. These keys are used to configure tweet.sh.
  2. Obtain archived tweets by requesting to download your Twitter data.
    You can extract tweet.js file from the downloaded .zip file.
@janlay
janlay / proxy.sh
Last active September 29, 2021 03:45
Toogle Proxy in command line
#!/bin/bash
# 1. source this file or append it to your bash/zsh profile.
# 2. modify https_proxy & http_proxy with your own proxy.
# 3. use `proxy on` to turn on proxy and `proxy off` to turn it off.
export PS1_backup=$PS1
function proxy () {
local prefix