From adff8400be0f87582f0a6db6dd8e06a6dfa2b9ff Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Sat, 30 Jun 2018 07:02:04 -0700 Subject: [PATCH] not quite working --- main.go | 2 +- src/client.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index cf2f223..f7c02c1 100644 --- a/main.go +++ b/main.go @@ -16,7 +16,7 @@ func main() { if *role == -1 { err = c.Relay() } else if *role == 0 { - err = c.Send("croc.exe", *passphrase) + err = c.Send("README.md", *passphrase) } else { err = c.Receive(*passphrase) } diff --git a/src/client.go b/src/client.go index f82b98c..290ddfe 100644 --- a/src/client.go +++ b/src/client.go @@ -304,7 +304,8 @@ func (c *Croc) dialUp() (err error) { log.Debug("dialing up") } log.Debugf("connecting to %s", "localhost:"+port) - connection, err := net.Dial("tcp", "localhost:"+port) + address := strings.Split(strings.Split(c.WebsocketAddress, "://")[1], ":")[0] + connection, err := net.Dial("tcp", address+":"+port) if err != nil { errorChan <- err return