mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 01:08:33 +00:00
Log: Add MaskAddress option to hide IP addresses (#3783)
* Log: Add maskAddress option * Correct IPv6 subnet
This commit is contained in:
parent
6b1bf312d7
commit
a247997e38
4 changed files with 91 additions and 17 deletions
|
@ -16,10 +16,11 @@ func DefaultLogConfig() *log.Config {
|
|||
}
|
||||
|
||||
type LogConfig struct {
|
||||
AccessLog string `json:"access"`
|
||||
ErrorLog string `json:"error"`
|
||||
LogLevel string `json:"loglevel"`
|
||||
DNSLog bool `json:"dnsLog"`
|
||||
AccessLog string `json:"access"`
|
||||
ErrorLog string `json:"error"`
|
||||
LogLevel string `json:"loglevel"`
|
||||
DNSLog bool `json:"dnsLog"`
|
||||
MaskAddress string `json:"maskAddress"`
|
||||
}
|
||||
|
||||
func (v *LogConfig) Build() *log.Config {
|
||||
|
@ -59,5 +60,6 @@ func (v *LogConfig) Build() *log.Config {
|
|||
default:
|
||||
config.ErrorLogLevel = clog.Severity_Warning
|
||||
}
|
||||
config.MaskAddress = v.MaskAddress
|
||||
return config
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue