Ticket #13934: 0001-Add-HS-torrc-template-and-network-configuration.patch

File 0001-Add-HS-torrc-template-and-network-configuration.patch, 1.7 KB (added by dgoulet, 5 years ago)
  • new file networks/hs

    From fd845f8f8eeaf1af44052e705ce0544cdb5d3cc1 Mon Sep 17 00:00:00 2001
    From: David Goulet <dgoulet@ev0ke.net>
    Date: Wed, 10 Dec 2014 13:00:18 -0500
    Subject: [PATCH] Add HS torrc template and network configuration
    
    This adds a network with an HS service bound to port 6000 that serves
    port 22 on your local machine.
    
    The hidden service is node test025h and the hostname can be found in
    "$dir/hidden_service/hostname".
    
    To start the network, use the "hs" network.
    
    Fixes #13934
    
    Signed-off-by: David Goulet <dgoulet@ev0ke.net>
    ---
     networks/hs             | 9 +++++++++
     torrc_templates/hs.tmpl | 8 ++++++++
     2 files changed, 17 insertions(+)
     create mode 100644 networks/hs
     create mode 100644 torrc_templates/hs.tmpl
    
    diff --git a/networks/hs b/networks/hs
    new file mode 100644
    index 0000000..a76ba2b
    - +  
     1Authority = Node(tag="a", authority=1, relay=1, torrc="authority.tmpl")
     2Middle = Node(tag="m", relay=1, torrc="relay-non-exit.tmpl")
     3Relay = Node(tag="r", relay=1, torrc="relay.tmpl")
     4Client = Node(tag="c", torrc="client.tmpl")
     5HS = Node(tag="h", torrc="hs.tmpl")
     6
     7NODES = Authority.getN(4) + Middle.getN(10) + Relay.getN(6) + Client.getN(5) + HS.getN(1)
     8
     9ConfigureNodes(NODES)
  • new file torrc_templates/hs.tmpl

    diff --git a/torrc_templates/hs.tmpl b/torrc_templates/hs.tmpl
    new file mode 100644
    index 0000000..bcef11e
    - +  
     1${include:common.i}
     2SocksPort 0
     3Address $ip
     4
     5HiddenServiceDir ${dir}/hidden_service
     6# SSH is usually a popular service that is running. This is really just to make
     7# a quick way to test the HS with torsocks and have an app at the other end.
     8HiddenServicePort 6000 127.0.0.1:22