From b9e3aedfb1454fc314ae68f8075a8008e15fb20d Mon Sep 17 00:00:00 2001 From: Yawning Angel Date: Thu, 15 May 2014 06:49:11 +0000 Subject: 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 %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) -- cgit v1.2.3