mirror of https://github.com/schollz/croc.git
compute addresses
This commit is contained in:
parent
43026b9c2e
commit
816c25b05b
2
main.go
2
main.go
|
@ -67,7 +67,7 @@ func main() {
|
|||
},
|
||||
}
|
||||
app.Flags = []cli.Flag{
|
||||
cli.StringFlag{Name: "relay", Value: "wss://croc3.schollz.com"},
|
||||
cli.StringFlag{Name: "relay", Value: "ws://croc3.schollz.com"},
|
||||
cli.StringFlag{Name: "code, c", Usage: "codephrase used to connect to relay"},
|
||||
cli.BoolFlag{Name: "local", Usage: "use only local mode"},
|
||||
cli.BoolFlag{Name: "debug", Usage: "increase verbosity (a lot)"},
|
||||
|
|
|
@ -150,8 +150,7 @@ func (c *Croc) joinChannel(ws *websocket.Conn, cd channelData) (channel string,
|
|||
}
|
||||
c.rs.channel[cd.Channel].websocketConn[cd.Role] = ws
|
||||
// assign the name
|
||||
c.rs.channel[cd.Channel].Addresses[cd.Role] = ws.RemoteAddr().String()
|
||||
|
||||
c.rs.channel[cd.Channel].Addresses[cd.Role] = ws.RemoteAddr().Network()
|
||||
log.Debugf("assigned role %d in channel '%s'", cd.Role, cd.Channel)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue