Code Monkey home page Code Monkey logo

Comments (7)

SeameX avatar SeameX commented on May 18, 2024 1

You miss understood me.
Use: pproxy -r 'http://HOST:PORT/#USERNAME:PASSWORD' -vvv
curl --proxy "http://localhost:8080" "https://httpbin.org/ip"

Feature: http TCP server -> http get,post is missing as shown in the main readme.

from python-proxy.

SeameX avatar SeameX commented on May 18, 2024

As far as i understand http is not supported. Try with https.

Would be awesome if you (the project owner) can add this functionality :)
Thats the only part that is missing for me to use this small tool on daily basis.

from python-proxy.

viniabreulima avatar viniabreulima commented on May 18, 2024

Already tried using HTTPS and does not work either.

Tried: pproxy -r 'http+ssl://HOST:PORT/#USERNAME:PASSWORD' -vvv and called curl --proxy "http://localhost:8080" "http://httpbin.org/ip", and still received curl: (52) Empty reply from server from the curl command.

I generated a self-signed certificate and started pproxy with: pproxy -l 'http+ssl://0.0.0.0:8099' --ssl server.crt,server.key -r 'http+ssl://HOST:PORT/#USERNAME:PASSWORD' -vvv and called curl --proxy-insecure --proxy "https://localhost:8099" "http://httpbin.org/ip", and still received curl: (52) Empty reply from server from the curl command.

Direct calls on the server via curl --proxy "https://HOST:PORT/" --proxy-user "USERNAME:PASSWORD" "http://httpbin.org/ip" works nicely.

I tested pproxy with remote proxies that doesn't need authentication and works nicely, but unfortunately, it is not my case

from python-proxy.

viniabreulima avatar viniabreulima commented on May 18, 2024

Oh, i totally misunderstood you, thanks for the clarification!
I tried calling an HTTPS domain, and it worked! Right now it may solve my case, but eventually i will need to call HTTP domains...

I made a few more tests, and i discovered that HTTP Get works! I tried on another proxy server with the following commands:
pproxy -v -r 'http://177.37.161.4:35509' (this proxy is a free one... maybe it won't be available by the time you test it - if you do that =P)
curl --proxy "http://localhost:8080" "https://httpbin.org/ip" Works!
curl --proxy "http://localhost:8080" "http://httpbin.org/ip" Works too!

So... based on my "investigation" about this issue, i'm concluding that the issue is about the authentication... or am i missing something here?

Oh! And i tried using SOCKS5 on the local proxy instead of HTTP, and works the same way as if i was using HTTP. (https calls work, http calls don't)

And @SeameX , thank you from the bottom of my heart for your assistance!

from python-proxy.

qwj avatar qwj commented on May 18, 2024

You can try httponly:// instead of http://, if the remote http proxy server supports only GET/POST instead of CONNECT method.
-r httponly:// makes pproxy to connect via GET/POST, and -r http:// makes pproxy to connect via CONNECT.
-l http:// listens via both GET/POST and CONNECT
Some remote http proxy doesn't support CONNECT, so you can try httponly://

You can also use "--test http://google.com" to test the availability of remote proxy instead of "curl --proxy http://localhost:8080"

from python-proxy.

viniabreulima avatar viniabreulima commented on May 18, 2024

Looks like you are right! My remote proxy does not accept CONNECT, and httponly works! But now we have another issue. It is working only for HTTP sites.
I'm trying to link both http+ssl and httponly, but i think they exclude each other, right?
If i use http+ssl, i can access HTTPS sites, and i cannot access HTTP sites.
If i use httponly, i can access HTTP sites and i cannot access HTTPS sites.

Oh, apparently if i use the --test argument, it does not accept HTTPS sites, i'm getting an assertion error: AssertionError: Unknown scheme https

Anyway, now the issue has changed. Authentication is working properly...

from python-proxy.

qwj avatar qwj commented on May 18, 2024

If the proxy only supports GET/POST, we cannot tunnel HTTPS traffic to this proxy, because TLS traffic needs safe CONNECT method to tunnel.
You don't need to specify http+ssl for HTTPS sites. The TLS traffic can be properly handled if the remote proxy accepts CONNECT method.

from python-proxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.