mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 05:11:06 +02:00
no need to specify number of connections now
This commit is contained in:
parent
f0ed13c392
commit
638ca9ef27
4 changed files with 124 additions and 264 deletions
11
main.go
11
main.go
|
@ -5,7 +5,6 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/urfave/cli"
|
||||
"github.com/yudai/gotty/pkg/homedir"
|
||||
|
@ -100,16 +99,6 @@ func main() {
|
|||
r := NewRelay(appOptions)
|
||||
r.Run()
|
||||
} else {
|
||||
if appOptions.Local {
|
||||
fmt.Println("running relay on local address " + GetLocalIP())
|
||||
appOptions.Relay = true
|
||||
appOptions.Server = GetLocalIP()
|
||||
appOptions.DontEncrypt = true
|
||||
r := NewRelay(appOptions)
|
||||
go r.Run()
|
||||
appOptions.Code = "8-local"
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
}
|
||||
c, err := NewConnection(appOptions)
|
||||
if err != nil {
|
||||
fmt.Printf("Error! Please submit the following error to https://github.com/schollz/croc/issues:\n\n'%s'\n\n", err.Error())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue