diff --git a/webone.conf b/webone.conf new file mode 100644 index 00000000..820fb8b4 --- /dev/null +++ b/webone.conf @@ -0,0 +1,332 @@ +; WebOne Configuration File +; Its format is like INI, but also can contain raw lists inside some sections. +; For binary options use: 1/0, y/n, yes/no, on/off, enable/disable, true/false. +; Help and documentation: https://github.com/atauenis/webone/wiki/Configuration-file + +[Server] +; Server settings +; Port=Port to listen +; DefaultHostName=Proxy's host name (set to valid IP or domain name for use with/on Linux or macOS) +; Authenticate=Set if the proxy needs to be protected by "login:password" or leave blank +; OutputEncoding=Codepage for patched output content (list of available: http://localhost/!codepages/) +; HideClientErrors=Hide client connection error messages in log (for Netscape 3 PNG rejections) +; SearchInArchive=Enable searching for unavailable pages (Server Not Found or 404) in archive.org +; ShortenArchiveErrors=Enable shortening of 404s on web.archive.org to get off large scipts and images +; SecurityProtocols=Forcely set SSL/TLS protocols that can be used for retrieving web content +; ValidateCertificates=Break network operations when the remote TLS certificate is bad +; UserAgent=Override user-agent string to fetch uncut content +; TemporaryDirectory=Directory which should be used for temporary files (%TEMP%, $TEMP or any other) +; LogFile=Path to server log file. To use a log file without erasing, use AppendLogFile instead +; DisplayStatusPage=Set status page display style (no, short, full) +Port=8080 +DefaultHostName=%HostName% +;Authenticate=login:password +;OutputEncoding=AsIs +;OutputEncoding=Windows +;OutputEncoding=DOS +OutputEncoding=Apple +HideClientErrors=yes +SearchInArchive=yes +ShortenArchiveErrors=yes +;SecurityProtocols=4032 +ValidateCertificates=yes +UserAgent=%Original% WebOne/%WOVer% +;UserAgent=Mozilla/4.75 [en] (Windows NT 5.0; U) +TemporaryDirectory=%TEMP% +LogFile=%SYSLOGDIR%/webone.log +;AppendLogFile=%SYSLOGDIR%/webone.log +DisplayStatusPage=short + + +[ForceHttps] +; list of domains that should be always accessed via HTTPS +phantom.sannata.org +www.phantom.sannata.org +login.vk.com +m.vk.com +vk.com +webdav +webdav.yandex.ru +web.archive.org +googlevideo.com +commondatastorage.googleapis.com +rutracker.org +www.vogons.org + + +[InternalRedirectOn] +; list of URLs where 302 redirections should be handled at all by WebOne, not browser +; (Empty) + + +[ForceUtf8] +; list of URLs that should be always downloaded as UTF-8 +^http://.*yandex.ru/ + + +[TextTypes] +; list of MIME type mask that means files which should be patched during transfer +text/ +javascript +json +cdf +x-netcdf +xml + + +; Sets of traffic edits +[Edit:jquery.min.js] +; Redirect all requests to jQuery of versions other than 1.9.1 to Google's CDN with +; the last version supported by Firefox 3.6. This will not touch WebDAV traffic. +; Title: RegExp mask of URLs that should be touched by this Set of edits. +; IgnoreUrl: RegExp mask(s) of URLs which should NOT be touched by this Set of edits. +; OnUrl: additional URL RegExp masks not listed in section's title. +; AddRedirect: the destination URL of this redirection rule +IgnoreUrl=1.9.1 +IgnoreUrl=webdav +OnUrl=jquery2.js +OnUrl=jquery-[0-9]*\.[0-9]*\.[0-9]*\.min\.js +IgnoreUrl=webdav +AddRedirect=http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js + +[Edit:jquery-ui.js] +; similar to jquery main file, but for jquery-ui +IgnoreUrl=1.9.1 +IgnoreUrl=webdav +OnUrl=jquery-ui[a-z0-9\.\-]*.js +AddRedirect=http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js + +[Edit:bootstrap.min.js] +IgnoreUrl=2.3.1 +IgnoreUrl=webdav +AddRedirect=http://maxcdn.bootstrapcdn.com/bootstrap/2.3.1/js/bootstrap.min.js + + +[Edit:(^http://.*/styles/prosilver/theme/)(.*)] +; downgrade stylesheets of phpBB proSilver skin to version 3.0 on old browsers +OnHeader=User-Agent: .*MSIE [3456] +OnHeader=User-Agent: Mozilla/3 +OnHeader=User-Agent: Mozilla/4 +IgnoreUrl=webdav +AddRedirect=http://atauenis.github.io/webone-webfixes/prosilver/theme/$2 + + +[Edit:^http://super8russia.ning.com] +; another example of redirect, but to Wayback Machine +; IgnoreUrl is not need here (the RegExp used here is quite detailed) +AddRedirect=http://web.archive.org/web/2010/%URL% + + +[Edit::443] +; another example of redirect, but with remove of 443 port (final murder of SSL) +; the redirect is internal (hidden, seamless) so we're using AddInternalRedirect here +AddInternalRedirect=%UrlNoPort% + +; Dead hosting providers +[Edit:^(http://www\.|http://)geocities.com/] +AddRedirect=http://web.archive.org/web/2008/%URL% + +[Edit:^http://web.ukonline.co.uk/] +AddRedirect=http://web.archive.org/web/2007/%URL% + +[Edit:^(http://www\.|http://)narod.ru/] +AddRedirect=http://web.archive.org/web/2012/http://narod.yandex.ru/%UrlNoDomain% + +[Edit:^http://narod.yandex.ru/] +AddRedirect=http://web.archive.org/web/2012/%URL% + +[Edit:^http://.*.by.ru/] +IgnoreUrl=web.archive.org +AddRedirect=http://web.archive.org/web/2011/%URL%Redirect=http://web.archive.org/web/2011/%URL% + + +; Microsoft software interactivity +[Edit:^http://ie.search.msn.com/] +AddRedirect=http://web.archive.org/web/2000/%URL% + +[Edit:^http://[a-z\.]*windowsmedia.com/] +AddRedirect=http://web.archive.org/web/2002/%URL% + +[Edit:^http://go.microsoft.com/] +AddRedirect=http://web.archive.org/web/2005/%URL% + +[Edit:^(http://www\.|http://)microsoft.com/isapi/] +AddRedirect=http://web.archive.org/web/2005/%URL% + +[Edit:^http://[a-z\.]*.windows.com/] +AddRedirect=http://web.archive.org/web/2005/%URL% + +[Edit:^(http://www\.|http://)iechannelguide.com] +AddRedirect=http://web.archive.org/web/1997/%URL% + +[Edit:^(http://www\.|http://)microsoft.com/IE/] +AddRedirect=http://web.archive.org/web/1997/%URL% + +[Edit:\.cdf$] +IgnoreUrl=web.archive.org +AddRedirect=http://web.archive.org/web/1998/%URL% + +; YouTube playback (youtube-dl & yt.bat) +; uncomment lines below to enable +;[Edit:^(http://www\.|http://)youtube.com/watch] +;AddRedirect=http://%Proxy%/!convert/?url=%Url%&util=yt.bat&type=video/x-ms-asf +;AddConvert=yt.bat +;AddResponseHeader=Content-Type: video/x-ms-asf + +; YouTube playback (via original ViewTube) +; uncomment lines below to enable +;[Edit:^(http://www\.|http://).*.googlevideo.com/] +;AddRedirect=http://%Proxy%/!convert/?url=%Url%&util=ffmpeg&arg=-vcodec%20wmv1%20-acodec%20wmav1%20-f%20asf&type=video/x-ms-asf + + + +; Content patches +; Apply some edits to page's content. Here are two edits, in example: +; 1. Replace "eval()" with direct calls for IE3/4 +; 2. Fix work with _tmr JS variable in inline scripts (for IE4 too) +; AddFind: the find mask. +; AddReplace: the replacement. +[Edit:^http://old-dos.ru] +AddFind=eval\(('|")(.*?)\1\) +AddReplace=$2 +AddFind=var _tmr = _tmr .* \[\]; +AddReplace=var _tmr = _tmr; + +[Edit:.*] +OnContentType=application/x-netcdf +AddFind=HREF="http:// +AddReplace=HREF="http://web.archive.org/web/1998/ + +[Edit:\.cdf$] +AddFind= HREF="http:// +AddReplace= HREF="http://web.archive.org/web/1998/ + +[Edit:^http(s?)://web.archive.org/web/] +AddFind=