0
0
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 13:21:00 +02:00

Merge pull request #419 from kallydev/patch

Add host flag for relay
This commit is contained in:
Zack 2021-10-02 10:35:00 -07:00 committed by GitHub
commit d77c83ce09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 14 deletions

View file

@ -296,7 +296,7 @@ func (c *Client) setupLocalRelay() {
if c.Options.Debug {
debugString = "debug"
}
err := tcp.Run(debugString, portStr, c.Options.RelayPassword, strings.Join(c.Options.RelayPorts[1:], ","))
err := tcp.Run(debugString, "localhost", portStr, c.Options.RelayPassword, strings.Join(c.Options.RelayPorts[1:], ","))
if err != nil {
panic(err)
}

View file

@ -15,11 +15,11 @@ import (
func init() {
log.SetLevel("trace")
go tcp.Run("debug", "8081", "pass123", "8082,8083,8084,8085")
go tcp.Run("debug", "8082", "pass123")
go tcp.Run("debug", "8083", "pass123")
go tcp.Run("debug", "8084", "pass123")
go tcp.Run("debug", "8085", "pass123")
go tcp.Run("debug", "localhost", "8081", "pass123", "8082,8083,8084,8085")
go tcp.Run("debug", "localhost", "8082", "pass123")
go tcp.Run("debug", "localhost", "8083", "pass123")
go tcp.Run("debug", "localhost", "8084", "pass123")
go tcp.Run("debug", "localhost", "8085", "pass123")
time.Sleep(1 * time.Second)
}