Skip to content

Instantly share code, notes, and snippets.

View ihciah's full-sized avatar

ihc童鞋@提不起劲 ihciah

View GitHub Profile
@ihciah
ihciah / README.md
Created April 9, 2022 10:36
CHN Route Additional

额外 CHN Route

主要维护额外的 CHN Route ip 段。目前仅有腾讯游戏相关。

加载

在 load 了 chn 之后,额外使用 ipset restore -f chn_additional.ipset 将这些条目加入到已有的 chn ipset 中。

腾讯游戏

软路由上使用 CHN Route 导致王者荣耀延迟爆炸,tcpdump 一通操作最后筛选出来几个腾讯游戏的 ip 段。 这些 ip 段并不是直接用于游戏对局的,但他们会影响对局服务器 ip 分配,也算是 DNS 吧。

@ihciah
ihciah / global_cache.rs
Created January 19, 2022 08:51
Rust Global Cache
use std::{borrow::Borrow, cell::UnsafeCell, hash::Hash, ptr::NonNull, sync::RwLock};
use fxhash::FxHashMap;
// const CACHE: Cache = unsafe { Cache::new() };
struct Cache<K, V> {
data: UnsafeCell<NonNull<RwLock<FxHashMap<K, V>>>>,
}
@ihciah
ihciah / README.md
Last active March 30, 2025 12:02
V2ray with cloudflare websocket

Configure v2ray with cloudflare with docker and docker-compose

  • caddy-*: http server related files
  • v2ray-*: v2ray related files
  • forword-*: files to relay requests
@ihciah
ihciah / README.MD
Last active June 4, 2023 01:23
V2ray MTProto through Shadowsocks

V2ray MTProto through Shadowsocks

Why use it

The MTProto is easy to block; shadowsocks is hard to identify but cannot work without a client.

You can deylop this docker image to run a relay inside the firewall (China/Russia etc.), it provide a MTProto and all the packets will be sent through shadowsocks protocol.

How to run

@ihciah
ihciah / portfw.go
Last active May 21, 2019 09:34
Port forward for SMB
package main
import (
"flag"
"io"
"log"
"net"
"os"
"time"
)
@ihciah
ihciah / ss-test.py
Created January 9, 2019 11:01
speed-test
import requests
import time
proxies_original = {
'http': 'socks5://127.0.0.1:18081',
'https': 'socks5://127.0.0.1:18081'
}
proxies_my = {
'http': 'socks5://127.0.0.1:18080',
'https': 'socks5://127.0.0.1:18080'
}
@ihciah
ihciah / README.md
Last active April 8, 2020 06:09
小米路由器 Pro (R3P) 配置shadowsocks透明代理

小米路由器 Pro (R3P) 配置shadowsocks透明代理

新入了一个小米路由器,记录一下折腾过程。

首先自动分流科学上网是必须的。

因为小米的ROM本身就是基于openwrt的,所以第一步只需要先走官方途径拿到root权限。

有了权限就只需要找一个别人造的轮子部署一下即可。

@ihciah
ihciah / README.md
Last active February 8, 2021 07:32
小米路由器 Pro (R3P) 静态编译 shadowsocks
@ihciah
ihciah / tasker.js
Created September 19, 2018 05:46
Forward SMS using Tasker
var SMS = global('SMSRB');
var SENDER = global('SMSRF');
var SMSCONTENT = SMS + "\nSender: " + SENDER + "\nFrom Mobile"
var url = "https://xxxxxxxx/sendMessage?chat_id=0000000";
var xhttp = new XMLHttpRequest();
xhttp.open("POST", url, false);
xhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xhttp.send("text="+encodeURIComponent(SMSCONTENT));
@ihciah
ihciah / README.MD
Last active March 14, 2026 22:17
A reverse proxy for Telegram Bot API on Aliyun Function Compute / Cloudflare Workers

A reverse proxy for Telegram Bot API on Aliyun Function Compute / Cloudflare Workers

To help users in China mainland access telegram api stably and conveniently with low cost, this script maybe the one you need.

The server-less means you don't have to run a server to proxy the requests, just pay as you go.

Usage

Edit key_prefix, set it to the prefix of you bot address(like /bot563441998:) can avoid abusing.