mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 05:11:06 +02:00
not quite working
This commit is contained in:
parent
919de910cb
commit
adff8400be
2 changed files with 3 additions and 2 deletions
2
main.go
2
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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue