mirror of
https://github.com/umputun/reproxy.git
synced 2024-11-16 20:25:52 +02:00
add info about limited ip to logs
This commit is contained in:
parent
899b552108
commit
672d4c2af8
@ -137,11 +137,16 @@ func (s *Service) Run(ctx context.Context) error {
|
||||
evRecv = false
|
||||
lst := s.mergeLists()
|
||||
for _, m := range lst {
|
||||
onlyFrom := ""
|
||||
if len(m.OnlyFromIPs) > 0 {
|
||||
onlyFrom = fmt.Sprintf(" +[%v]", strings.Join(m.OnlyFromIPs, ",")) // show onlyFrom if set
|
||||
}
|
||||
if m.MatchType == MTProxy {
|
||||
log.Printf("[INFO] proxy %s: %s %s -> %s", m.ProviderID, m.Server, m.SrcMatch.String(), m.Dst)
|
||||
log.Printf("[INFO] proxy %s: %s %s -> %s%s", m.ProviderID, m.Server, m.SrcMatch.String(), m.Dst, onlyFrom)
|
||||
}
|
||||
if m.MatchType == MTStatic {
|
||||
log.Printf("[INFO] assets %s: %s %s -> %s", m.ProviderID, m.Server, m.AssetsWebRoot, m.AssetsLocation)
|
||||
log.Printf("[INFO] assets %s: %s %s -> %s%s", m.ProviderID, m.Server, m.AssetsWebRoot,
|
||||
m.AssetsLocation, onlyFrom)
|
||||
}
|
||||
}
|
||||
s.lock.Lock()
|
||||
|
Loading…
Reference in New Issue
Block a user