主要维护额外的 CHN Route ip 段。目前仅有腾讯游戏相关。
在 load 了 chn 之后,额外使用 ipset restore -f chn_additional.ipset 将这些条目加入到已有的 chn ipset 中。
软路由上使用 CHN Route 导致王者荣耀延迟爆炸,tcpdump 一通操作最后筛选出来几个腾讯游戏的 ip 段。 这些 ip 段并不是直接用于游戏对局的,但他们会影响对局服务器 ip 分配,也算是 DNS 吧。
| 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>>>>, | |
| } |
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.
| package main | |
| import ( | |
| "flag" | |
| "io" | |
| "log" | |
| "net" | |
| "os" | |
| "time" | |
| ) |
| 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' | |
| } |
下载官方SDK后,修改脚本中的WORKDIR,chmod +x shadowsocks-build.sh后执行即可。
我编译的版本(10/07/2018) https://drive.google.com/drive/folders/1kTR73hkzAeMW-gXE2EacNa4Yte8o7JWU
| 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)); |
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.
Edit key_prefix, set it to the prefix of you bot address(like /bot563441998:) can avoid abusing.