[Pkg-privacy-commits] [obfs4proxy] 32/151: Make the output from "-gen" be more useful.

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 12:59:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository obfs4proxy.

commit b9e3aedfb1454fc314ae68f8075a8008e15fb20d
Author: Yawning Angel <yawning at schwanenlied.me>
Date:   Thu May 15 06:49:11 2014 +0000

    Make the output from "-gen" be more useful.
---
 obfs4proxy/obfs4proxy.go | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/obfs4proxy/obfs4proxy.go b/obfs4proxy/obfs4proxy.go
index ff53863..e4a7a35 100644
--- a/obfs4proxy/obfs4proxy.go
+++ b/obfs4proxy/obfs4proxy.go
@@ -337,7 +337,7 @@ func generateServerParams(id string) {
 		return
 	}
 
-	fmt.Println("Generated node_id:", parsedID.Base64())
+	fmt.Println("Generated node-id:", parsedID.Base64())
 
 	keypair, err := ntor.NewKeypair(false)
 	if err != nil {
@@ -347,11 +347,19 @@ func generateServerParams(id string) {
 
 	fmt.Println("Generated private-key:", keypair.Private().Base64())
 	fmt.Println("Generated public-key:", keypair.Public().Base64())
+	fmt.Println()
+	fmt.Println("Client config: ")
+	fmt.Printf("  Bridge obfs4 <IP Address:Port> %s node-id=%s public-key=%s\n",
+		id, parsedID.Base64(), keypair.Public().Base64())
+	fmt.Println()
+	fmt.Println("Server config:")
+	fmt.Printf("  ServerTransportOptions obfs4 node-id=%s private-key=%s\n",
+		parsedID.Base64(), keypair.Private().Base64())
 }
 
 func main() {
 	// Some command line args.
-	genParams := flag.String("gen", "", "Generate params given a Node ID.")
+	genParams := flag.String("gen", "", "Generate server params given a bridge fingerprint.")
 	flag.Parse()
 	if *genParams != "" {
 		generateServerParams(*genParams)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/obfs4proxy.git



More information about the Pkg-privacy-commits mailing list