mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
building the ui
This commit is contained in:
parent
f1b62ea30d
commit
d95c90de44
2 changed files with 127 additions and 19 deletions
|
@ -16,17 +16,25 @@ const (
|
|||
)
|
||||
|
||||
type Croc struct {
|
||||
// Options for all
|
||||
Debug bool
|
||||
|
||||
// Options for relay
|
||||
ServerPort string
|
||||
CurveType string
|
||||
|
||||
// Options for connecting to server
|
||||
TcpPorts []string
|
||||
WebsocketAddress string
|
||||
ServerPort string
|
||||
Timeout time.Duration
|
||||
LocalOnly bool
|
||||
|
||||
// Options for file transfering
|
||||
UseEncryption bool
|
||||
UseCompression bool
|
||||
CurveType string
|
||||
AllowLocalDiscovery bool
|
||||
Yes bool
|
||||
Stdout bool
|
||||
|
||||
// private variables
|
||||
// rs relay state is only for the relay
|
||||
|
@ -59,6 +67,14 @@ func Init() (c *Croc) {
|
|||
return
|
||||
}
|
||||
|
||||
func (c *Croc) SetDebug(debug bool) {
|
||||
if debug {
|
||||
SetLogLevel("debug")
|
||||
} else {
|
||||
SetLogLevel("error")
|
||||
}
|
||||
}
|
||||
|
||||
type relayState struct {
|
||||
channel map[string]*channelData
|
||||
sync.RWMutex
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue