Last active
June 10, 2023 10:04
-
-
Save wonderbeyond/6ef3cdc191490e02a6b12162deab4fd7 to your computer and use it in GitHub Desktop.
viaproxy "socks5 127.0.0.1 1080" telnet some-host
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/bash | |
# Author: wonderbeyond@gmail.com | |
# Usage: viaproxy "socks5 127.0.0.1 1080" telnet some-host | |
command -v proxychains4 > /dev/null && PROXYCHAINS="proxychains4 -q" || PROXYCHAINS=proxychains | |
proxy="$1" | |
shift | |
temp_conf_file=$(mktemp /tmp/viaproxy-proxchains-conf-XXXX) | |
trap "rm $temp_conf_file" EXIT | |
/bin/echo -e "strict_chain\nproxy_dns\nlocalnet 127.0.0.0/255.0.0.0\n[ProxyList]\n$proxy" > $temp_conf_file | |
$PROXYCHAINS -f "$temp_conf_file" "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
good