Re: Polipo Tunnel patch
Richard Zidlicky <[email protected]>
| Newsgroups | gmane.comp.web.polipo.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, > >> Oh, and any chance you could send Darcs patches? Trust me, you'll find it > >> *much* easier than working with diff/patch by hand. > > > no darcs at the moment - and I do not do diff/patch by hand. > > You've made me curious now -- what is rzt? nothing significant, I use rpm/gendiff for simple patch managment so rzt identifies one patchset here. > > here are the patches. > > At first sight, they look good. I'll review them carefully when I next > have some time for hacking Polipo. very nice. I have some little goodies, like logwatch script and configuration, rpm specfile, and an own init file. So I am attaching the logwatch pieces, in my configuration (logwatch-2.6-8) they would be copied to /etc/log.d/conf/services/polipo.conf /etc/log.d/scripts/services/polipo The purpose is to nicely summarise tunneled connections. Other ideas what should be summarised like that? If you add this to the tarball I could also contribute my initscript as well as rpm specfile. Hmm there used to be a contrib directory with such stuff in the polipo sources? Richard ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Polipo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/polipo-users
polipo-logwatch-script
(text/plain, 874 B)
#!/usr/bin/ruby # # (C) 2009 Richard Zidlicky <[email protected]> # # Script to summarise polipo tunneled connections logged to system log # Can be run by logwatch or manualy as # polipo-logwatch-script </var/log/messages connections=Hash.new lastconn=nil STDIN.each{|line| line.chomp! if /(tunnel \S+:\d+ \w+)/ =~ line then count=connections[$1] count=0 unless count connections[$1]=count+1 lastconn=$1 elsif lastconn && /last message repeated\s+(\d+)\s+times/ =~ line connections[lastconn] += $1.to_i lastconn=nil else lastconn=nil end } if connections.length > 0 print "\n\n ---------------------- Polipo Logwatch ------------------------- \n\n"; connections.each{|k,v| printf "%s %d times\n",k,v } print "\n ---------------------------------------------------------------- \n\n"; end exit 0
polipo-logwatch-conf
(text/plain, 977 B)
########################################################################### # ########################################################################### # You can put comments anywhere you want to. They are effective for the # rest of the line. # this is in the format of <name> = <value>. Whitespace at the beginning # and end of the lines is removed. Whitespace before and after the = sign # is removed. Everything is case *insensitive*. # Yes = True = On = 1 # No = False = Off = 0 # Which logfile group... LogFile = messages # Only give lines pertaining to the polipo service... not sure # how it works so leave it alone for now #*OnlyService = polipo #*RemoveHeaders = ######################################################## # This was written and is maintained by: # Richard Zidlicky <[email protected]> # # Please send all comments, suggestions, bug reports, # etc, to [email protected] # ########################################################