()
| 1402 | ssl_log(f"{current_identifier}/r0capture_ssl.pcap", True) |
| 1403 | |
| 1404 | def un_proxy(): |
| 1405 | run_su_command(r"for i in $(iptables -t nat -L OUTPUT --line-numbers | grep REDIRECT |grep 12345 | awk \"{print \$1}\" | sort -rn); do iptables -t nat -D OUTPUT $i; done") |
| 1406 | run_su_command("iptables -t nat -F REDSOCKS") |
| 1407 | run_su_command("iptables -t nat -D OUTPUT -p tcp -j REDSOCKS") |
| 1408 | run_su_command("iptables -t nat -X REDSOCKS") |
| 1409 | run_su_command("killall redsocks") |
| 1410 | run_su_command("pid=$(ps -ef | grep '[r]edsocks' | awk '{print $2}'); [ -n \"$pid\" ] && kill -9 $pid") |
| 1411 | |
| 1412 | def set_proxy(proxy): |
| 1413 | pattern = r'(http|socks5)://(\d{2,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}):(\d+)$' |
no test coverage detected