Comments (7)
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.
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.
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.
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.
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.
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.
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)
- Define port for outgoing packets
- socks5 udp无法使用
- http proxy fail for pproxy -l http://:9000/ -r http://httpbin.org/ -v HOT 1
- Empty reply from proxy server - even when remote target port is closed HOT 1
- Question about iptables
- Backward Proxy GET => Empty reply from server
- Dynamically set a username and password for the remote proxy
- How to print all request headers
- Possibility of redirecting traffic to warp?
- how to set systme proxy in python code,like 'dict(rserver=[remote])' ?
- Rules seem to be ignored with 'direct' HOT 3
- 有没有办法拦截特定的路径并返回特定的响应 HOT 1
- ProxyBackward' object has no attribute 'sockets
- feature request, proxy bypass
- HTTPS request
- rules file not work. HOT 1
- How to support multiple usernames and passwords
- Protocol table
- python-proxy如何获取用户来源IP? How to get user source ip? HOT 1
- Configuring a Python Proxy on One Computer to Allow Another to Access the Internet
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-proxy.