unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Richard Stallman <rms@gnu.org>
Cc: Eli Zaretskii <eliz@gnu.org>,  akib@disroot.org,  emacs-devel@gnu.org
Subject: Re: Making package.el talk over Tor
Date: Thu, 14 Dec 2023 12:25:37 +0000	[thread overview]
Message-ID: <87sf45m0n2.fsf@posteo.net> (raw)
In-Reply-To: <E1rDHJs-0004JB-7z@fencepost.gnu.org> (Richard Stallman's message of "Tue, 12 Dec 2023 23:58:04 -0500")

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > This sounds like a way to make the connection by running a shell
>   > command.  Maybe you could arrange for using this facility to do what
>   > you want?
>
> I have no idea.  I don't know how to make a program talk to anything
> over the net, either with Tor or without.

I tried out Eli's suggestion, and it seems to work:

(let ((conn
       (open-network-stream
	"test" (current-buffer) "gnu.org" "http"
	:type 'shell
	:shell-command "torsocks nc %s %p")))
  (process-send-string conn "GET / HTTP/1.0\r\n\r\n"))

>
> I think all Emacs features to do something over the internet should
> give users a way to say "go through Tor".  (For most applicaions I
> think a global variable is the preferable way to specify this.)

If you have a Tor daemon running on your system, it should provide a
SOCKS proxy by default, meaning that you can configure every package
that uses url.el to go through this proxy (unless I have misunderstood
something):

--8<---------------cut here---------------start------------->8---
(setq url-gateway-method 'socks
      socks-server '("Tor" "localhost" 9050 5))
--8<---------------cut here---------------end--------------->8---

That being said, while testing I noticed that when connecting to a
server I have access to, I always receive two requests, one from a Tor
exit node and one from my current IP address.  Unless I missed something
obvious, that might be a bug.

> Can someone who knows how to do that please implement it for Emacs package.el?

FWIW As package.el doesn't directly use any low level networking, so the
:shell trick wouldn't be something that could be easily implemented.



  reply	other threads:[~2023-12-14 12:25 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16  2:04 Making package.el talk over Tor Richard Stallman
2023-10-16  6:54 ` Akib Azmain Turja
2023-10-16  7:10   ` Emanuel Berg
2023-10-18  1:42   ` Richard Stallman
2023-11-17  3:53   ` Richard Stallman
2023-11-17  7:03     ` Philip Kaludercic
2023-11-19  3:39       ` Richard Stallman
2023-11-19  6:17         ` Eli Zaretskii
2023-12-09  4:06           ` Richard Stallman
2023-12-09  7:40             ` Eli Zaretskii
2023-12-13  4:58               ` Richard Stallman
2023-12-14 12:25                 ` Philip Kaludercic [this message]
2023-12-17  3:21                   ` Richard Stallman
2023-12-18  4:12                     ` Richard Stallman
2023-12-18  8:05                       ` Tomas Hlavaty
2023-12-18  8:10                         ` Tomas Hlavaty
2023-12-21  4:20                         ` Richard Stallman
2023-12-21  9:52                           ` Philip Kaludercic
2023-12-21  9:55                             ` Philip Kaludercic
2023-12-21 19:15                               ` Tomas Hlavaty
2023-12-24  3:57                               ` Richard Stallman
2023-12-24 13:36                                 ` Tomas Hlavaty
2023-12-24 15:19                                   ` Philip Kaludercic
2023-12-24 20:37                                     ` Tomas Hlavaty
2023-12-14 12:41         ` Philip Kaludercic
2023-12-14 12:54           ` Emanuel Berg
2023-12-14 13:06             ` Emanuel Berg
2023-12-17  3:21           ` Richard Stallman
2023-12-17  8:23             ` Stefan Kangas
2023-12-17  9:12               ` Eli Zaretskii
2023-12-17 12:02                 ` Never send user email address in HTTP requests Stefan Kangas
2023-12-17 12:34                   ` Eli Zaretskii
2023-12-17 14:05                     ` Yuri Khan
2023-12-17 14:44                       ` Eli Zaretskii
2023-12-17 17:30                       ` T.V Raman
2023-12-19  3:51                       ` Richard Stallman
2023-12-19  3:53               ` Making package.el talk over Tor Richard Stallman
2023-12-17 11:51             ` Philip Kaludercic
2023-12-17 14:10               ` Yuri Khan
2023-12-19  3:51                 ` Richard Stallman
2023-12-19  3:52               ` Richard Stallman
2023-12-19  3:52               ` Richard Stallman
2023-11-18  3:03     ` Richard Stallman
2023-11-18  7:21       ` Eli Zaretskii
2023-11-21  2:39         ` Richard Stallman
2023-10-16  7:12 ` Stefan Kangas
2023-10-16  9:15   ` Philip Kaludercic
  -- strict thread matches above, loose matches on Subject: below --
2023-12-18 14:22 Andrea Monaco
2023-12-18 14:29 ` Emanuel Berg
2023-12-18 14:49 ` F. Jason Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sf45m0n2.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=akib@disroot.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).