cmd: remove a broken thing

This commit is contained in:
Cadey Ratio 2017-04-28 20:09:09 -07:00
parent 4e4da828b5
commit 4186b0c6b0
1 changed files with 0 additions and 41 deletions

View File

@ -1,41 +0,0 @@
package main
import (
"crypto/rand"
"crypto/rsa"
"flag"
"log"
"net/rpc"
"git.xeserv.us/xena/route/routerpc"
)
var (
addr = flag.String("addr", "127.0.0.1:9234", "RPC host to connect to")
)
func main() {
flag.Parse()
client, err := rpc.DialHTTP("tcp", *addr)
if err != nil {
log.Fatal(err)
}
pKey, err := rsa.GenerateKey(rand.Reader, 1024)
if err != nil {
log.Fatal(err)
}
req := routerpc.AddHostRequest{
APIKey: "hunter2",
PrivKey: pKey,
}
resp := &routerpc.AddHostResponse{}
err = client.Call("Urls.AddHost", req, resp)
if err != nil {
log.Fatal(err)
}
log.Printf("Created host %s (%s) with token %s", resp.Hostname, resp.OnionHostname, resp.Token)
}