not quite working

This commit is contained in:
Zack Scholl 2018-06-30 07:02:04 -07:00
parent 919de910cb
commit adff8400be
2 changed files with 3 additions and 2 deletions

View File

@ -16,7 +16,7 @@ func main() {
if *role == -1 { if *role == -1 {
err = c.Relay() err = c.Relay()
} else if *role == 0 { } else if *role == 0 {
err = c.Send("croc.exe", *passphrase) err = c.Send("README.md", *passphrase)
} else { } else {
err = c.Receive(*passphrase) err = c.Receive(*passphrase)
} }

View File

@ -304,7 +304,8 @@ func (c *Croc) dialUp() (err error) {
log.Debug("dialing up") log.Debug("dialing up")
} }
log.Debugf("connecting to %s", "localhost:"+port) 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 { if err != nil {
errorChan <- err errorChan <- err
return return