Skip to content

Instantly share code, notes, and snippets.

View jinwyp's full-sized avatar

Jin jinwyp

View GitHub Profile

##ss-redir 的 iptables 配置(透明代理)

透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则

创建 /etc/ss-redir.json 本地监听 7777 运行ss-redir -v -c /etc/ss-redir.json

iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个

配置 shadowsocks

架设好 shadowsocks 服务端,在路由器上安装 shadowsocks 客户端,并配置 /etc/config/shadowsocks.json ,假设本地监听端口为 1080 。启动 shadowsocks

/etc/init.d/shadowsocks start

配置 privoxy

安装 privoxy openwrt 版。

@jinwyp
jinwyp / firewall.sh
Created December 12, 2013 05:14 — forked from x1a0/firewall.sh
#! /bin/bash
# Set the default policies to allow everything while we set up new rules.
# Prevents cutting yourself off when running from remote SSH.
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
# Flush any existing rules, leaving just the defaults
iptables -F

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
Binxing Fang, http://en.wikipedia.org/wiki/Fang_Binxing
方滨兴,中国工程院院士,北京邮电大学教授,中国科学院计算技术研究所网 络方向首席科学家。
Gang Xiong, http://rd.springer.com/search?facet-author=%22Gang+Xiong%22
熊刚, 高级工程师, 研究方向为信息安全。E-mail: xionggang@ict.ac.cn。
Weili Han, http://crypto.fudan.edu.cn/people/weili/
韩伟力, http://homepage.fudan.edu.cn/wlhan/en
This is just my personal gist clip.