mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
http: Add flag to force use of TOR (part 1)
* common/http.h (HTTP_FLAG_FORCE_TOR): New. * common/http.c (http_raw_connect, send_request): Detect flag and return an error for now. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
f986b23e13
commit
b4bc1c8b10
3 changed files with 22 additions and 1 deletions
|
@ -174,6 +174,7 @@ main (int argc, char **argv)
|
|||
" --cacert FNAME expect CA certificate in file FNAME\n"
|
||||
" --no-verify do not verify the certificate\n"
|
||||
" --force-tls use HTTP_FLAG_FORCE_TLS\n"
|
||||
" --force-tor use HTTP_FLAG_FORCE_TOR\n"
|
||||
" --no-out do not print the content\n",
|
||||
stdout);
|
||||
exit (0);
|
||||
|
@ -217,6 +218,11 @@ main (int argc, char **argv)
|
|||
my_http_flags |= HTTP_FLAG_FORCE_TLS;
|
||||
argc--; argv++;
|
||||
}
|
||||
else if (!strcmp (*argv, "--force-tor"))
|
||||
{
|
||||
my_http_flags |= HTTP_FLAG_FORCE_TOR;
|
||||
argc--; argv++;
|
||||
}
|
||||
else if (!strcmp (*argv, "--no-out"))
|
||||
{
|
||||
no_out = 1;
|
||||
|
@ -316,6 +322,8 @@ main (int argc, char **argv)
|
|||
printf ("TLS : %s\n",
|
||||
uri->use_tls? "yes":
|
||||
(my_http_flags&HTTP_FLAG_FORCE_TLS)? "forced" : "no");
|
||||
printf ("Tor : %s\n",
|
||||
(my_http_flags&HTTP_FLAG_FORCE_TOR)? "yes" : "no");
|
||||
|
||||
}
|
||||
fflush (stdout);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue