Skip to content

Instantly share code, notes, and snippets.

@vmlinz
vmlinz / circumvention_tools.md
Last active May 11, 2018 04:02
Circumvention tools
@vmlinz
vmlinz / 3proxy_config.conf
Created July 15, 2015 06:23
3 proxy config for Psiphon with enforcing AKAMAI CDN
auth none
allow * * *.akamaihd.net
parent 1000 tcp 210.0.156.15 443
proxy -p8287 -i127.0.0.1
@vmlinz
vmlinz / circumvention_methods.md
Last active August 29, 2015 14:24
circumvention methods logs in China

Experiments and logs of circumvention methods

Methods

Http2 tunnel

  • nghttpx + selfsigned ca and cert, easy to configure and easy to use on Chrome/Firefox, stable, fast, tcp
  • nghttpx + official ca signed certs

Shadowsocks tunnel

@vmlinz
vmlinz / shadowsocks_multiport.md
Last active February 6, 2016 08:35
Multiport shadowsocks
@vmlinz
vmlinz / random_port_passwords.py
Created July 21, 2015 07:52
Generate random passwords
dict(map(lambda x: (x, ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(16))), range(30000,30200)))
@vmlinz
vmlinz / jinja_json_without_unicode.py
Created July 21, 2015 14:20
render jinja variable to json string without unicode prefix
# Issue #
When I want to print jinja variable to a json, the default filter will add a 'u' prefix to indicate the string encoding, but the configuration file sees this as syntax error.
## Resources
* https://stackoverflow.com/questions/8710758/json-is-appearing-as-unicode-entities-in-jinja2-template
* https://docs.ansible.com/ansible/playbooks_filters.html
@vmlinz
vmlinz / ipsec.conf
Created July 22, 2015 17:24
StrongSwan config
# ipsec.conf - strongSwan IPsec configuration file
config setup
charondebug="ike 2, knl 2, cfg 2, net 2, esp 2, dmn 2, mgr 2"
conn %default
keyexchange=ikev2
ike=aes128-sha256-ecp256,aes256-sha384-ecp384,aes128-sha256-modp2048,aes128-sha1-modp2048,aes256-sha384-modp4096,aes256-sha256-modp4096,aes256-sha1-modp4096,aes128-sha256-modp1536,aes128-sha1-modp1536,aes256-sha384-modp2048,aes256-sha256-modp2048,aes256-sha1-modp2048,aes128-sha256-modp1024,aes128-sha1-modp1024,aes256-sha384-modp1536,aes256-sha256-modp1536,aes256-sha1-modp1536,aes256-sha384-modp1024,aes256-sha256-modp1024,aes256-sha1-modp1024!
esp=aes128gcm16-ecp256,aes256gcm16-ecp384,aes128-sha256-ecp256,aes256-sha384-ecp384,aes128-sha256-modp2048,aes128-sha1-modp2048,aes256-sha384-modp4096,aes256-sha256-modp4096,aes256-sha1-modp4096,aes128-sha256-modp1536,aes128-sha1-modp1536,aes256-sha384-modp2048,aes256-sha256-modp2048,aes256-sha1-modp2048,aes128-sha256-modp1024,aes128-sha1-modp1024,aes256-sha384-modp1536,aes256-sha256-modp1536,aes2
@vmlinz
vmlinz / ss-gen-port-password.py
Last active August 29, 2015 14:25
Generate random port passwords for shadowsocks
#!/usr/bin/env python
import json
import random
import string
import yaml
def shadowsocks_generate_port_password(port_start, port_end, password_length):
return dict(map(lambda x: (x, ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(password_length))), range(port_start, port_end)))
@vmlinz
vmlinz / .editorconfig
Last active August 29, 2015 14:25 — forked from rafamaciel/.editorconfig
Basic configuration of editorconfig to work with python
;
; Global Editor Config for Adaptive Labbers
;
; This is an ini style configuration. See http://editorconfig.org/ for more information on this file.
;
; Top level editor config.
root = true
; Always use Unix style new lines with new line ending on every file and trim whitespace
[*]
end_of_line = lf
@vmlinz
vmlinz / rpc_microservices.md
Last active November 27, 2022 20:31
RPCs for microservices