ServicePath string // urlpath for this service, default: /wservice
DataDirectory string // server data directory, default: /data/cloud
TrustedProxies []string // a list of proxies trusted, default: ["127.0.0.1", "192.168.8.1"]
- SockDirectory string // directory name of unix socket, IP=/run/[SockDirectory]/xxx.sock, default: smartsystem
+ SockDirectory string // directory name of unix socket, IP=[SockDirectory]/xxx.sock, default: /var/run/smartsystem
SockGroupName string // group name that access unix socket, default: null
}
System struct {
setting.Service.TrustedProxies = append(setting.Service.TrustedProxies, "127.0.0.1", "192.168.8.1")
}
if setting.Service.SockDirectory == "" {
- setting.Service.SockDirectory = "smartsystem"
+ setting.Service.SockDirectory = "/var/run/smartsystem"
}
// Configuration.System
--- /dev/null
+// Copyright 2010-2026 nanzoom.com. All Rights Reserved.
+
+package uzsdk
+
+// OS store profiles reading from OS.
+type OS struct {
+ Protocols []Protocol // profile: /etc/protocols.
+ Services []Service // profile: /etc/services.
+ Jaillist []string // profile: fail2ban jail list.
+ Loginlist []string // profile: fail2ban onlogin list.
+}
+
+type Protocol struct {
+ Name string
+ Id string
+ Keyword string
+ Description string
+}
+
+type Service struct {
+ Name string
+ Port string
+ Protocol string
+}
+
+func NewOS() *OS {
+ var profile OS
+
+ profile.Protocols = make([]Protocol, 0)
+ profile.Services = make([]Service, 0)
+ profile.Jaillist = make([]string, 0)
+ profile.Loginlist = make([]string, 0)
+
+ return &profile
+}