Changeset eae86f5


Ignore:
Timestamp:
Sep 8, 2004 7:25:09 AM (16 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
8e63974
Parents:
30128a1
git-author:
hypercubus <hypercubus> (09/08/04 07:25:09)
git-committer:
zzz <zzz@…> (09/08/04 07:25:09)
Message:

Updates by cervantes:

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/proxyscript/i2pProxy.pac

    r30128a1 reae86f5  
    66** Date:    11 May 2004
    77**
     8** Revised: 07 Sep 2004
     9** Changes:
     10**       Proxy recursion disabled by default (strict)
     11**       Password Authentication for session commands
     12**       Support for http://path?i2paddresshelper=BASE64
     13**       Support for http://i2p/BASE64/path syntax
    814** Revised: 17 May 2004
    9 ** Added:
     15** Changes:
    1016**       Ability for the user to control the proxy
    1117**       status on a per browser-session basis.
    1218********************************************************/
     19
    1320
    1421/* C O N F I G U R A T I O N
     
    5461**   eg. <img src="i2p.off" ...
    5562**   This is why the default setting for statusKeyword is "limited", which only
    56 **   allows you to set the proxy status to "on".
     63**   allows you to set the proxy status to "on". See also keywordAuthPassword.
    5764**
    5865**   [1] "all"  => All proxy status urls are available.
    5966**               '->  i2p.on, i2p.off, i2p.auto (respective to proxyStatus settings)
    6067**               '->  WARNING: Setting "all" is a big risk to your anonymity!
    61 **               
     68**               '->  In this mode it is highly recommended you set an AuthPassword too!
     69**
    6270**   [2] "limited"  => Only i2p.on is available..
    6371**                      '->  This setting lasts for the duration of the browser setting.
     
    7179*/
    7280
    73 var statusKeyword = "limited";
     81var statusKeyword = "all";
    7482
    7583/*
     
    8593*/
    8694
    87 var strict = false;
     95var strict = true;
     96
     97/*
     98**   By setting an authentication password, all activated session keywords
     99**   will require the addition of a password to prevent malicious sites from
     100**   hijacking your proxy settings. ie. <img src="i2p.off" ...
     101**   Users should append whatever they set here to any command keywords
     102**   they use.
     103**   eg. i2p.on.passw0rd
     104**   If left blank, authentication is ignored - it is recommended that
     105**   you use "limited" statusKeyword mode if you choose not to require a password.
     106**   If you do require this feature then you should replace the default "passw0rd" with
     107**   one of your own (recommend at least 8 letters with a case-sensitive alpha-numeric
     108**   mix of characters).
     109**
     110*/
     111
     112var keywordAuthPassword = "passw0rd";
    88113
    89114
     
    97122
    98123if (strict == false) {
    99         i2pProxy = i2pProxy + "; " + normal;
     124     i2pProxy = i2pProxy + "; " + normal;
     125}
     126
     127/*Check for User Authentication Password.
     128*/
     129if (keywordAuthPassword != "") {
     130     keywordAuthPassword = "." + keywordAuthPassword;
    100131}
    101132
     
    109140
    110141   if (statusKeyword != "off") {
    111       if (host == "i2p.off" && statusKeyword == "all") {
     142      if (host == "i2p.off" + keywordAuthPassword && statusKeyword == "all") {
    112143         /*Proxy is bypassed - outweb available only
    113144         */
    114145         proxyStatus = "off";
    115       } else if (host == "i2p.auto" && statusKeyword == "all") {
     146      } else if (host == "i2p.auto" + keywordAuthPassword && statusKeyword == "all") {
    116147          /* Proxy is used only for .i2p hosts otherwise
    117148          ** '-> browse as normal.
    118149          */
    119150          proxyStatus = "auto";
    120       } else if (host == "i2p.on" && statusKeyword == "limited") {
     151      } else if (host == "i2p.on" + keywordAuthPassword && (statusKeyword == "limited" ||
     152                                                            statusKeyword == "all"        )) {
    121153          /* Only I2P traffic is accepted.
    122154          */
     
    136168   
    137169   host = host.toLowerCase();
    138    /* check tld for "i2p" - if found then redirect
     170   /* check tld for "i2p" or oOo's new "i2paddresshelper" syntax - if found then redirect
    139171   ** '-> request to the i2p proxy
    140172   */
    141173   
    142    if (shExpMatch(host, "*.i2p")) {    // seems more reliable than:
    143        return i2pProxy;                     // dnsDomainIs(host, ".i2p") ||
    144    } else {                                      // i2pRegex.test(host)
     174   if (url.match(/^http:\/\/i2p\/[a-zA-Z0-9\-\~]{516}|i2paddresshelper=/i) ||
     175       shExpMatch(host, "*.i2p")) {                       // seems more reliable than:
     176       return i2pProxy;                                     // dnsDomainIs(host, ".i2p") ||
     177   } else {                                                   // i2pRegex.test(host)
    145178       return normal;
    146179   }
  • history.txt

    r30128a1 reae86f5  
    1 $Id: history.txt,v 1.11 2004/09/07 04:49:02 jrandom Exp $
     1$Id: history.txt,v 1.12 2004/09/07 17:13:12 jrandom Exp $
     2
     32004-09-07  cervantes:
     4    * Proxy recursion disabled by default (strict)
     5    * Password Authentication for session commands
     6    * Support for http://path?i2paddresshelper=BASE64
     7    * Support for http://i2p/BASE64/path syntax
    28
    392004-09-07  jrandom
Note: See TracChangeset for help on using the changeset viewer.