mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
6277af4790
The ServerCommonConf is now passed around as an argument instead of being shared between components as a global variable. This allows for more natural interaction with server.Session as a library and allows for multiple servers to co-exist within the same process. Related: #1387
23 lines
341 B
Go
23 lines
341 B
Go
package g
|
|
|
|
import (
|
|
"github.com/fatedier/frp/models/config"
|
|
)
|
|
|
|
var (
|
|
GlbClientCfg *ClientCfg
|
|
)
|
|
|
|
func init() {
|
|
GlbClientCfg = &ClientCfg{
|
|
ClientCommonConf: *config.GetDefaultClientConf(),
|
|
}
|
|
}
|
|
|
|
type ClientCfg struct {
|
|
config.ClientCommonConf
|
|
|
|
CfgFile string
|
|
ServerUdpPort int // this is configured by login response from frps
|
|
}
|