mirror of https://github.com/schollz/croc.git
not quite working
This commit is contained in:
parent
919de910cb
commit
adff8400be
2
main.go
2
main.go
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue