Skip to content

Instantly share code, notes, and snippets.

View alinuxsa's full-sized avatar
🎮

脑袋总进水 alinuxsa

🎮
View GitHub Profile
#!/usr/bin/perl
use strict;
use warnings;
use autodie;
my $mirrors = 'https://mirrors.tuna.tsinghua.edu.cn/centos-stream';
if (@ARGV < 1) {
die "Usage: $0 <filename1> <filename2> ...\n";
[Rule]
[URL Rewrite]
^https?:\/\/overseas\.weico\.cc\/portal\.php\?a=get_coopen_ads - reject
^https?:\/\/weibointl\.api\.weibo\.cn\/portal\.php.*ads&c=ad.* - reject
^https?:\/\/weibointl\.api\.weibo\.cn\/portal\.php\?a=get_coopen_ads - reject
^https?:\/\/weicoapi\.weico\.cc\/img\/ad\/ - reject-img
#example plugin
[Url Rewrite]
^https?://(www.)?baidu.com REJECT
[Script]
cron "1 10 * * *" tag=Corn脚本测试, script-path=https://gist.githubusercontent.com/alinuxsa/30ab47a41e013d6bb131c7f59309f245/raw/b40db4ea68e0b37f01464e11699a5707e419d9da/script-demo.js
[MITM]
hostname = ios.prod.ftl.netflix.com
function Notify()
{
console.log("开始发送通知");
$notification.post('Title','SubTitle','Content');
}
Notify()
console.log("结束发送通知");
@alinuxsa
alinuxsa / socks5_proxy.go
Created November 23, 2020 05:01 — forked from felix021/socks5_proxy.go
Minimal socks5 proxy implementation in Golang
package main
import (
"encoding/binary"
"errors"
"fmt"
"io"
"net"
)
URL-REGEX,^https?+:\/\/\w+\.o0-\d\.com
DOMAIN,api.iplay.163.com,🎵 网易云音乐
DOMAIN,apm3.music.163.com,🎵 网易云音乐
DOMAIN,apm.music.163.com,🎵 网易云音乐
DOMAIN,interface3.music.163.com,🎵 网易云音乐
DOMAIN,interface.music.163.com,🎵 网易云音乐
DOMAIN,music.163.com,🎵 网易云音乐
IP-CIDR,39.105.63.80/32,🎵 网易云音乐
IP-CIDR,45.254.48.1/32,🎵 网易云音乐
IP-CIDR,47.100.127.239/32,🎵 网易云音乐
IP-CIDR,59.111.160.195/32,🎵 网易云音乐
@alinuxsa
alinuxsa / chan.go
Last active December 4, 2019 07:06
go channel 模拟打球
package main
import (
"fmt"
"math/rand"
"sync"
"time"
)
func init() {
[Unit]
Description=The NGINX HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/tmp/nginx.pid
ExecStartPre=/usr/local/nginx1.13.5.tls1.3/sbin/nginx -t
ExecStart=/usr/local/nginx1.13.5.tls1.3/sbin/nginx
ExecReload=/usr/local/nginx1.13.5.tls1.3/sbin/nginx -s reload
@alinuxsa
alinuxsa / interface-demo.go
Created September 19, 2019 01:52
go接口的使用
package main
import (
"fmt"
)
type Demo interface {
Add()
Get()
}