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