From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: Making package.el talk over Tor Date: Thu, 14 Dec 2023 12:25:37 +0000 Message-ID: <87sf45m0n2.fsf@posteo.net> References: <8734ybkqf4.fsf@disroot.org> <87sf54q2t8.fsf@posteo.net> <83o7fql10t.fsf@gnu.org> <83y1e3ygah.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37207"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , akib@disroot.org, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 14 13:26:31 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rDknO-0009SV-Kd for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Dec 2023 13:26:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rDkmh-0005Ox-DL; Thu, 14 Dec 2023 07:25:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDkmd-0005Oc-7R for emacs-devel@gnu.org; Thu, 14 Dec 2023 07:25:44 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDkma-00011l-E1 for emacs-devel@gnu.org; Thu, 14 Dec 2023 07:25:42 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 8EC1F240029 for ; Thu, 14 Dec 2023 13:25:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1702556738; bh=p+IABoE5Dr5zbXEgssyscIpZZVa2DdvAlP2+Wji5lAc=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=MKhztkS3bIeCyxzs1I84WPGt3ptvBS2AlRZN5VO03vQDQ0Pvn2EH9GMcZEFU7sb7m K2ewRhQ59gdjVSG7S4LHY+owuCAFaqLv4rYPxcB/R4hS+aq5m45RGujKk+4syvbIz8 xyz2MFUKFC6PzC1Ew3GK3C4ItDSFqW+KFBpEfXm6GGSXqRkp6H8JymohiHA3htXaDq Csj8KJlaaN+DBURMFxgNmKZAqdd7Bkoenoqni+c8DyJfGxJLg3Nbqh2Ea4V+htTM2r tQtZTp6HsCyRqNpFBxMgxoonu++DJHjAcoMia4S+NQimMvPpBRTacOxMgOhwVneWFN hIzPsFJ9c4muw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SrWlj5cGVz6txd; Thu, 14 Dec 2023 13:25:37 +0100 (CET) In-Reply-To: (Richard Stallman's message of "Tue, 12 Dec 2023 23:58:04 -0500") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313773 Archived-At: Richard Stallman 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.