*******************************************************************************
Naoko 4.5 Config -- Sidki 2004-12-28 -- ReadMe
*******************************************************************************

This config should work with all Gecko Browsers and IE clones > 5.5 , Opera 7.x
(a few config features disabled), Netscape 4.x, NCSA Mosaic, and OffByOne (many
features disabled).  It may well be incompatible with IE 5.x or Opera 6.
However, most of the time i use it with Firefox (nightly build).

While it might be set up to surf the web and forget about Proxomitron, it's
actually intended for people that are curious about what's happening under the
hood of webpages.

The set itself is a bit complex and hence likely to be difficult to maintain
for people new to Proxomitron.  It is distributed under the terms of the GNU
General Public License (included).

The directory in which this ReadMe is located contains more files:
Documents, optional replacements for default files, and extras like
bookmarklets etc..  See "!content.html" for details.

Have fun :)
sidki


*******************************************************************************

Contents:

  Thanks!
  Installation
  Cache Handling
  Displaying Information about filtered Code (or not)
  The general Include/Exclude List
  Temporary Lists
  Importing URL Header Filters
  Importing Filters that target Scripts
  Unsorted


*******************************************************************************
Thanks!
*******************************************************************************

Mona for the creative discussions and for contributing great code.

ProxRocks/ProxFox for testing the betas and helpful suggestions.

JD for discussions and ideas on previous configs.

A great number of ideas came from Paul Rupe's config set:
http://www.geocities.com/u82011729/prox/

Jesse Ruderman's bookmarklets were a valuable resource for the Prox menu:
http://www.squarefree.com/bookmarklets/


*******************************************************************************
Installation
*******************************************************************************

* "xxxx-xx-xx" stands for the current version.

- Optional: If you have a previous version of this config set installed and
  want to replace it, remove the "Logs" subdirectory in Proxomitron's main
  directory (2004-04-11 config only), and the subdirectories starting with
  "sidki" in "Lists" and "html".

- Extract the zip into Proxomitron's main directory, preserving the zipped
  directory structure - WinZip, WinRar, 7Zip do that by default.
  No file will be overwritten.

- While you're there, make sure that the SSL DLLs - SSLeay32.dll and
  Libeay32.dll - are installed on your system.  They should reside either in
  the same directory as Proxomitron.exe or on your system's search path.  You
  can get them here: http://www.proxomitron.info/files/ .

- Load "sidki_xxxx-xx-xx.ptron" from Proxomitron's main window or the tray
  menu.

- Adjust the window dimensions to your liking.

- Open "LISTS\sidki_l_xxxx-xx-xx\CookieValues.ptxt" and below
  "IP Address Cookies -- Edit" replace the IP and IP alias matches with yours.
  See above mentioned list for details.

- Open "LISTS\sidki_l_xxxx-xx-xx\IncludeExclude.ptxt" and
  "LISTS\URL Alias List.txt", and copy your custom aliases to the
  "REDIRECT URLS (ALIASES)" section, which is at the bottom of IncludeExclude.

- If you use a remote proxy that requires (basic) authentication, add it via
  the external proxy dialog.
  Then edit the "Proxy-Authorization: Set Proxy & Send" header filter and
  replace "my.proxy.com" with your's.  In the replacement string replace
  "YOUR_NICK:YOUR_PW" with your data.  Highlight this string, right-click, and
  select "MIME encode/decode -> Encode string" from the context menu.
  Finally deactivate the "Use standard Proxy" and activate "Use Auth Proxy"
  filter.

- If you use Yahoo! services, edit the "Yahoo Login: Form Filler", replace
  "YOUR_NICK" and "YOUR_PW" with your personal data.  Activate the filter.

- If you want to personalize the URL command prefix (for security reasons), go
  to "Config -> Access" and replace "px." with something else.  Keep the final
  dot tho to ensure that your browsers won't complain.

- If you want Proxomitron to filter documents that are located on FTP servers,
  you need a proxy (local or remote) that "translates" FTP to HTTP.  Most ISP
  proxies do that.  First add your proxy via the "External Proxy" selector in
  Proxomitron's main window.  Then edit the "Proxy with FTP and Gopher" header
  filter, enter your proxy, and activate that filter.

- Have a look at the "Config Control" section in the headers and the web
  filters section, and adjust the defaults to suit your needs!

- In Proxomitron's main window, click "File -> Save Config file".

- Optional: If you like to have this config loaded by default upon startup,
  either launch Proxomitron from a shortcut pointing to
  "X:\PATH_TO_PROX\Proxomitron.exe X:\PATH_TO_PROX\sidki_xxxx-xx-xx.ptron"
  or rename "sidki_xxxx-xx-xx.ptron" to "default.cfg".

- Start surfing!


*******************************************************************************
Cache Handling
*******************************************************************************

The Config Control section in the Header Filters window contains three mutual
exclusive settings regarding caching.

Always Cache:

- Everything is cached for 24 hours.

- Reload sends a conditional request to the server, asking if the document has
  changed since the last fetch.  If there was no such information
  (Last-Modified or ETag), the document is re-requested anyway.

- CTRL-Reload unconditionally re-requests the document, no matter if it has
  changed or not.

- This behavior is the same for all browsers and all documents - the HTML page
  and everything that is embedded, images, external scripts, stylesheets, etc..

Always Cache except for HTML (default):

- Same as above except that when revisiting a page, the page itself
  (not images, ...) is conditionally re-requested  - if supported.

- *Unless* while navigating back/forward in a browser window.  Everything is
  fetched from the cache in this case.

Always Fresh

- All documents are re-fetched from the server in all situations.


*******************************************************************************
Displaying Information about filtered Code (or not)
*******************************************************************************

By default important information is shown at the bottom of pages.  Under
"Display I" in the Config Control section of the web filters there are options
to show more or less.  There is also a "Debug Mode" switch - accessible from
there as well as the Proxomitron menu - that activates several filters and
JavaScript routines.

You can always show/hide the filter information with the "Toggle Kills"
bookmarklet or with the "Toggle Kills" link in the Proxomitron Menu.

The majority of filters are set up for optional logging hits to a file.
There are two levels: Rare or crucial hits are logged to Log-Rare.log (active
by default).  Those and all other hits may also go timestamped to Log-Main.log
(by default only active when pressing the "L" key).  You'll find this option in
the Config Control section of the "Header Filters" window.


*******************************************************************************
The general Include/Exclude List
*******************************************************************************

One central part of this config is the list "IncludeExclude.ptxt".  You will
sooner or later need to add entries to that list.  Each entry needs to match
*just once*.

Say you want to bypass all JavaScript filters on www.somesite.com/mypage/ but
there already is an entry:
www.somesite.com/  $SET(keyword=.a_rdlink.)

Adding...
www.somesite.com/mypage/ $SET(keyword=.a_rdlink.a_js.)
...won't work because "www.somesite.com/mypage/"
is consumed by the first match.

So the correct way goes like:
www.somesite.com/(^mypage/) $SET(keyword=.a_rdlink.)
www.somesite.com/mypage/ $SET(keyword=.a_rdlink.a_js.)

There is a detailed content overview "IncludeExclude.html" in this directory.


*******************************************************************************
Temporary Lists
*******************************************************************************

There are a few lists that only exist in memory and get destroyed when you shut
down Proxomitron or reload the config.  If you want to keep them accross
sessions or just want to look at them for a while:

Add these entries to the [Blocklists] section of the config:
List.--[Temporary_Lists]--- = "..\Lists\sidki_l_xxxx-xx-xx\Separator"
List.Mem-CCProx = "..\Mem-CCProx.ptxt"
List.Mem-Encode = "..\Mem-Encode.ptxt"
List.Mem-ScriptSrc = "..\Mem-ScriptSrc.ptxt"
List.Mem-SpoofVars = "..\Mem-SpoofVars.ptxt"
List.Mem-StyleSrc = "..\Mem-StyleSrc.ptxt"

Then create zero-byte files with above names in Proxomitron's root directory
and reload the config.


*******************************************************************************
Importing URL Header Filters
*******************************************************************************

Don't directly import "URL:" header filters into this config!
They have a "special status" that lets the header filter sort order swap
between two states and make the order in which the filters match unpredictable.
Converting a "URL:" filter to one that doesn't interfere is easy:

Old:
[HTTP headers]
In = FALSE
Out = TRUE
Key = "URL: Kill somesite.com (Out)"
Match = "http://somesite.com/"
Replace = "\k"

New:
[HTTP headers]
In = FALSE
Out = TRUE
Key = "!-|||||||||||| URL: Kill somesite.com (Out)"
URL = "somesite.com/"
Replace = "\k"

If you need to match the protocol, there is a global variable "uProt" for that:
URL = "somesite.com/&$TST(uProt=http:)"


*******************************************************************************
Importing Filters that target Scripts
*******************************************************************************

A lot of filters in this config need to know if they are within a script or
not.  For this reason a variable called "script" is set right at the beginning
of a script block (or external script) , and reset when it closes.

So, if you want to add a filter that removes scripts, it needs to reset this
variable to keep things running smoothly.  To do this, just append
"$SET(script=)" to the replacement string.

[Patterns]
Name = "Remove bad Script"
Active = FALSE
Bounds = "$NEST(<script,</script >)"
Limit = 1024
Match = "*bad_code*"
Replace = "<!-- bad script removed -->$SET(script=)"


There are also filters that are intended to replace certain code within scripts
but in fact do that in the entire document.  So, if you are for instance
reading a discussion about scripting or Proxomitron, it may be hard to follow
because of that. :-)  You can almost always avoid that by appending
"&$TST(script=*)" to the matching expression.

[Patterns]
Name = "Replace bad Script Code"
Active = FALSE
Limit = 16
Match = "bad_code&$TST(script=*)"
Replace = "good_code"

Note: JavaScript links can be included by appending
"&($TST(script=*)|$TST(tAnc=2))" instead.


*******************************************************************************
Unsorted
*******************************************************************************

This config set uses non-standard file extensions: .ptron instead of .cfg,
.ptxt instead of .txt.  The reason is that you can associate them with your
text editor and - if it supports it - use Proxomitron-language syntax-
highlighting for the two filetypes.  A regfile to open them in an editor and a
highlight file for UltraEdit is included.  See "!content.html" for details.

Some filters need to know what browser you are using to work properly.  So, if
you are using a User-Agent switcher extension with Mozilla, make sure you set
it to the real UA while using this config.

There is a Proxomitron Menu that appears as an icon lower right on mouse click,
expands on hover, and disables itself on click.  The first header displays the
window name if there is one, or else "Dynamic".  The second header shows the
mode in which the page is rendered.  Some items in the menu vary depending on
browser, page, or chosen config settings.
