[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Example of v3 hidden services in create_ephemeral_hidden_service docs



commit 07bf3c00a26a77a14a1ba6202c5d00b2927e6161
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sun May 6 11:45:44 2018 -0700

    Example of v3 hidden services in create_ephemeral_hidden_service docs
    
    Our 'key_type / key_content' distinction is confusing. I'm just surfacing tor's
    fields and I see what they're going for, but none the less as a user this field
    overloading is weird.
    
    Providing an example for how to create a new v3 hidden service.
---
 stem/control.py | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/stem/control.py b/stem/control.py
index 83304cea..fd9aa8dc 100644
--- a/stem/control.py
+++ b/stem/control.py
@@ -2874,9 +2874,19 @@ class Controller(BaseController):
       })
 
     To create a **version 3** service simply specify **ED25519-V3** as the
-    key_type, and to create a **version 2** service use **RSA1024**. The
+    our key type, and to create a **version 2** service use **RSA1024**. The
     default version of newly created hidden services is based on the
-    **HiddenServiceVersion** value in your torrc.
+    **HiddenServiceVersion** value in your torrc...
+
+    ::
+
+      response = controller.create_ephemeral_hidden_service(
+        80,
+        key_content = 'ED25519-V3',
+        await_publication = True,
+      )
+
+      print('service established at %s.onion' % response.service_id)
 
     .. versionadded:: 1.4.0
 

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits