tinyproxy / tinyproxy

tinyproxy - a light-weight HTTP/HTTPS proxy daemon for POSIX operating systems
GNU General Public License v2.0
4.67k stars 645 forks source link

Empty request from connect with curl #530

Closed charlescohanlon closed 3 months ago

charlescohanlon commented 3 months ago

Tinyproxy version

1.11 stable

Issue

When I try to use the proxy with any interface other than connecting with my MacBook pro directly, Tinyproxy gets an empty request. I.e., connecting through Mac's system settings works just fine (I tried using this method as a sanity check). But, curl curl --insecure --proxy https://xxx.xxx.xxx.xxx --proxy-user "proxy" http://httpbin.org/ip does not work (where xxx.xxx.xxx.xxx is the server's public IP address)

Tinyproxy output

ubuntu@ip-172-31-27-203:~$ sudo tinyproxy -d -c tinyproxy.conf NOTICE Mar 25 09:23:27.079 [2747]: Initializing tinyproxy ... NOTICE Mar 25 09:23:27.080 [2747]: Reloading config file WARNING Mar 25 09:23:27.080 [2747]: You SHOULD set a UserName in the config file. Using current user instead. NOTICE Mar 25 09:23:27.080 [2747]: Reloading config file finished INFO Mar 25 09:23:27.080 [2747]: listen_sock called with addr = '(NULL)' INFO Mar 25 09:23:27.080 [2747]: trying to listen on host[0.0.0.0], family[2], socktype[1], proto[6] INFO Mar 25 09:23:27.080 [2747]: listening on fd [3] INFO Mar 25 09:23:27.080 [2747]: trying to listen on host[::], family[10], socktype[1], proto[6] INFO Mar 25 09:23:27.080 [2747]: listening on fd [4] INFO Mar 25 09:23:27.081 [2747]: Setting the various signals. INFO Mar 25 09:23:27.081 [2747]: Starting main loop. Accepting connections. CONNECT Mar 25 09:23:37.112 [2747]: Connect (file descriptor 5): xxx.xxx.xxx.xxx CONNECT Mar 25 09:23:37.112 [2747]: Request (file descriptor 5): CONNECT Mar 25 09:23:37.627 [2747]: Connect (file descriptor 6): xxx.xxx.xxx.xxx CONNECT Mar 25 09:23:37.627 [2747]: Request (file descriptor 6): WARNING Mar 25 09:23:45.089 [2747]: Could not retrieve all the headers from the client ERROR Mar 25 09:23:45.089 [2747]: Error reading readable client_fd 5 WARNING Mar 25 09:23:45.089 [2747]: Could not retrieve request entity WARNING Mar 25 09:23:45.601 [2747]: Could not retrieve all the headers from the client ERROR Mar 25 09:23:45.602 [2747]: Error reading readable client_fd 6 WARNING Mar 25 09:23:45.602 [2747]: Could not retrieve request entity (The xxx.xxx.xxx.xxx is my ISP address, and is correct).

tinyproxy.conf

Port 443 Timeout 600 (I ran it on 443 because no other ports seemed to work, but 443 is fine).

rofl0r commented 3 months ago

--proxy https

tinyproxy doesn't talk https

charlescohanlon commented 3 months ago

How is my Macbook able to establish https connections if tinyproxy doesn't talk https?

charlescohanlon commented 3 months ago

Thank you for the help. I've gotten it to work for my use case with HTTP. Unrelated question: If I wanted to conceal my identity while connecting to a server (via HTTPS), is it enough to use tinyproxy? Tinyproxy conceals my IP address, but your docs say that it has no control over the headers forwarded when using HTTPS. I'm not sure that this server has any kind of proxy-checking mechanism. I'm trying to spoof multiple client connections to a server.

rofl0r commented 3 months ago

If I wanted to conceal my identity while connecting to a server (via HTTPS), is it enough to use tinyproxy?

there are cookies and lots of other metrics used to identify a browser user. you best use anonymous browsing mode or a new profile or a dedicated browser install only for this purpose.