using proxychains with shadowsocks and fiddler
#!/bin/sh
# This script is called by proxychains to resolve DNS names
# DNS server used to resolve names
DNS_SERVER=${PROXYRESOLV_DNS:-4.2.2.2}
if [ $# = 0 ] ; then
echo " usage:"
echo " proxyresolv <hostname> "
exit
fi
export LD_PRELOAD=libproxychains.so.3
if [ $DNS_SERVER = "none" ] ; then
dig $1 +tcp | awk '/A.+[0-9]+\.[0-9]+\.[0-9]/{print $5;}'
else
dig $1 @$DNS_SERVER +tcp | awk '/A.+[0-9]+\.[0-9]+\.[0-9]/{print $5;}'
fi
change:
useage:
mv -f ~/.ssh/known_hosts /home/tojo/.ssh/known_hosts.bak
cp /mnt/c/Users/sykie/.ssh/* ~/.ssh
chmod 600 ~/.ssh/*
chmod 655 ~/.ssh/authorized_keys
mv -f ~/.ssh/known_hosts.bak ~/.ssh/known_hosts
alias sudo='sudo '
alias pf='ln -sf /etc/proxyfiddler.conf $HOME/.proxychains/proxychains.conf; PROXYRESOLV_DNS=none proxychains'
alias pc='ln -sf /etc/proxychains.conf $HOME/.proxychains/proxychains.conf; proxychains'
# function pf(){
# ln -sf /etc/proxyfiddler.conf $HOME/.proxychains/proxychains.conf
# PROXYRESOLV_DNS=none proxychains ${@:1}
# }
# function pc(){
# ln -sf /etc/proxychains.conf $HOME/.proxychains/proxychains.conf
# proxychains ${@:1}
# }