Documentation ¶
Index ¶
Constants ¶
View Source
const ( APP_NAME = "AnyLink" APP_VER = "0.1.0" )
View Source
const ( LinkModeTUN = "tun" LinkModeTAP = "tap" )
Variables ¶
View Source
var (
Cfg = &ServerConfig{}
)
View Source
var ( // 提交id CommitId string )
Functions ¶
func ServerCfg2Slice ¶
func ServerCfg2Slice() interface{}
Types ¶
type ServerConfig ¶
type ServerConfig struct { LinkAddr string `toml:"link_addr" info:"vpn服务对外地址"` ServerAddr string `toml:"server_addr" info:"前台服务监听地址"` AdminAddr string `toml:"admin_addr" info:"后台服务监听地址"` ProxyProtocol bool `toml:"proxy_protocol" info:"TCP代理协议"` DbFile string `toml:"db_file" info:"数据库地址"` CertFile string `toml:"cert_file" info:"证书文件"` CertKey string `toml:"cert_key" info:"证书密钥"` UiPath string `toml:"ui_path" info:"ui文件路径"` DownFilesPath string `toml:"down_files_path" info:"外部下载文件路径"` LogLevel string `toml:"log_level" info:"日志等级"` Issuer string `toml:"issuer" info:"系统名称"` AdminUser string `toml:"admin_user" info:"管理用户名"` AdminPass string `toml:"admin_pass" info:"管理用户密码"` JwtSecret string `toml:"jwt_secret" info:"JWT密钥"` LinkMode string `toml:"link_mode" info:"虚拟网络类型"` // tun tap Ipv4Network string `toml:"ipv4_network" info:"ipv4_network"` // 192.168.1.0 Ipv4Netmask string `toml:"ipv4_netmask" info:"ipv4_netmask"` // 255.255.255.0 Ipv4Gateway string `toml:"ipv4_gateway" info:"ipv4_gateway"` Ipv4Pool []string `toml:"ipv4_pool" info:"IPV4起止地址池"` // Pool[0]=192.168.1.100 Pool[1]=192.168.1.200 IpLease int `toml:"ip_lease" info:"IP租期(秒)"` MaxClient int `toml:"max_client" info:"最大用户连接"` MaxUserClient int `toml:"max_user_client" info:"最大单用户连接"` DefaultGroup string `toml:"default_group" info:"默认用户组"` CstpKeepalive int `toml:"cstp_keepalive" info:"keepalive时间(秒)"` // in seconds CstpDpd int `toml:"cstp_dpd" info:"死链接检测时间(秒)"` // Dead peer detection in seconds MobileKeepalive int `toml:"mobile_keepalive" info:"移动端keepalive接检测时间(秒)"` MobileDpd int `toml:"mobile_dpd" info:"移动端死链接检测时间(秒)"` SessionTimeout int `toml:"session_timeout" info:"session过期时间(秒)"` // in seconds AuthTimeout int `toml:"auth_timeout" info:"auth_timeout"` // in seconds }
Click to show internal directories.
Click to hide internal directories.