Last active
May 23, 2018 05:10
-
-
Save morteza-mori/e879bce95aa906fb15042a84fa8f2c0a to your computer and use it in GitHub Desktop.
privoxy + tor
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
.config file |
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
############################### | |
tor privoxy docker setting | |
apt-get install tor | |
apt-get install privoxy | |
nano /etc/privoxy/config | |
# forward-socks4 / socks-gw.example.com:1080 . | |
forward-socks4 / 127.0.0.1:9150 . | |
forward-socks5 / 127.0.0.1:9150 . | |
# forward-socks5t / 127.0.0.1:9050 . | |
# forwarded-connect-retries is mainly interesting for socks4a | |
# 6.8. socket-timeout | |
# Number of seconds after which a socket times out if no data is | |
# socket-timeout 300 | |
socket-timeout 300 | |
nano /etc/tor/torrc | |
SOCKSPort 9150 # Default: Bind to localhost:9050 for local connections. | |
service tor restart | |
service privoxy restart | |
apt-get install jq curl | |
echo $(curl -s http://ip-api.com/json | jq -r ".country,.city") | |
nano .bashrc | |
alias whereiam='echo $(curl -s http://ip-api.com/json | jq -r ".country,.city")' | |
alias x="export http_proxy='127.0.0.1:8118'" | |
alias dx="export http_proxy=''" | |
mkdir /etc/systemd/system/docker.service.d | |
/etc/systemd/system/docker.service.d/http-proxy.conf | |
[Service] | |
Environment="HTTP_PROXY=127.0.0.1:8118" | |
systemctl reload docker.service | |
mv /etc/systemd/system/docker.service.d/http-proxy /etc/systemd/system/docker.service.d/http-proxy.conf | |
systemctl show docker --property Environment | |
docker restarrt | |
whereiam |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
apt install openvpn
apt install screen
screen
openvpn --config /root/parspooyesh2.ovpn --route-nopull
ip route add 4.2.2.4 dev tun0
apt install mtr
mtr 4.2.2.4
######################################################
My traceroute [v0.87]
dev-docker (0.0.0.0) Wed Jul 5 15:49:25 2017
Resolver: Received error response 2. (server failure)er of fields quit
Packets Pings
Host Loss% Snt Last Avg Best Wrst StDev
##################################################################################
#roting to tun0
tcpdump -nti any port53
add ip route for 53 resolve ip
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.10.10.26 netmask 255.255.255.255 destination 10.10.10.25
inet6 fe80::29a6:1abb:c121:9ccf prefixlen 64 scopeid 0x20
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3 bytes 144 (144.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0