Am 26.01.2010 09:26, schrieb Christopher Davis: > On Mon, Jan 25, 2010 at 09:48:11PM +0100, ecivo wrote: > >> Hey folks, >> >> I read your help request in the "readme.Windows" file, that ships with >> polipo (which I obtained by installing Tor). >> >> Note that I'm talking about the "having to fix config-files" issues at >> the bottom of the file, not the compile-issues. >> >> I thought, that the fixing of the config file for windows-usage could >> well be done by a batch script, wich could be >> called by the installer and I would offer to write this batch-file. >> >> > Can you describe more how this batch script would work? > > Thanks, > sure, as far as I've thought it through, the script would be invoked with the installation directory of polipo as first argument and an Integer (or string) as a second, which controls behavior, i.e. in which of 3 standard-locations to put the edited config :
REM INVOCATION: REM polipo_config %(STRING)Installation-directory% %(INTEGER)where to put edited config% REM Behavior depending on Value of %(INTEGER)where to put edited config% REM 1: put in polipo-Installation-directory (DEFAULT) REM 2: put in %all users's APPDATA%\polipo\config REM 3: put in %current_user's APPDATA%\polipo\config (not recommended, due to "installing-user" may not be "using user" and reading of folder's might be prohibited) Then the script would switch to the given %Installation-directory% and try to locate the config or config.sample file (as fallback) and also the forbidden-file, error handling for "file is not there" (i.e. search files by name and continue normal if found, exit error-message if not) read in config, remove # in lines that are necessary (socksParentProxy, socks ProxyType, dnsGethostbyname, diskCacheRoot) add lines to define proxyport(I found this to be crucial for polipo to work with "tor-boutton"-plugin of firefox), dnsNameServer, and forbiddenFile and maybe logfile... // in Order to have this all in a managed way, this lines could also be read from a custom txt-file, so that future options/changes, don't need code-changes. write out config to choosen destination (s. INVOCATION) since batch-files don't have return values, the string nessessary to start polipo with the right config (ie, "-c C:\path\to\config\file) could be stored in a txt-file in the installation dir, so that the installer can read it and pass it on or vidalia can read it itself ^^.... HOWEVER I want to note, that all of this could be avoided and made unnessisary if the Windows-ports would be accompained by a config-file or config.sample that simply declares the most nessisary options with resonable values as follows: proxyPort = 8118 socksParentProxy ="127.0.0.1:9050" socksProxytype = socks5 dnsNameServer = 127.0.0.1 dnsUseGethostbyname = false diskCacheRoot = "" This way everything should be running smoothly and nice (at least in the "standard-everything-on-one-maschine-used with/for-Tor-setup), however there might be unsolvable problems with shipping a such a minimum config with the windows-bin, that I don't see from here ^^ in the last case: mea culpa, but I offered to write the batch anyways :-) I just would like to understand, why shipping such a pre-set config is not within reach... Greetings eci ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Polipo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/polipo-users
