diff options
author | Yawning Angel <yawning@schwanenlied.me> | 2014-05-15 06:49:11 +0000 |
---|---|---|
committer | Yawning Angel <yawning@schwanenlied.me> | 2014-05-15 06:49:11 +0000 |
commit | b9e3aedfb1454fc314ae68f8075a8008e15fb20d (patch) | |
tree | e4a611fc7377d9d898e97672d3bc9648dcf44f1a /obfs4proxy/obfs4proxy.go | |
parent | 50cc180084f086ccd2a81034a06c51c0fab36ba2 (diff) |
Make the output from "-gen" be more useful.
Diffstat (limited to 'obfs4proxy/obfs4proxy.go')
-rw-r--r-- | obfs4proxy/obfs4proxy.go | 12 |
1 files 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) |