unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Working example needed to extend tor-service with file-like object
@ 2016-10-30 17:14 ng0
  2016-11-02 14:35 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: ng0 @ 2016-10-30 17:14 UTC (permalink / raw)
  To: help-guix

Hi,

I'm trying to extend tor-service locally. I have read the
documentation, but I really don't get at this moment how
file-like objects can be included in the service. The
documentation right now might have good intentions, and I do
understand how each part works isolated, but for combining parts
and get it working I'm afraid this is demands too much of someone
who either just started with guile or has gathered some
experience but not so deep.

Can someone give a working example for the tor-service?
I volunteer to improve the documentation if I can get something
out of this.

Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Working example needed to extend tor-service with file-like object
  2016-10-30 17:14 Working example needed to extend tor-service with file-like object ng0
@ 2016-11-02 14:35 ` Ludovic Courtès
  2016-11-02 15:31   ` ng0
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2016-11-02 14:35 UTC (permalink / raw)
  To: ng0; +Cc: help-guix

Hi!

ng0 <ng0@we.make.ritual.n0.is> skribis:

> Can someone give a working example for the tor-service?
> I volunteer to improve the documentation if I can get something
> out of this.

I have something like this:

  (services (cons* (lsh-service #:root-login? #t
                                #:interfaces '("127.0.0.1"))

                   (tor-hidden-service "ssh"
                                       '((22 "127.0.0.1:22")
                                         (80 "127.0.0.1:80")))
                   …))

That makes a hidden service to talk to my SSH and HTTP services.

HTH!

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Working example needed to extend tor-service with file-like object
  2016-11-02 14:35 ` Ludovic Courtès
@ 2016-11-02 15:31   ` ng0
  2016-11-02 16:18     ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: ng0 @ 2016-11-02 15:31 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

Hi,

ludo@gnu.org (Ludovic Courtès) writes:

> Hi!
>
> ng0 <ng0@we.make.ritual.n0.is> skribis:
>
>> Can someone give a working example for the tor-service?
>> I volunteer to improve the documentation if I can get something
>> out of this.
>
> I have something like this:

Thanks, but there's a misunderstanding in terms what I needed
help with I think.

Our default config (torrc) is not so pleasant (well, it's
intentional minimal). I have torrc values, unrelated to
hidden-service, I need to add. Like, exclude certain countries
etc. For this I want to understand how a file-like object would
look like in the context of (services) in config.scm, so I can be
sure I apply the correct thing.

>   (services (cons* (lsh-service #:root-login? #t
>                                 #:interfaces '("127.0.0.1"))
>
>                    (tor-hidden-service "ssh"
>                                        '((22 "127.0.0.1:22")
>                                          (80 "127.0.0.1:80")))
>                    …))
>
> That makes a hidden service to talk to my SSH and HTTP services.
>
> HTH!
>
> Ludo’.
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Working example needed to extend tor-service with file-like object
  2016-11-02 15:31   ` ng0
@ 2016-11-02 16:18     ` Ludovic Courtès
  2016-11-02 20:38       ` ng0
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2016-11-02 16:18 UTC (permalink / raw)
  To: ng0; +Cc: help-guix

ng0 <ng0@we.make.ritual.n0.is> skribis:

> Our default config (torrc) is not so pleasant (well, it's
> intentional minimal). I have torrc values, unrelated to
> hidden-service, I need to add. Like, exclude certain countries
> etc. For this I want to understand how a file-like object would
> look like in the context of (services) in config.scm, so I can be
> sure I apply the correct thing.

Oh, well:

  (tor-service (plain-file "tor.conf" "OptionOne Foo\nOptionTwo Bar\n“))

or:

  (tor-service (local-file "../my-tor.conf"))

HTH,
Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Working example needed to extend tor-service with file-like object
  2016-11-02 16:18     ` Ludovic Courtès
@ 2016-11-02 20:38       ` ng0
  0 siblings, 0 replies; 5+ messages in thread
From: ng0 @ 2016-11-02 20:38 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

ludo@gnu.org (Ludovic Courtès) writes:

> ng0 <ng0@we.make.ritual.n0.is> skribis:
>
>> Our default config (torrc) is not so pleasant (well, it's
>> intentional minimal). I have torrc values, unrelated to
>> hidden-service, I need to add. Like, exclude certain countries
>> etc. For this I want to understand how a file-like object would
>> look like in the context of (services) in config.scm, so I can be
>> sure I apply the correct thing.
>
> Oh, well:
>
>   (tor-service (plain-file "tor.conf" "OptionOne Foo\nOptionTwo Bar\n“))
>
> or:
>
>   (tor-service (local-file "../my-tor.conf"))
>
> HTH,
> Ludo’.
>

Oh! So I am thinking way too complicated in how things are
supposed to be written. Damn...

Many thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-11-02 20:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-30 17:14 Working example needed to extend tor-service with file-like object ng0
2016-11-02 14:35 ` Ludovic Courtès
2016-11-02 15:31   ` ng0
2016-11-02 16:18     ` Ludovic Courtès
2016-11-02 20:38       ` ng0

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).