標題: Configuration of transparent V2Ray proxy server using Raspberry Pi 3b 树莓派做V2Ray透明代理 [打印本頁] 作者: 角色 時間: 2019-1-25 23:48 標題: Configuration of transparent V2Ray proxy server using Raspberry Pi 3b 树莓派做V2Ray透明代理
部分man iptables信息:
TARGETS
A firewall rule specifies criteria for a packet and a target. If the packet does not match, the next rule in the chain is examined; if it does match, then the next rule is specified by the value of the target, which can be the name of a user-defined chain, one of the targets described in iptables-extensions(8), or one of the special values ACCEPT, DROP or RETURN.
man iptables-extensions关于TPROXY的信息:
.
.
.
TARGET EXTENSIONS
iptables can use extended target modules: the following are included in
the standard distribution.
.
.
.
TPROXY
This target is only valid in the mangle table, in the PREROUTING chain and user-defined chains which are only called from this chain. It redirects the packet to a local socket without changing the packet header in any way. It can also change the mark value which can then be used in advanced routing rules. It takes three options:
--on-port port
This specifies a destination port to use. It is a required
option, 0 means the new destination port is the same as the
original. This is only valid if the rule also specifies -p tcp
or -p udp.
--on-ip address
This specifies a destination address to use. By default the
address is the IP address of the incoming interface. This is
only valid if the rule also specifies -p tcp or -p udp.
--tproxy-mark value[/mask]
Marks packets with the given value/mask. The fwmark value set
here can be used by advanced routing. (Required for transparent
proxying to work: otherwise these packets will get forwarded,
which is probably not what you want.)