#1514 Rewriting only to GET?

closed
None
5
2012-12-04
2012-10-17
sod109th
No

I use Privoxy 3.0.19 between Windows 7 x64 client and Ubuntu 12.04 x64 server on connection that *only* accepts GET requests. So far it works by rewriting POST to GET at the client then back to POST at the server to surf websites without https.

The POST however don't work anymore on Privoxy 3.0.20 (2012-10-17 CVS) both at the cilent and server, often returning 'no-server-data' error. I suspect this has anything to do with bugfix 3464439 http://sourceforge.net/tracker/?func=detail&aid=3464439&group_id=11118&atid=111118.

Is this a bug or is there any workaround? Is it also possible to do the same with CONNECT? Because it's never worked for me. Thanks.

Discussion

  • Fabian Keil

    Fabian Keil - 2012-10-18

    I'm unsetting the private flag as it probably doesn't do what you think it does and increases the chances that SF eats comments instead of accepting them.

    Anyway, if you rewrite the method from a POST request to GET, the response is no longer HTTP compliant and thus it's not a bug if it doesn't work and if it stopped working I wouldn't consider it a regression.

    Having said that, it seems to work for me so maybe our configurations or request differ in a way that matters so please provide a log excerpt that shows the "problem": http://www.privoxy.org/user-manual/contact.html#CONTACT-BUGS

    I don't think an unmodified Privoxy can be used to do the same trick for CONNECT requests and as it's off-label use for an HTTP proxy I don't consider this a missing feature.

    I'd suggest that you use a more appropriate tool for the job. The rewriting (CONNECT requests included) should work if you use four socat instances surrounding two short shell scripts. Whether or not the rewritten CONNECT requests make it through your strange censoring device is another question.

    You also might want to checkout obfsproxy which can do more sophisticated traffic transformation: https://www.torproject.org/projects/obfsproxy.html.en

     
  • Fabian Keil

    Fabian Keil - 2012-10-18
    • assigned_to: nobody --> fabiankeil
    • milestone: 2426028 -->
    • labels: 427303 -->
    • status: open --> pending
     
  • sod109th

    sod109th - 2012-10-24
     
  • sod109th

    sod109th - 2012-10-24

    Attached, both from the latest CVS. Tried disabling keep-alive-timeout and connection-sharing but no luck. This doesn't happen on 3.0.19 with exactly the same configuration. Thanks for the suggestion.

     
  • sod109th

    sod109th - 2012-10-24
    • status: pending --> open
     
  • sod109th

    sod109th - 2012-10-24

    Forgot to mention that the error happens when trying to click "Low Speed Download" button from the following link http://ryushare.com/8xo3874t3kls.

     
  • sod109th

    sod109th - 2012-10-24

    And also both compiled with zlib and ipv6 disabled if that matters.

     
  • Fabian Keil

    Fabian Keil - 2012-10-25
    • status: open --> pending
     
  • Fabian Keil

    Fabian Keil - 2012-10-25

    Thanks for the logs. I reproduced the "problem" with the data you provided.

    You could try this patch (on the server):

    --- jcc.c
    +++ jcc.c
    @@ -1114,7 +1114,8 @@ static void verify_request_length(struct client_state *csp)
    && strcmpic(csp->http->gpc, "HEAD")
    && strcmpic(csp->http->gpc, "TRACE")
    && strcmpic(csp->http->gpc, "OPTIONS")
    - && strcmpic(csp->http->gpc, "DELETE"))
    + && strcmpic(csp->http->gpc, "DELETE")
    + || (csp->expected_client_content_length != 0))

     
  • sod109th

    sod109th - 2012-10-29
    • status: pending --> open
     
  • sod109th

    sod109th - 2012-10-29

    Thanks for the patch now that I could stay updated.

    But I've noticed on Privoxy 3.0.20 client it often delays for about 3 seconds before loading a page, could be an unrelated issue.

     
  • sod109th

    sod109th - 2012-10-29

    Removed some headers and the delay seems to be gone. Thanks again for the support.

     
  • sod109th

    sod109th - 2012-12-04
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks