pstsrv: use `curl -x` instead of `torsocks`

This commit is contained in:
Lucas 2021-12-03 18:20:02 +00:00
parent 699363c409
commit 2e152aa82e
1 changed files with 6 additions and 6 deletions

View File

@ -43,18 +43,18 @@ check_runtime()
pst_catbox_moe()
{
$torsocks curl -F "reqtype=fileupload" -F "fileToUpload=@$1" \
curl $tor_flags -F "reqtype=fileupload" -F "fileToUpload=@$1" \
https://catbox.moe/user/api.php
}
pst_ix_io()
{
$torsocks curl -F "f:1=@$1" http://ix.io/
curl $tor_flags -F "f:1=@$1" http://ix.io/
}
pst_pst_moe()
{
$torsocks curl -F "content=<$1" -F "expire_after=86400" \
curl $tor_flags -F "content=<$1" -F "expire_after=86400" \
https://pst.moe/paste
}
@ -75,10 +75,10 @@ do_upload()
return $rc
}
torsocks=torsocks
tor_flags="-x socks5h://localhost:9050"
while getopts T flag; do
case $flag in
T) torsocks= ;;
T) tor_flags= ;;
*) usage ;;
esac
done
@ -90,7 +90,7 @@ fi
srv=$1
shift
check_runtime curl $torsocks
check_runtime curl ${tor_flags:+tor}
url=
[ $# -eq 0 ] && set -- -