feat: add domain and external ip configuration items (#18)

This commit is contained in:
Li4n0
2021-05-22 20:40:04 +08:00
committed by GitHub
parent bc6e3962f8
commit 1144f67d37
55 changed files with 228 additions and 143 deletions
+8 -1
View File
@@ -14,7 +14,7 @@ import (
log "unknwon.dev/clog/v2"
)
const VERSION = "0.1.1-beta"
const VERSION = "0.1.2-beta"
type Revsuit struct {
config *Config
@@ -181,6 +181,13 @@ func New(c *Config) *Revsuit {
if c.IpHeader != "" {
s.http.SetIpHeader(c.IpHeader)
}
if c.Domain != "" {
s.dns.SetServerDomain(c.Domain)
}
if c.ExternalIP != "" {
s.dns.SetServerIP(c.ExternalIP)
s.ftp.SetPasvIP(c.ExternalIP)
}
return s
}