From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: TRS-80 Newsgroups: gmane.emacs.help Subject: Private Internet Access (PIA) VPN region chooser in Emacs Date: Thu, 04 Mar 2021 12:28:14 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23638"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Roundcube Webmail/1.3.15 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 04 18:29:17 2021 Return-path: Envelope-to: geh-help-gnu-emacs@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 1lHrmm-0005zl-Kl for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 04 Mar 2021 18:29:16 +0100 Original-Received: from localhost ([::1]:44916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHrml-0003wL-N9 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 04 Mar 2021 12:29:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHrlz-0003w2-TH for help-gnu-emacs@gnu.org; Thu, 04 Mar 2021 12:28:27 -0500 Original-Received: from server173-4.web-hosting.com ([68.65.122.210]:41070) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHrlv-0006r3-NF for help-gnu-emacs@gnu.org; Thu, 04 Mar 2021 12:28:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=isnotmyreal.name; s=default; h=Content-Transfer-Encoding:Content-Type: Message-ID:Subject:To:From:Date:MIME-Version:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Fb56Q1emfPtZ8mNEuZYaNJ+BL8U9zKyOv529QCBJAgc=; b=tOuu9FxG/lI78eaYTeSjNZ/VSf LUCCFnK3VRseIGvFO5ZPL5hksjdiy2Veefyekd6ZBrmh3W6leHtT8gi93VmGVbyoHsM3AwXNm6zfm eOZXQ2skIPZapUPGk/xQXNswefpUS/6IJD/LIRwm77JxUI3Q8btfAOXk73hY8Oi3OBHGNHcGF3vz6 Wgk2VrbqyjVLpdJs86LvfQgGQTraN3x9X6SncFyHnsPbmv8gt0rocqqxLe+oN2i4qdxhOscmFexnS y8N/gHgFcb+pEPmRItmCNOmQyB38g3ErNrhxXyggYs01JmC8GHnvHD2TbSGr3k+ADKLmsueoauACH L4nC5y1w==; Original-Received: from [::1] (port=46206 helo=server173.web-hosting.com) by server173.web-hosting.com with esmtpa (Exim 4.93) (envelope-from ) id 1lHrlm-002y7E-79 for help-gnu-emacs@gnu.org; Thu, 04 Mar 2021 12:28:18 -0500 X-Sender: lists.trs-80@isnotmyreal.name X-OutGoing-Spam-Status: No, score=-0.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server173.web-hosting.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - isnotmyreal.name X-Get-Message-Sender-Via: server173.web-hosting.com: authenticated_id: lists.trs-80@isnotmyreal.name X-Authenticated-Sender: server173.web-hosting.com: lists.trs-80@isnotmyreal.name X-From-Rewrite: unmodified, already matched Received-SPF: pass client-ip=68.65.122.210; envelope-from=lists.trs-80@isnotmyreal.name; helo=server173-4.web-hosting.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 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, HAS_X_OUTGOING_SPAM_STAT=1.583, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128353 Archived-At: Hello *, Some months ago, I had written for myself a completing-read style VPN location chooser, implementing PIA's most recent API. They do publish some F/LOSS shell scripts[0] to do this, but they automatically choose for you the "closest/fastest" region, instead of allowing you to choose your exit point. Of course, preferring not to leave Emacs anyway, I implemented in Elisp a few functions which first fetch the list of exit points, and extract the relevant bits using jq. Then a connect function will present them to you in completing-read style so you can choose a region, and then connect. Disconnecting and changing regions is also supported. It's pretty basic, but it does what I need. I have been using this for some months now without issue. Publishing them publicly would involve a minimal amount of polish and writing a README, which I could be bothered to do if there is enough interest. Cheers, TRS-80 [0] https://github.com/pia-foss/manual-connections