[34485] trunk/dports/www/privoxy/files/patch-socks5.diff

reiffert at macports.org reiffert at macports.org
Tue Feb 26 11:59:23 PST 2008


Revision: 34485
          http://trac.macosforge.org/projects/macports/changeset/34485
Author:   reiffert at macports.org
Date:     2008-02-26 11:59:22 -0800 (Tue, 26 Feb 2008)

Log Message:
-----------
Closing 14293

Modified Paths:
--------------
    trunk/dports/www/privoxy/files/patch-socks5.diff

Modified: trunk/dports/www/privoxy/files/patch-socks5.diff
===================================================================
--- trunk/dports/www/privoxy/files/patch-socks5.diff	2008-02-26 19:58:01 UTC (rev 34484)
+++ trunk/dports/www/privoxy/files/patch-socks5.diff	2008-02-26 19:59:22 UTC (rev 34485)
@@ -1,16 +1,16 @@
 diff -r 6ce92f2e919b config
---- config	Sat Dec 22 21:46:02 2007 -0800
-+++ config	Thu Jan 03 11:47:15 2008 -0800
-@@ -991,7 +991,7 @@ buffer-limit 4096
+--- config	2008-01-17 19:17:15.000000000 +0100
++++ config	2008-02-12 21:00:08.000000000 +0100
+@@ -1097,7 +1097,7 @@
  #
- 
  #
+ #
 -#  5.2. forward-socks4 and forward-socks4a
 +#  5.2. forward-socks4, forward-socks4a and forward-socks5
- #  =======================================
  #
  #  Specifies:
-@@ -1023,10 +1023,12 @@ buffer-limit 4096
+ #
+@@ -1128,10 +1128,12 @@
  #      Multiple lines are OK, they are checked in sequence, and the
  #      last match wins.
  #
@@ -27,11 +27,10 @@
  #
  #      If http_parent is ".", then requests are not forwarded to another
  #      HTTP proxy but are made (HTTP-wise) directly to the web servers,
-@@ -1046,6 +1048,17 @@ buffer-limit 4096
- #      HTTP parent looks like this:
- #  
+@@ -1153,6 +1155,17 @@
+ #
  #        forward-socks4   /               socks-gw.example.com:1080  .
-+#
+ #
 +#      ssh dynamic forwarding can handle either SOCKS 4 or SOCKS 5
 +#      requests.  But name lookups on the server can only be done with
 +#      SOCKS 5.  To chain Privoxy and ssh dynamic forwarding using
@@ -42,13 +41,14 @@
 +#
 +#      This presumes, of course, that you've configured your ssh
 +#      connection with 'DynamicForward 3129'.
++#
  #
  #      To chain Privoxy and Tor, both running on the same system,
- #      you should use the rule:
+ #      you would use something like:
 diff -r 6ce92f2e919b gateway.c
---- gateway.c	Sat Dec 22 21:46:02 2007 -0800
-+++ gateway.c	Thu Jan 03 11:47:15 2008 -0800
-@@ -161,11 +161,25 @@ static jb_socket socks4_connect(const st
+--- gateway.c	2007-07-28 14:30:03.000000000 +0200
++++ gateway.c	2008-02-12 20:54:42.000000000 +0100
+@@ -176,11 +176,25 @@
                                  int target_port,
                                  struct client_state *csp);
  
@@ -74,17 +74,17 @@
  
  /* structure of a socks client operation */
  struct socks_op {
-@@ -233,6 +247,9 @@ jb_socket forwarded_connect(const struct
-       case SOCKS_4:
+@@ -250,6 +264,9 @@
        case SOCKS_4A:
           return (socks4_connect(fwd, dest_host, dest_port, csp));
-+
+ 
 +      case SOCKS_5:
 +         return (socks5_connect(fwd, dest_host, dest_port, csp));
- 
++
        default:
           /* Should never get here */
-@@ -396,6 +413,200 @@ static jb_socket socks4_connect(const st
+          log_error(LOG_LEVEL_FATAL, "SOCKS4 impossible internal error - bad SOCKS type.");
+@@ -454,6 +471,200 @@
  }
  
  
@@ -286,25 +286,25 @@
    Local Variables:
    tab-width: 3
 diff -r 6ce92f2e919b loadcfg.c
---- loadcfg.c	Sat Dec 22 21:46:02 2007 -0800
-+++ loadcfg.c	Thu Jan 03 11:47:15 2008 -0800
-@@ -465,6 +465,7 @@ static struct file_list *current_configf
- #define hash_forward                      2029845ul /* "forward" */
- #define hash_forward_socks4            3963965521ul /* "forward-socks4" */
- #define hash_forward_socks4a           2639958518ul /* "forward-socks4a" */
-+#define hash_forward_socks5            3963965522ul /* "forward-socks5" */
- #define hash_forwarded_connect_retries  101465292ul /* "forwarded-connect-retries" */
- #define hash_jarfile                      2046641ul /* "jarfile" */
- #define hash_listen_address            1255650842ul /* "listen-address" */
-@@ -690,6 +691,7 @@ struct configuration_spec * load_config(
+--- loadcfg.c	2007-12-23 16:24:56.000000000 +0100
++++ loadcfg.c	2008-02-12 21:01:39.000000000 +0100
+@@ -535,6 +535,7 @@
+ #define hash_forward                        2029845ul /* "forward" */
+ #define hash_forward_socks4              3963965521ul /* "forward-socks4" */
+ #define hash_forward_socks4a             2639958518ul /* "forward-socks4a" */
++#define hash_forward_socks5              3963965522ul /* "forward-socks5" */
+ #define hash_forwarded_connect_retries    101465292ul /* "forwarded-connect-retries" */
+ #define hash_jarfile                        2046641ul /* "jarfile" */
+ #define hash_listen_address              1255650842ul /* "listen-address" */
+@@ -774,6 +775,7 @@
        struct forward_spec *cur_fwd;
        int vec_count;
        char *vec[3];
 +      unsigned long int directive_hash = 0ul;
  
-       strcpy(tmp, buf);
+       strlcpy(tmp, buf, sizeof(tmp));
  
-@@ -730,7 +732,8 @@ struct configuration_spec * load_config(
+@@ -814,7 +816,8 @@
        savearg(cmd, arg, config);
  
  
@@ -314,7 +314,7 @@
        {
  /* *************************************************************************
   * actionsfile actions-file-name
-@@ -1089,6 +1092,7 @@ struct configuration_spec * load_config(
+@@ -1203,6 +1206,7 @@
   * forward-socks4a url-pattern socks-proxy[:port] (.|http-proxy[:port])
   * *************************************************************************/
           case hash_forward_socks4a:
@@ -322,13 +322,12 @@
              vec_count = ssplit(arg, " \t", vec, SZ(vec), 1, 1);
  
              if (vec_count != 3)
-@@ -1110,7 +1114,11 @@ struct configuration_spec * load_config(
+@@ -1224,7 +1228,11 @@
                 continue;
              }
  
--            cur_fwd->type = SOCKS_4A;
 +            if (directive_hash == hash_forward_socks4a) {
-+               cur_fwd->type = SOCKS_4A;
+             cur_fwd->type = SOCKS_4A;
 +            } else {
 +               cur_fwd->type = SOCKS_5;
 +            }
@@ -336,9 +335,9 @@
              /* Save the URL pattern */
              if (create_url_spec(cur_fwd->url, vec[0]))
 diff -r 6ce92f2e919b project.h
---- project.h	Sat Dec 22 21:46:02 2007 -0800
-+++ project.h	Thu Jan 03 11:47:15 2008 -0800
-@@ -1326,6 +1326,7 @@ struct block_spec
+--- project.h	2007-12-07 19:29:23.000000000 +0100
++++ project.h	2008-02-12 20:54:42.000000000 +0100
+@@ -1474,6 +1474,7 @@
  #define SOCKS_NONE    0    /**< Don't use a SOCKS server               */
  #define SOCKS_4      40    /**< original SOCKS 4 protocol              */
  #define SOCKS_4A     41    /**< as modified for hosts w/o external DNS */
@@ -346,7 +345,7 @@
  
  
  /**
-@@ -1336,7 +1337,7 @@ struct forward_spec
+@@ -1484,7 +1485,7 @@
     /** URL pattern that this forward_spec is for. */
     struct url_spec url[1];
  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080226/3ac2a073/attachment-0001.html 


More information about the macports-changes mailing list