redsocks
redsocks copied to clipboard
Help, problem with reudp(
Hello, tell me please, I can’t figure it out and get reudp to work I do on ANDROID the proxy is working, but I can't turn everything into a reudp
base {
log_debug = off;
log_info = off;
log = stderr;
daemon = on;
redirector = iptables;
}
redsocks {
bind = "0.0.0.0:8123";
relay = "proxy_server:proxy_port";
type = socks5;
login = "login";
password = "password";
}
redudp {
bind = "127.0.0.1:10053";
relay = "proxy_server:proxy_port";
type = socks5;
login = "login";
password = "password";
dest = "217.169.120.78:53";
udp_timeout = 30;
}
tcpdns {
bind = "127.0.0.1:1053";
tcpdns1 = "217.169.120.78:53";
tcpdns2 = "217.169.120.78:53" ;
timeout = 4;
}
iptables
iptables -I OUTPUT -p tcp --dport 53 -d 10.0.0.0/8 -j DROP
iptables -I OUTPUT -p udp --dport 53 -d 10.0.0.0/8 -j DROP
iptables -t nat -N REDSOCKS
iptables -t nat -I OUTPUT -j REDSOCKS
iptables -t nat -A REDSOCKS -d 10.0.0.0/8 -j RETURN
iptables -t nat -A REDSOCKS -d 127.0.0.0/8 -j RETURN
iptables -t nat -A REDSOCKS -d 172.16.0.0/12 -j RETURN
# DNAT dns
/system/bin/iptables -t nat -A REDSOCKS -p tcp --dport 53 -j DNAT --to 127.0.0.1:10053
/system/bin/iptables -t nat -A REDSOCKS -p udp --dport 53 -j DNAT --to 127.0.0.1:10053
tcpdump
If iptables -A OUTPUT -p udp -j ACCEPT
then DNS will go to servers 8.8.8.8 8.8.1.1 I understand that they are registered on the android
log redsock2
直觉告诉我,你的socks proxy并不支持udp association.
直觉告诉我,你的socks proxy并不支持udp association.
Use 如何使用Android NDK交叉编译redsocks2 ARM
https://github.com/semigodking/redsocks/wiki/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8Android-NDK%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91redsocks2
Android 7.1.2
I did it like this but it didn't work
UDP透明代理配置示例
Android 7.1.2 is behind NAT
Intuition tells me that your socks proxy does not support udp association.
Use How to cross compile redsocks2 ARM with Android NDK
https://github.com/semigodking/redsocks/wiki/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8Android-NDK%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91redsocks2
Android 7.1.2
I did it like this but it didn't work
Configuration example of UDP transparent proxy
I built it. (For arm and arm64)