Skip to content

Instantly share code, notes, and snippets.

View jj11hh's full-sized avatar

Jiang Yiheng jj11hh

  • Netease Games
  • Zhejiang, China
View GitHub Profile
@boypt
boypt / tproxy.sh
Last active December 25, 2023 07:28
TPROXY use case with v2ray
#!/bin/bash
apply_mangle() {
ip rule add fwmark 1 table 100
ip route add local 0.0.0.0/0 dev lo table 100
iptables -t mangle -N V2RAY_MASK
iptables -t mangle -A V2RAY_MASK -m set --match-set white_list dst -j RETURN
iptables -t mangle -A V2RAY_MASK -p udp -m multiport --ports 53,67:68,135:139 -j RETURN