Skip to content

Instantly share code, notes, and snippets.

View falseen's full-sized avatar

Falseen falseen

View GitHub Profile
@falseen
falseen / socket.py
Last active February 21, 2017 06:16
限制ss客户端数量(基于ip判断),理论上可以用于其他使用了socket模块的python程序。为方便管理,已迁移至github : https://github.com/falseen/socket_path
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 Falseen
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@jason5ng32
jason5ng32 / surge.conf
Last active April 7, 2024 13:04
Surge Configs ( for 2.x )
[General]
loglevel = notify
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
# dns-server = 119.29.29.29,223.5.5.5,114.114.115.115
# external-controller-access = PASSWORD@0.0.0.0:6155
# ipv6 = true
// REMEMBER TO CHANGE THE external-controller-access' PASSWORD
@klzgrad
klzgrad / 00-README.txt
Last active April 19, 2024 09:26
DNS compression pointer mutation
$ LD_PRELOAD=$PWD/sendmsg.so dig twitter.com @8.8.8.8
;; Warning: Message parser reports malformed message packet. <-- malformed 因为把压缩指针当作域名一部分了
;; Question section mismatch: got twitter.com/RESERVED0/CLASS256
; <<>> DiG 9.9.5-3-Ubuntu <<>> twitter.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44722
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
@bao3
bao3 / profile.xml
Last active September 21, 2017 02:59
用于 ocserv的profile.xml,会自动被思科客户端读取。这个配置文件有两个服务地址( VPN Server和 Full VPN Server),前者是区分路由模式的,后者是同一台服务不同端口的完全走VPN的模式。你可以在此基础上加入休眠后自动恢复项等等,但是请切记,一旦你改错了这个文档就会造成服务器不认证书或者客户端干脆禁止你连接。救赎的方法。。。。可耻的匿了。
<?xml version="1.0" encoding="UTF-8"?>
<AnyConnectProfile xmlns="http://schemas.xmlsoap.org/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/encoding/ AnyConnectProfile.xsd">
<ClientInitialization>
<UseStartBeforeLogon UserControllable="false">false</UseStartBeforeLogon>
<StrictCertificateTrust>false</StrictCertificateTrust>
<RestrictPreferenceCaching>false</RestrictPreferenceCaching>
<RestrictTunnelProtocols>IPSec</RestrictTunnelProtocols>
<BypassDownloader>true</BypassDownloader>
<WindowsVPNEstablishment>AllowRemoteUsers</WindowsVPNEstablishment>
IP Addresses of Google Global Cache
www.kookle.co.nr
Bulgaria 93.123.23.1 93.123.23.2 93.123.23.3 93.123.23.4 93.123.23.5 93.123.23.6 93.123.23.7 93.123.23.8 93.123.23.9
93.123.23.10 93.123.23.11 93.123.23.12 93.123.23.13 93.123.23.14 93.123.23.15 93.123.23.16 93.123.23.17 93.123.23.18 93.123.23.19
93.123.23.20 93.123.23.21 93.123.23.22 93.123.23.23 93.123.23.24 93.123.23.25 93.123.23.26 93.123.23.27 93.123.23.28 93.123.23.29
93.123.23.30 93.123.23.31 93.123.23.32 93.123.23.33 93.123.23.34 93.123.23.35 93.123.23.36 93.123.23.37 93.123.23.38 93.123.23.39
93.123.23.40 93.123.23.41 93.123.23.42 93.123.23.43 93.123.23.44 93.123.23.45 93.123.23.46 93.123.23.47 93.123.23.48 93.123.23.49
93.123.23.50 93.123.23.51 93.123.23.52 93.123.23.53 93.123.23.54 93.123.23.55 93.123.23.56 93.123.23.57 93.123.23.58 93.123.23.59
Egypt 197.199.253.1 197.199.253.2 197.199.253.3 197.199.253.4 197.199.253.5 197.199.253.6 197.199.253.7 197.199.253.8 197.199.253.9
@diyism
diyism / dns txt vbs apk downloader
Created June 9, 2013 15:25
用DNS TXT+vbs翻墙脚本(<=1024字节)直接把手机应用送到小白们的电脑上
1.在GAE或HeroKu等具有全球负载均衡(GSLB)的服务商放置apk文件, 比如GAE:
https://d-x-com.appspot.com/x.apk
2.设置d.x.com的DNS TXT记录(日常需要更新其中的IP地址为可用地址,当然在1024字节内可以写得更智能点):
Set r=CreateObject("WinHttp.WinHttpRequest.5.1"):r.open "GET","https://173.194.66.143/x.apk",false:r.option(4)=4096:r.setRequestHeader "Host","d-x-com.appspot.com":r.send():Set m=CreateObject("ADODB.Stream"):m.Type=1:m.Open():m.Write(r.responseBody):m.SaveToFile "x.apk",2
3.在任何地方张贴下面一行代码, 用户在windows dos运行, 就能在所在目录下载到x.apk文件:
nslookup -vc -type=TXT d.x.com 8.8.8.8 | (for /F "tokens=*" %f in ('findstr """"') do @(echo|set /P str=%f)) > a.vbs & a.vbs