mirror of
https://github.com/kemko/reproxy.git
synced 2026-01-01 15:55:49 +03:00
add info about limited ip to logs
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user