OpenVPN 代理流量

代理所有流量

1
redirect-gateway def1

代理所有流量,排除某些 IP 段

1
2
3
redirect-gateway def1
route ${domain_or_ip1} ${netmask1} net_gateway
route ${domain_or_ip2} ${netmask2} net_gateway

仅某些 IP 段经过代理

1
2
route ${domain_or_ip1} ${netmask1} vpn_gateway
route ${domain_or_ip2} ${netmask2} vpn_gateway