x
Различия
Показаны различия между двумя версиями страницы.
| Предыдущая версия справа и слеваПредыдущая версияСледующая версия | Предыдущая версия | ||
| x [20.07.2025 07:29] – augin | x [20.07.2025 07:44] (текущий) – [Examples for transparent proxy] augin | ||
|---|---|---|---|
| Строка 90: | Строка 90: | ||
| Add a dokodemo-door inbound as below. | Add a dokodemo-door inbound as below. | ||
| + | <code | download> | ||
| { | { | ||
| " | " | ||
| Строка 95: | Строка 96: | ||
| " | " | ||
| } | } | ||
| + | </ | ||
| Configure iptables as below. | Configure iptables as below. | ||
| - | # Create new chain | + | <code bash> |
| + | # Создаём новую цепь | ||
| iptables -t nat -N V2RAY | iptables -t nat -N V2RAY | ||
| iptables -t mangle -N V2RAY | iptables -t mangle -N V2RAY | ||
| iptables -t mangle -N V2RAY_MARK | iptables -t mangle -N V2RAY_MARK | ||
| - | # Ignore your V2Ray server' | + | # Игнорируем адреса серверов |
| - | # It's very IMPORTANT, just be careful. | + | # Это ОЧЕНЬ ВАЖНО, будьте внимательны. |
| iptables -t nat -A V2RAY -d 123.123.123.123 -j RETURN | iptables -t nat -A V2RAY -d 123.123.123.123 -j RETURN | ||
| - | # Ignore LANs and any other addresses you'd like to bypass the proxy | + | # Игнорируем адреса локальной сети и любые другие адреса, |
| - | # See Wikipedia and RFC5735 | + | # которые не требуется пропускать через прокси-сервер |
| + | # См. Википедию и RFC5735 | ||
| iptables -t nat -A V2RAY -d 0.0.0.0/8 -j RETURN | iptables -t nat -A V2RAY -d 0.0.0.0/8 -j RETURN | ||
| iptables -t nat -A V2RAY -d 10.0.0.0/8 -j RETURN | iptables -t nat -A V2RAY -d 10.0.0.0/8 -j RETURN | ||
| Строка 117: | Строка 121: | ||
| iptables -t nat -A V2RAY -d 240.0.0.0/4 -j RETURN | iptables -t nat -A V2RAY -d 240.0.0.0/4 -j RETURN | ||
| - | # Anything else should be redirected to Dokodemo-door's local port | + | # Всё остальное перенаправляем на локальный порт |
| iptables -t nat -A V2RAY -p tcp -j REDIRECT --to-ports 12345 | iptables -t nat -A V2RAY -p tcp -j REDIRECT --to-ports 12345 | ||
| - | # Add any UDP rules | + | # Добавляем правила для |
| ip route add local default dev lo table 100 | ip route add local default dev lo table 100 | ||
| ip rule add fwmark 1 lookup 100 | ip rule add fwmark 1 lookup 100 | ||
| Строка 126: | Строка 130: | ||
| iptables -t mangle -A V2RAY_MARK -p udp --dport 53 -j MARK --set-mark 1 | iptables -t mangle -A V2RAY_MARK -p udp --dport 53 -j MARK --set-mark 1 | ||
| - | # Apply the rules | + | # Применяем правила |
| iptables -t nat -A OUTPUT -p tcp -j V2RAY | iptables -t nat -A OUTPUT -p tcp -j V2RAY | ||
| iptables -t mangle -A PREROUTING -j V2RAY | iptables -t mangle -A PREROUTING -j V2RAY | ||
| - | iptables -t mangle -A OUTPUT -j V2RAY_MARK | + | iptables -t mangle -A OUTPUT -j V2RAY_MARK</ |
x.1752996578.txt.gz · Последнее изменение: — augin
