This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Inside the firewall ( use proxy) | |
Host * | |
#ProxyCommand /usr/bin/corkscrew 192.168.1.102 8080 %h %p | |
#ProxyCommand putty -load phoneproxy %h %p | |
#ProxyCommand nc -X connect -x 192.168.1.102:8080 %h %p | |
CheckHostIP no | |
Compression yes | |
Protocol 2 | |
ProxyCommand connect -4 -S 192.168.1.150:9050 $(tor-resolve %h 192.168.1.150:9050) %p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PROXY_IP=144.16.192.247 | |
PROXY_PORT=8080 | |
LAN_IP=`nvram get lan_ipaddr` | |
LAN_NET=$LAN_IP/`nvram get lan_netmask` | |
iptables -t nat -A PREROUTING -i br0 -s $LAN_NET -d ! $LAN_IP -p tcp --dport 80 -j DNAT --to $PROXY_IP:$PROXY_PORT | |
iptables -t nat -A PREROUTING -i br0 -s $LAN_NET -d ! $LAN_IP -p tcp --dport 443 -j DNAT --to $PROXY_IP:$PROXY_PORT | |
iptables -t nat -A POSTROUTING -o br0 -s $PROXY_IP -p tcp -d $LAN_NET -j SNAT --to $PROXY_IP | |
iptables -A FORWARD -i vlan1 -o br0 -s $LAN_NET -d $PROXY_IP -p tcp --dport $PROXY_PORT -j ACCEPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smtpd | |
import smtplib | |
import asyncore | |
class SMTPServer(smtpd.SMTPServer): | |
def __init__(*args, **kwargs): | |
print "Running smtp server on port 25" |
NewerOlder