This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""Forward SOCKSv5 requests to HTTP proxy. | |
Frontend: accept SOCKSv5 CONNECT request. | |
Backend: HTTP proxy with CONNECT support. | |
""" | |
import asyncio | |
import logging | |
from struct import pack, unpack | |
from ipaddress import IPv4Address, IPv6Address |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import asyncio | |
from struct import pack | |
from ipaddress import ip_address | |
TIMEOUT = 300 | |
OBFS_BIN = '/usr/bin/obfs4proxy' | |
OBFS_EXEC_PARAMS = ['-enableLogging', '-logLevel', 'DEBUG'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Forward DNS query (in UDP) to a set of servers in parallel, then send back | |
the fastest reply and ignore others. TCP queries are directly forward to a | |
fixed server. | |
""" | |
import asyncio | |
import socket | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am sorz on github. | |
* I am sorz (https://keybase.io/sorz) on keybase. | |
* I have a public key ASAiBGBuAlnIQQZyMycLhfqfUdOoLsNj_hHy0MlBUZjfZQo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import socket | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
s.bind(('0.0.0.0', 6000)) | |
while True: | |
data, addr = s.recvfrom(1024) | |
s.sendto(str(addr[1]), addr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name IPN - Add Type is Beautiful episodes | |
// @namespace org.sorz.lab.ipn | |
// @include https://ipn.li/ | |
// @include http://ipn.li/ | |
// @version 5 | |
// @grant GM_xmlhttpRequest | |
// @grant GM_getResourceURL | |
// @grant GM_addStyle | |
// @require http://code.jquery.com/jquery-3.2.0.min.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aaaa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
DIR=/path/to/www/public | |
DATA=/path/to/pms5003.rrd | |
TIME=$1 | |
time=$(date '+%H\:%M\:%S') | |
rrdtool graph $DIR/pm-$TIME.svg \ | |
--imgformat SVG \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name IPN - Fixed show list on homepage | |
// @namespace org.sorz.lab.ipn | |
// @include https://ipn.li/ | |
// @version 1 | |
// @grant none | |
// @require http://code.jquery.com/jquery-3.2.0.slim.min.js | |
// ==/UserScript== | |
let items = $('.showList > li').toArray(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Transmission-DMHY | |
// @namespace org.sorz.lab.transmission-dmhy | |
// @include https://example.com/transmission/web/* | |
// @version 1 | |
// @grant GM_xmlhttpRequest | |
// @require http://code.jquery.com/jquery-3.1.1.slim.min.js | |
// ==/UserScript== | |
const ICON = 'https://share.dmhy.org/favicon.ico'; |