Skip to content

Instantly share code, notes, and snippets.

@TimothyZhang023
TimothyZhang023 / config.sh
Created January 11, 2021 12:45 — forked from muzea/config.sh
init shell
case "$1" in
'install')
apt update
apt install git curl zsh vim htop -y
chsh -s $(which zsh)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
;;
'docker')
apt-get update
apt-get install \
@TimothyZhang023
TimothyZhang023 / private.xml
Last active May 26, 2020 08:17 — forked from giaosudau/private.xml
Karabiner for M545
<?xml version="1.0"?>
<root>
<item>
<name>Logitech M545 Mouse</name>
<devicevendordef>
<vendorname>LOGITECH</vendorname>
<vendorid>0x046d</vendorid>
</devicevendordef>
<deviceproductdef>
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@TimothyZhang023
TimothyZhang023 / ss-redir 透明代理.md
Created February 10, 2017 07:23 — forked from Tai7sy/ss-redir 透明代理.md
ss-redir 透明代理.md

##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 可用,但端口一致,就设置这个
@TimothyZhang023
TimothyZhang023 / README.md
Last active September 7, 2015 09:50 — forked from hwdsl2/.MOVED.md
IPsec L2TP VPN Auto Install Script for Ubuntu 14.04 & 12.04 and Debian 8
#!/bin/sh
#create a new chain named SHADOWSOCKS
iptables -t nat -N SHADOWSOCKS
# Ignore your shadowsocks server's addresses
# It's very IMPORTANT, just be careful.
iptables -t nat -A SHADOWSOCKS -d YOUR-SERVERS-IP-ADDRESS -j RETURN
# Ignore LANs IP address