Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation via apt on Vagrant machine is very slow #52

Closed
ihmels opened this issue May 22, 2018 · 15 comments
Closed

Installation via apt on Vagrant machine is very slow #52

ihmels opened this issue May 22, 2018 · 15 comments

Comments

@ihmels
Copy link

ihmels commented May 22, 2018

I want to install a package via apt on my Ubuntu 18.04 Vagrant machine. It takes very long until [Waiting for headers] disappears and the installation begins. I'm running Windows 7 and the version 2018-05-19 of px. Sometimes apt prints the error message Connection failed [IP: 10.0.2.2 3129]. The log then says:

MainProcess: Thread_4: 1526995974: handle_one_request: Host disconnected
MainProcess: Thread_4: 1526995974: handle_one_request: Host disconnected: 2
MainProcess: Thread_4: 1526995974: handle_one_request: Host disconnected: 3
MainProcess: Thread_4: 1526995974: handle_one_request: Closed connection to avoid infinite loop

If I switch back to Cntlm everything works normal.

MainProcess: MainThread: 1526995125: attach_console: Attaching to console 8952
MainProcess: MainThread: 1526995125: parse_proxy: [('proxy01.example.com', 8080)]
Serving at :3129 proc MainProcess
MainProcess: MainThread: 1526995125: parse_config: proxy:server = proxy01.example.com:8080
MainProcess: MainThread: 1526995125: parse_config: proxy:listen = 
MainProcess: MainThread: 1526995125: parse_config: proxy:port = 3129
MainProcess: MainThread: 1526995125: parse_config: proxy:gateway = 1
MainProcess: MainThread: 1526995125: parse_config: proxy:hostonly = 0
MainProcess: MainThread: 1526995125: parse_config: proxy:allow = 127.0.0.1,10.0.2.0/24,192.168.56.0/24
MainProcess: MainThread: 1526995125: parse_config: proxy:noproxy = 127.0.0.1,10.0.0.0/8,192.168.0.0/16
MainProcess: MainThread: 1526995125: parse_config: proxy:useragent = 
MainProcess: MainThread: 1526995125: parse_config: settings:workers = 1
MainProcess: MainThread: 1526995125: parse_config: settings:threads = 5
MainProcess: MainThread: 1526995125: parse_config: settings:idle = 30
MainProcess: MainThread: 1526995125: parse_config: settings:socktimeout = 5.0
MainProcess: MainThread: 1526995125: parse_config: settings:proxyreload = 60
MainProcess: MainThread: 1526995125: parse_config: settings:foreground = 0
MainProcess: MainThread: 1526995125: parse_config: settings:log = 0
MainProcess: MainThread: 1526995125: detach_console: Freed console successfully
MainProcess: MainThread: 1526995163: verify_request: Client address: 127.0.0.1
MainProcess: Thread_0: 1526995163: do_GET: Entering
MainProcess: Thread_0: 1526995163: do_GET: Path = http://archive.ubuntu.com/ubuntu/pool/universe/0/0ad-data/0ad-data_0.0.22-1_all.deb
MainProcess: Thread_0: 1526995163: do_transaction: Entering
MainProcess: Thread_0: 1526995163: get_destination: archive.ubuntu.com:80
MainProcess: Thread_0: 1526995163: get_destination: http://archive.ubuntu.com/ubuntu/pool/universe/0/0ad-data/0ad-data_0.0.22-1_all.deb => ('91.189.88.149', 80) + /ubuntu/pool/universe/0/0ad-data/0ad-data_0.0.22-1_all.deb
MainProcess: Thread_0: 1526995163: do_socket_connect: New connection: ('proxy01.example.com', 8080)
MainProcess: Thread_0: 1526995163: do_proxy_type: Searching proxy type
MainProcess: Thread_0: 1526995163: do_socket: Entering
MainProcess: Thread_0: 1526995163: do_socket: GET http://archive.ubuntu.com/ubuntu/pool/universe/0/0ad-data/0ad-data_0.0.22-1_all.deb HTTP/1.1
MainProcess: Thread_0: 1526995163: do_socket: Sending Host: archive.ubuntu.com
MainProcess: Thread_0: 1526995163: do_socket: Sending Range: bytes=27852430-
MainProcess: Thread_0: 1526995163: do_socket: Sending If-Range: Sat, 28 Oct 2017 18:04:50 GMT
MainProcess: Thread_0: 1526995163: do_socket: Sending User-Agent: Debian APT-HTTP/1.3 (1.6.1)
MainProcess: Thread_0: 1526995163: do_socket: Reading response code
MainProcess: Thread_0: 1526995163: do_socket: Response code: 407 False
MainProcess: Thread_0: 1526995163: do_socket: Reading response headers
MainProcess: Thread_0: 1526995163: do_socket: Received Proxy-Authenticate: sanitized (9)
MainProcess: Thread_0: 1526995163: do_socket: Received Proxy-Authenticate: sanitized (4)
MainProcess: Thread_0: 1526995163: do_socket: Received Date: Tue, 22 May 2018 13:19:23 GMT
MainProcess: Thread_0: 1526995163: do_socket: Received Cache-Control: no-cache
MainProcess: Thread_0: 1526995163: do_socket: Received Pragma: no-cache
MainProcess: Thread_0: 1526995163: do_socket: Received Content-Type: text/html; charset="UTF-8"
MainProcess: Thread_0: 1526995163: do_socket: Received Content-Length: 2528
MainProcess: Thread_0: 1526995164: do_socket: Received Accept-Ranges: none
MainProcess: Thread_0: 1526995164: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1526995164: do_socket: Reading response data
MainProcess: Thread_0: 1526995164: do_socket: Content length 2528
MainProcess: Thread_0: 1526995164: do_proxy_type: Auth mechanisms: Negotiate NTLM 
MainProcess: Thread_0: 1526995164: do_proxy_type: Selected: {('proxy01.example.com', 8080): 'NTLM'}
MainProcess: Thread_0: 1526995164: get_response_sspi: pywin32 SSPI
MainProcess: Thread_0: 1526995164: do_socket: Entering
MainProcess: Thread_0: 1526995164: do_socket: GET http://archive.ubuntu.com/ubuntu/pool/universe/0/0ad-data/0ad-data_0.0.22-1_all.deb HTTP/1.1
MainProcess: Thread_0: 1526995164: do_socket: Sending Host: archive.ubuntu.com
MainProcess: Thread_0: 1526995164: do_socket: Sending Range: bytes=27852430-
MainProcess: Thread_0: 1526995164: do_socket: Sending If-Range: Sat, 28 Oct 2017 18:04:50 GMT
MainProcess: Thread_0: 1526995164: do_socket: Sending User-Agent: Debian APT-HTTP/1.3 (1.6.1)
MainProcess: Thread_0: 1526995164: do_socket: Sending extra Proxy-Authorization: sanitized len(85)
MainProcess: Thread_0: 1526995164: do_socket: Reading response code
MainProcess: Thread_0: 1526995164: do_socket: Response code: 407 False
MainProcess: Thread_0: 1526995164: do_socket: Reading response headers
MainProcess: Thread_0: 1526995164: do_socket: Received Proxy-Authenticate: sanitized (301)
MainProcess: Thread_0: 1526995164: do_socket: Received Date: Tue, 22 May 2018 13:19:24 GMT
MainProcess: Thread_0: 1526995164: do_socket: Received Cache-Control: no-cache
MainProcess: Thread_0: 1526995164: do_socket: Received Pragma: no-cache
MainProcess: Thread_0: 1526995164: do_socket: Received Content-Type: text/html; charset="UTF-8"
MainProcess: Thread_0: 1526995164: do_socket: Received Content-Length: 2528
MainProcess: Thread_0: 1526995164: do_socket: Received Accept-Ranges: none
MainProcess: Thread_0: 1526995164: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1526995164: do_socket: Reading response data
MainProcess: Thread_0: 1526995164: do_socket: Content length 2528
MainProcess: Thread_0: 1526995164: do_transaction: Auth required
MainProcess: Thread_0: 1526995164: do_transaction: Challenged
MainProcess: Thread_0: 1526995164: get_response_sspi: pywin32 SSPI
MainProcess: Thread_0: 1526995164: do_socket: Entering
MainProcess: Thread_0: 1526995164: do_socket: GET http://archive.ubuntu.com/ubuntu/pool/universe/0/0ad-data/0ad-data_0.0.22-1_all.deb HTTP/1.1
MainProcess: Thread_0: 1526995164: do_socket: Sending Host: archive.ubuntu.com
MainProcess: Thread_0: 1526995164: do_socket: Sending Range: bytes=27852430-
MainProcess: Thread_0: 1526995164: do_socket: Sending If-Range: Sat, 28 Oct 2017 18:04:50 GMT
MainProcess: Thread_0: 1526995164: do_socket: Sending User-Agent: Debian APT-HTTP/1.3 (1.6.1)
MainProcess: Thread_0: 1526995164: do_socket: Sending extra Proxy-Authorization: sanitized len(577)
MainProcess: Thread_0: 1526995164: do_socket: Reading response code
MainProcess: Thread_0: 1526995164: do_socket: Response code: 200 False
MainProcess: Thread_0: 1526995164: do_socket: Reading response headers
MainProcess: Thread_0: 1526995164: do_socket: Received Date: Tue, 22 May 2018 13:19:24 GMT
MainProcess: Thread_0: 1526995164: do_socket: Received Server: Apache/2.4.18 (Ubuntu)
MainProcess: Thread_0: 1526995164: do_socket: Received Last-Modified: Sat, 28 Oct 2017 18:04:50 GMT
MainProcess: Thread_0: 1526995164: do_socket: Received ETag: "26273504-55c9f3dcdb480"
MainProcess: Thread_0: 1526995164: do_socket: Received Accept-Ranges: bytes
MainProcess: Thread_0: 1526995164: do_socket: Received Content-Length: 640103684
MainProcess: Thread_0: 1526995164: do_socket: Received Cache-Control: max-age=86400
MainProcess: Thread_0: 1526995164: do_socket: Received Keep-Alive: timeout=5, max=100
MainProcess: Thread_0: 1526995164: do_socket: Received Content-Type: application/x-debian-package
MainProcess: Thread_0: 1526995164: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1526995164: do_socket: Reading response data
MainProcess: Thread_0: 1526995164: do_socket: Content length 640103684
@ihmels ihmels changed the title Cannot install via apt Installation via apt on Vagrant machine is very slow May 22, 2018
@genotrance
Copy link
Owner

I think this is similar to #47, Px is trying to download everything into memory before sending back to you. 640103684 = 610MB so it's downloading the whole thing before sending anything.

@genotrance genotrance added the bug label May 22, 2018
@ccbur
Copy link
Contributor

ccbur commented Jun 8, 2018

We encountered the same problem with Chocolatey. Installing a package with a big download (eg. jdk8, ~200MB) does not work if we are using a slower wifi connection. Chocolatey stops with a timeout after a minute or so.

I'm not sure how much effort is needed to rework px. From a code perspective, the reading of the data is not really near the writing to the response stream in fwd_resp(). I think the refactoring needed is too much work for me currently :-(

@genotrance
Copy link
Owner

Just like you mentioned, it requires a full re-architect of the HTTP GET call. A workaround is to use HTTPS which totally bypasses Px for this work since client and server talk directly. It may not be always available though so does need to be fixed eventually. I'm still thinking how to best handle this.

@ccbur
Copy link
Contributor

ccbur commented Jun 12, 2018

HTTPS is a good point. But now I'm wondering, why a bigger https download via chocolatey+px is also ending in the same timeout. That's strange. I'll try to debug this a little bit more. Maybe it's a bug in Chocolatey. Changing the timeouts did not help there :-(

@ihmels
Copy link
Author

ihmels commented Jun 12, 2018

@ccbur I have also had the problems with HTTPS connections. So I think it’s not a bug in Chocolatey.

@genotrance
Copy link
Owner

Can you please post an HTTPS log for Px showing this problem? I don't see how it can be the same issue since Px doesn't get involved in any of the content length and size actions. Logs will help figure that out.

@ihmels
Copy link
Author

ihmels commented Jun 15, 2018

I tried to download the Composer installer with Wget and got the following error:

$ wget -O /tmp/composer-setup.php https://getcomposer.org/installer
--2018-06-15 06:24:28--  https://getcomposer.org/installer
Connecting to 10.0.2.2:3129... connected.
Unable to establish SSL connection.

Logs of px:

MainProcess: Thread_1: 1529043755: do_CONNECT: Entering
MainProcess: Thread_1: 1529043755: do_transaction: Entering
MainProcess: Thread_1: 1529043755: get_destination: getcomposer.org:443
MainProcess: Thread_1: 1529043755: get_destination: getcomposer.org:443 => ('54.36.53.46', 443) + /
MainProcess: Thread_1: 1529043755: do_socket_connect: New connection: ('proxy01.example.com', 8080)
MainProcess: Thread_1: 1529043755: get_response_sspi: pywin32 SSPI
MainProcess: Thread_1: 1529043755: do_socket: Entering
MainProcess: Thread_1: 1529043755: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_1: 1529043755: do_socket: Sending User-Agent: Wget/1.19.4 (linux-gnu)
MainProcess: Thread_1: 1529043755: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_1: 1529043755: do_socket: Sending extra Proxy-Authorization: sanitized len(85)
MainProcess: Thread_1: 1529043755: do_socket: Reading response code
MainProcess: Thread_1: 1529043755: do_socket: Response code: 407 False
MainProcess: Thread_1: 1529043755: do_socket: Reading response headers
MainProcess: Thread_1: 1529043755: do_socket: Received Proxy-Authenticate: sanitized (301)
MainProcess: Thread_1: 1529043755: do_socket: Received Date: Fri, 15 Jun 2018 06:22:35 GMT
MainProcess: Thread_1: 1529043755: do_socket: Received Cache-Control: no-cache
MainProcess: Thread_1: 1529043755: do_socket: Received Pragma: no-cache
MainProcess: Thread_1: 1529043755: do_socket: Received Content-Type: text/html; charset="UTF-8"
MainProcess: Thread_1: 1529043755: do_socket: Received Content-Length: 2536
MainProcess: Thread_1: 1529043755: do_socket: Received Accept-Ranges: none
MainProcess: Thread_1: 1529043755: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_1: 1529043755: do_socket: Reading response data
MainProcess: Thread_1: 1529043755: do_socket: Content length 2536
MainProcess: Thread_1: 1529043755: do_transaction: Auth required
MainProcess: Thread_1: 1529043755: do_transaction: Challenged
MainProcess: Thread_1: 1529043755: get_response_sspi: pywin32 SSPI
MainProcess: Thread_1: 1529043755: do_socket: Entering
MainProcess: Thread_1: 1529043755: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_1: 1529043755: do_socket: Sending User-Agent: Wget/1.19.4 (linux-gnu)
MainProcess: Thread_1: 1529043755: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_1: 1529043755: do_socket: Sending extra Proxy-Authorization: sanitized len(577)
MainProcess: Thread_1: 1529043755: do_socket: Reading response code
MainProcess: Thread_1: 1529043755: do_socket: Response code: 200 True
MainProcess: Thread_1: 1529043755: do_socket: Reading response headers
MainProcess: Thread_1: 1529043755: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_1: 1529043755: do_socket: Reading response data
MainProcess: Thread_1: 1529043755: do_CONNECT: Tunneling through proxy
MainProcess: Thread_1: 1529043755: log_message: "CONNECT getcomposer.org:443 HTTP/1.1" 200 -
MainProcess: Thread_1: 1529043755: do_CONNECT: Transferred 200 bytes
MainProcess: Thread_1: 1529043755: do_CONNECT: Done
MainProcess: Thread_1: 1529043760: log_message: Request timed out: timeout('timed out',)

@genotrance
Copy link
Owner

@ihmels, I just tried https://getcomposer.org/installer with my proxy and it worked fine. I don't know what's wrong and it's not possible to tell since everything Px has done in these logs matches mine. Once wget is tunneling through the proxy, Px is only passing encrypted data back and forth and has no clue.

Can you try with curl or another SSL server for test purposes?

@genotrance
Copy link
Owner

This has been fixed in latest release posted. Please verify that it works as expected now.

@ihmels
Copy link
Author

ihmels commented Aug 29, 2018

Unfortunately for me the problem is not solved. I ran the following command in the Cygwin Terminal on the Windows 7 host.

$ wget https://www.google.com
--2018-08-29 11:30:45--  https://www.google.com/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:3129... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:3129... connected.
GnuTLS: The TLS connection was non-properly terminated.
Unable to establish SSL connection.

Log

Serving at :3129 proc Process-1
Process-1: MainThread: 1535535033: detach_console: Freed console successfully
Process-1: MainThread: 1535535034: print_banner: proxy:server = proxy01.example.test:8080
Process-1: MainThread: 1535535034: print_banner: proxy:listen = 
Process-1: MainThread: 1535535034: print_banner: proxy:port = 3129
Process-1: MainThread: 1535535034: print_banner: proxy:gateway = 1
Process-1: MainThread: 1535535034: print_banner: proxy:hostonly = 0
Process-1: MainThread: 1535535034: print_banner: proxy:allow = *.*.*.*
Process-1: MainThread: 1535535034: print_banner: proxy:noproxy = 
Process-1: MainThread: 1535535034: print_banner: proxy:useragent = 
Process-1: MainThread: 1535535034: print_banner: settings:workers = 2
Process-1: MainThread: 1535535034: print_banner: settings:threads = 5
Process-1: MainThread: 1535535034: print_banner: settings:idle = 30
Process-1: MainThread: 1535535034: print_banner: settings:socktimeout = 20.0
Process-1: MainThread: 1535535034: print_banner: settings:proxyreload = 60
Process-1: MainThread: 1535535034: print_banner: settings:foreground = 0
Process-1: MainThread: 1535535034: print_banner: settings:log = 1
Process-1: MainThread: 1535535046: verify_request: Client address: 127.0.0.1
Process-1: Thread_0: 1535535046: do_CONNECT: Entering
Process-1: Thread_0: 1535535046: do_transaction: Entering
Process-1: Thread_0: 1535535046: get_destination: www.google.com:443
Process-1: Thread_0: 1535535046: do_socket_connect: New connection: ('proxy01.example.test', 8080)
Process-1: Thread_0: 1535535046: do_proxy_type: Searching proxy type
Process-1: Thread_0: 1535535046: do_socket: Entering
Process-1: Thread_0: 1535535046: do_socket: CONNECT www.google.com:443 HTTP/1.1
Process-1: Thread_0: 1535535046: do_socket: Sending User-Agent: Wget/1.19.1 (cygwin)
Process-1: Thread_0: 1535535046: do_socket: Sending Host: www.google.com:443
Process-1: Thread_0: 1535535046: do_socket: Reading response code
Process-1: Thread_0: 1535535046: do_socket: Response code: 407 True
Process-1: Thread_0: 1535535046: do_socket: Reading response headers
Process-1: Thread_0: 1535535046: do_socket: Received Proxy-Authenticate: sanitized (9)
Process-1: Thread_0: 1535535046: do_socket: Received Proxy-Authenticate: sanitized (4)
Process-1: Thread_0: 1535535046: do_socket: Received Date: Wed, 29 Aug 2018 09:30:46 GMT
Process-1: Thread_0: 1535535046: do_socket: Received Cache-Control: no-cache
Process-1: Thread_0: 1535535046: do_socket: Received Pragma: no-cache
Process-1: Thread_0: 1535535046: do_socket: Received Content-Type: text/html; charset="UTF-8"
Process-1: Thread_0: 1535535046: do_socket: Received Content-Length: 2536
Process-1: Thread_0: 1535535046: do_socket: Received Accept-Ranges: none
Process-1: Thread_0: 1535535046: do_socket: Received Proxy-Connection: keep-alive
Process-1: Thread_0: 1535535046: do_proxy_type: Auth mechanisms: Negotiate NTLM 
Process-1: Thread_0: 1535535046: do_proxy_type: Selected: ('proxy01.example.test', 8080): NTLM
Process-1: Thread_0: 1535535046: get_response_sspi: pywin32 SSPI
Process-1: Thread_0: 1535535046: fwd_data: Reading response data
Process-1: Thread_0: 1535535046: fwd_data: Content length 2536
Process-1: Thread_0: 1535535046: do_socket: Entering
Process-1: Thread_0: 1535535046: do_socket: CONNECT www.google.com:443 HTTP/1.1
Process-1: Thread_0: 1535535046: do_socket: Sending User-Agent: Wget/1.19.1 (cygwin)
Process-1: Thread_0: 1535535046: do_socket: Sending Host: www.google.com:443
Process-1: Thread_0: 1535535046: do_socket: Sending extra Proxy-Authorization: sanitized len(85)
Process-1: Thread_0: 1535535046: do_socket: Reading response code
Process-1: Thread_0: 1535535046: do_socket: Response code: 407 True
Process-1: Thread_0: 1535535046: do_socket: Reading response headers
Process-1: Thread_0: 1535535046: do_socket: Received Proxy-Authenticate: sanitized (301)
Process-1: Thread_0: 1535535046: do_socket: Received Date: Wed, 29 Aug 2018 09:30:46 GMT
Process-1: Thread_0: 1535535046: do_socket: Received Cache-Control: no-cache
Process-1: Thread_0: 1535535046: do_socket: Received Pragma: no-cache
Process-1: Thread_0: 1535535046: do_socket: Received Content-Type: text/html; charset="UTF-8"
Process-1: Thread_0: 1535535046: do_socket: Received Content-Length: 2536
Process-1: Thread_0: 1535535046: do_socket: Received Accept-Ranges: none
Process-1: Thread_0: 1535535046: do_socket: Received Proxy-Connection: keep-alive
Process-1: Thread_0: 1535535046: do_transaction: Auth required
Process-1: Thread_0: 1535535046: do_transaction: Challenged
Process-1: Thread_0: 1535535046: get_response_sspi: pywin32 SSPI
Process-1: Thread_0: 1535535046: fwd_data: Reading response data
Process-1: Thread_0: 1535535046: fwd_data: Content length 2536
Process-1: Thread_0: 1535535046: do_socket: Entering
Process-1: Thread_0: 1535535046: do_socket: CONNECT www.google.com:443 HTTP/1.1
Process-1: Thread_0: 1535535046: do_socket: Sending User-Agent: Wget/1.19.1 (cygwin)
Process-1: Thread_0: 1535535046: do_socket: Sending Host: www.google.com:443
Process-1: Thread_0: 1535535046: do_socket: Sending extra Proxy-Authorization: sanitized len(577)
Process-1: Thread_0: 1535535046: do_socket: Reading response code
Process-1: Thread_0: 1535535046: do_socket: Response code: 200 False
Process-1: Thread_0: 1535535046: do_socket: Reading response headers
Process-1: Thread_0: 1535535046: do_socket: Received Proxy-Connection: keep-alive
Process-1: Thread_0: 1535535046: do_CONNECT: Tunneling through proxy
Process-1: Thread_0: 1535535046: log_message: "CONNECT www.google.com:443 HTTP/1.1" 200 -
Process-1: Thread_0: 1535535046: do_CONNECT: Connection closed by proxy
Process-1: Thread_0: 1535535046: do_CONNECT: Cleanup proxy connection
Process-1: Thread_0: 1535535046: do_CONNECT: 249 bytes read, 249 bytes written
Process-1: Thread_0: 1535535046: do_CONNECT: Done

Config: px.ini

[proxy]

; NTLM server(s) to connect through. IP:port, hostname:port
;   Multiple proxies can be specified comma separated. Px will iterate through
;   and use the one that works. Required field unless --noproxy is defined. If
;   remote server is not in noproxy list and proxy is undefined, Px will reject
;   the request
server = proxy01.exmaple.test:8080

; IP interface to listen on - default: 127.0.0.1
listen = 127.0.0.1

; Port to run this proxy on - default: 3128
port = 3129

; Allow remote machines to use this proxy
;   Overrides listen definition above and binds to all interfaces
gateway = 1

; Allow only local interfaces to use proxy. 0 or 1, default: 0
;   Px allows all IP addresses assigned to local interfaces to use the service.
;   This allows local apps as well as VM or container apps to use Px when in a
;   NAT config. Px does this by listening on all interfaces and overriding the
;   allow list.
hostonly = 0

; Allow connection from following subnets, comma separated - default: *.*.*.*
;   Whitelist which IPs can use the proxy. --hostonly overrides any definitions
;   unless --gateway mode is also specified
;   127.0.0.1 - specific ip
;   192.168.0.* - wildcards
;   192.168.0.1-192.168.0.255 - ranges
;   192.168.0.1/24 - CIDR
allow = *.*.*.*

; Direct connect to following subnets, comma separated
;   Skip the NTLM proxy and connect directly like a regular proxy
;   192.168.0.* - wildcards
;   192.168.0.1-192.168.0.255 - ranges
;   192.168.0.1/24 - CIDR
noproxy =

; Override or send User-Agent header on client's behalf
useragent =

[settings]

; Number of parallel workers (processes)
workers = 2

; Number of parallel threads per worker (process)
threads = 5

; Idle timeout in seconds for HTTP connect sessions before closing the connection
idle = 30

; Timeout in seconds for connections before giving up
socktimeout = 20.0

; Time interval in seconds before refreshing proxy info. Valid int, default: 60
;   Proxy info reloaded from a PAC file found via WPAD or AutoConfig URL, or
;   manual proxy info defined in Internet Options
proxyreload = 60

; Run in foreground when frozen or with pythonw.exe. 0 or 1, default: 0
;   Px will attach to the console and write to it even though the prompt is
;   available for further commands. CTRL-C in the console will exit Px
foreground = 0

; Enable logging
;   Logs are written to the same directory that Px is run and are over-written on startup
log = 1

@ihmels
Copy link
Author

ihmels commented Sep 4, 2018

If I'm running px as administrator, it does work sometimes and sometimes I ran into SSL errors.

@genotrance
Copy link
Owner

Per the logs, Px has authenticated the user and created a tunnel. Also, this code change was only for http, not https.

Can you check to see if all ssl sites fail or just Google? Also, can you try curl and a browser as well?

Could be an older version of wget or a tls version issue.

@ihmels
Copy link
Author

ihmels commented Sep 4, 2018

The following block shows the log after trying to run curl https://getcomposer.org/installer six times. The first five times I got the error:

curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to getcomposer.org:443

The sixth try was successful.

Serving at :3129 proc MainProcess
MainProcess: MainThread: 1536073642: detach_console: Freed console successfully
MainProcess: MainThread: 1536073642: print_banner: proxy:server = 192.168.1.241:8080
MainProcess: MainThread: 1536073642: print_banner: proxy:listen = 
MainProcess: MainThread: 1536073642: print_banner: proxy:port = 3129
MainProcess: MainThread: 1536073642: print_banner: proxy:gateway = 1
MainProcess: MainThread: 1536073642: print_banner: proxy:hostonly = 0
MainProcess: MainThread: 1536073642: print_banner: proxy:allow = *.*.*.*
MainProcess: MainThread: 1536073642: print_banner: proxy:noproxy = 192.168.0.0/16
MainProcess: MainThread: 1536073642: print_banner: proxy:useragent = 
MainProcess: MainThread: 1536073642: print_banner: settings:workers = 1
MainProcess: MainThread: 1536073642: print_banner: settings:threads = 1
MainProcess: MainThread: 1536073642: print_banner: settings:idle = 30
MainProcess: MainThread: 1536073642: print_banner: settings:socktimeout = 20.0
MainProcess: MainThread: 1536073642: print_banner: settings:proxyreload = 60
MainProcess: MainThread: 1536073642: print_banner: settings:foreground = 0
MainProcess: MainThread: 1536073642: print_banner: settings:log = 1
MainProcess: MainThread: 1536073655: verify_request: Client address: 127.0.0.1
MainProcess: Thread_0: 1536073655: do_CONNECT: Entering
MainProcess: Thread_0: 1536073655: do_transaction: Entering
MainProcess: Thread_0: 1536073655: get_destination: getcomposer.org:443
MainProcess: Thread_0: 1536073655: get_destination: getcomposer.org:443 => ('54.36.53.46', 443) + /
MainProcess: Thread_0: 1536073655: do_socket_connect: New connection: ('192.168.1.241', 8080)
MainProcess: Thread_0: 1536073655: do_proxy_type: Searching proxy type
MainProcess: Thread_0: 1536073655: do_socket: Entering
MainProcess: Thread_0: 1536073655: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_0: 1536073655: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_0: 1536073655: do_socket: Sending User-Agent: curl/7.59.0
MainProcess: Thread_0: 1536073655: do_socket: Sending Proxy-Connection: Keep-Alive
MainProcess: Thread_0: 1536073655: do_socket: Reading response code
MainProcess: Thread_0: 1536073655: do_socket: Response code: 407 True
MainProcess: Thread_0: 1536073655: do_socket: Reading response headers
MainProcess: Thread_0: 1536073655: do_socket: Received Proxy-Authenticate: sanitized (9)
MainProcess: Thread_0: 1536073655: do_socket: Received Proxy-Authenticate: sanitized (4)
MainProcess: Thread_0: 1536073655: do_socket: Received Date: Tue, 04 Sep 2018 15:07:34 GMT
MainProcess: Thread_0: 1536073655: do_socket: Received Cache-Control: no-cache
MainProcess: Thread_0: 1536073655: do_socket: Received Pragma: no-cache
MainProcess: Thread_0: 1536073655: do_socket: Received Content-Type: text/html; charset="UTF-8"
MainProcess: Thread_0: 1536073655: do_socket: Received Content-Length: 2536
MainProcess: Thread_0: 1536073655: do_socket: Received Accept-Ranges: none
MainProcess: Thread_0: 1536073655: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1536073655: do_proxy_type: Auth mechanisms: Negotiate NTLM 
MainProcess: Thread_0: 1536073655: do_proxy_type: Selected: ('192.168.1.241', 8080): NTLM
MainProcess: Thread_0: 1536073655: get_response_sspi: pywin32 SSPI
MainProcess: Thread_0: 1536073655: fwd_data: Reading response data
MainProcess: Thread_0: 1536073655: fwd_data: Content length 2536
MainProcess: Thread_0: 1536073655: do_socket: Entering
MainProcess: Thread_0: 1536073655: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_0: 1536073655: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_0: 1536073655: do_socket: Sending User-Agent: curl/7.59.0
MainProcess: Thread_0: 1536073655: do_socket: Sending Proxy-Connection: Keep-Alive
MainProcess: Thread_0: 1536073655: do_socket: Sending extra Proxy-Authorization: sanitized len(85)
MainProcess: Thread_0: 1536073655: do_socket: Reading response code
MainProcess: Thread_0: 1536073655: do_socket: Response code: 407 True
MainProcess: Thread_0: 1536073655: do_socket: Reading response headers
MainProcess: Thread_0: 1536073655: do_socket: Received Proxy-Authenticate: sanitized (301)
MainProcess: Thread_0: 1536073655: do_socket: Received Date: Tue, 04 Sep 2018 15:07:35 GMT
MainProcess: Thread_0: 1536073655: do_socket: Received Cache-Control: no-cache
MainProcess: Thread_0: 1536073655: do_socket: Received Pragma: no-cache
MainProcess: Thread_0: 1536073655: do_socket: Received Content-Type: text/html; charset="UTF-8"
MainProcess: Thread_0: 1536073655: do_socket: Received Content-Length: 2536
MainProcess: Thread_0: 1536073655: do_socket: Received Accept-Ranges: none
MainProcess: Thread_0: 1536073655: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1536073655: do_transaction: Auth required
MainProcess: Thread_0: 1536073655: do_transaction: Challenged
MainProcess: Thread_0: 1536073655: get_response_sspi: pywin32 SSPI
MainProcess: Thread_0: 1536073655: fwd_data: Reading response data
MainProcess: Thread_0: 1536073655: fwd_data: Content length 2536
MainProcess: Thread_0: 1536073655: do_socket: Entering
MainProcess: Thread_0: 1536073655: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_0: 1536073655: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_0: 1536073655: do_socket: Sending User-Agent: curl/7.59.0
MainProcess: Thread_0: 1536073655: do_socket: Sending Proxy-Connection: Keep-Alive
MainProcess: Thread_0: 1536073655: do_socket: Sending extra Proxy-Authorization: sanitized len(577)
MainProcess: Thread_0: 1536073655: do_socket: Reading response code
MainProcess: Thread_0: 1536073655: do_socket: Response code: 200 False
MainProcess: Thread_0: 1536073655: do_socket: Reading response headers
MainProcess: Thread_0: 1536073655: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1536073655: do_CONNECT: Tunneling through proxy
MainProcess: Thread_0: 1536073655: log_message: "CONNECT getcomposer.org:443 HTTP/1.1" 200 -
MainProcess: Thread_0: 1536073655: do_CONNECT: Connection closed by proxy
MainProcess: Thread_0: 1536073655: do_CONNECT: Cleanup proxy connection
MainProcess: Thread_0: 1536073655: do_CONNECT: 517 bytes read, 517 bytes written
MainProcess: Thread_0: 1536073655: do_CONNECT: Done
MainProcess: MainThread: 1536073656: verify_request: Client address: 127.0.0.1
MainProcess: Thread_0: 1536073656: do_CONNECT: Entering
MainProcess: Thread_0: 1536073656: do_transaction: Entering
MainProcess: Thread_0: 1536073656: get_destination: getcomposer.org:443
MainProcess: Thread_0: 1536073656: get_destination: getcomposer.org:443 => ('54.36.53.46', 443) + /
MainProcess: Thread_0: 1536073656: do_socket_connect: New connection: ('192.168.1.241', 8080)
MainProcess: Thread_0: 1536073656: get_response_sspi: pywin32 SSPI
MainProcess: Thread_0: 1536073656: fwd_data: Reading response data
MainProcess: Thread_0: 1536073656: do_socket: Entering
MainProcess: Thread_0: 1536073656: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_0: 1536073656: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_0: 1536073656: do_socket: Sending User-Agent: curl/7.59.0
MainProcess: Thread_0: 1536073656: do_socket: Sending Proxy-Connection: Keep-Alive
MainProcess: Thread_0: 1536073656: do_socket: Sending extra Proxy-Authorization: sanitized len(85)
MainProcess: Thread_0: 1536073656: do_socket: Reading response code
MainProcess: Thread_0: 1536073656: do_socket: Response code: 407 True
MainProcess: Thread_0: 1536073656: do_socket: Reading response headers
MainProcess: Thread_0: 1536073656: do_socket: Received Proxy-Authenticate: sanitized (301)
MainProcess: Thread_0: 1536073656: do_socket: Received Date: Tue, 04 Sep 2018 15:07:36 GMT
MainProcess: Thread_0: 1536073656: do_socket: Received Cache-Control: no-cache
MainProcess: Thread_0: 1536073656: do_socket: Received Pragma: no-cache
MainProcess: Thread_0: 1536073656: do_socket: Received Content-Type: text/html; charset="UTF-8"
MainProcess: Thread_0: 1536073656: do_socket: Received Content-Length: 2536
MainProcess: Thread_0: 1536073656: do_socket: Received Accept-Ranges: none
MainProcess: Thread_0: 1536073656: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1536073656: do_transaction: Auth required
MainProcess: Thread_0: 1536073656: do_transaction: Challenged
MainProcess: Thread_0: 1536073656: get_response_sspi: pywin32 SSPI
MainProcess: Thread_0: 1536073656: fwd_data: Reading response data
MainProcess: Thread_0: 1536073656: fwd_data: Content length 2536
MainProcess: Thread_0: 1536073656: do_socket: Entering
MainProcess: Thread_0: 1536073657: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_0: 1536073657: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_0: 1536073657: do_socket: Sending User-Agent: curl/7.59.0
MainProcess: Thread_0: 1536073657: do_socket: Sending Proxy-Connection: Keep-Alive
MainProcess: Thread_0: 1536073657: do_socket: Sending extra Proxy-Authorization: sanitized len(577)
MainProcess: Thread_0: 1536073657: do_socket: Reading response code
MainProcess: Thread_0: 1536073657: do_socket: Response code: 200 False
MainProcess: Thread_0: 1536073657: do_socket: Reading response headers
MainProcess: Thread_0: 1536073657: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1536073657: do_CONNECT: Tunneling through proxy
MainProcess: Thread_0: 1536073657: log_message: "CONNECT getcomposer.org:443 HTTP/1.1" 200 -
MainProcess: Thread_0: 1536073657: do_CONNECT: Connection closed by proxy
MainProcess: Thread_0: 1536073657: do_CONNECT: Cleanup proxy connection
MainProcess: Thread_0: 1536073657: do_CONNECT: 517 bytes read, 517 bytes written
MainProcess: Thread_0: 1536073657: do_CONNECT: Done
MainProcess: MainThread: 1536073658: verify_request: Client address: 127.0.0.1
MainProcess: Thread_0: 1536073658: do_CONNECT: Entering
MainProcess: Thread_0: 1536073658: do_transaction: Entering
MainProcess: Thread_0: 1536073658: get_destination: getcomposer.org:443
MainProcess: Thread_0: 1536073658: get_destination: getcomposer.org:443 => ('54.36.53.46', 443) + /
MainProcess: Thread_0: 1536073658: do_socket_connect: New connection: ('192.168.1.241', 8080)
MainProcess: Thread_0: 1536073658: get_response_sspi: pywin32 SSPI
MainProcess: Thread_0: 1536073658: fwd_data: Reading response data
MainProcess: Thread_0: 1536073658: do_socket: Entering
MainProcess: Thread_0: 1536073658: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_0: 1536073658: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_0: 1536073658: do_socket: Sending User-Agent: curl/7.59.0
MainProcess: Thread_0: 1536073658: do_socket: Sending Proxy-Connection: Keep-Alive
MainProcess: Thread_0: 1536073658: do_socket: Sending extra Proxy-Authorization: sanitized len(85)
MainProcess: Thread_0: 1536073658: do_socket: Reading response code
MainProcess: Thread_0: 1536073658: do_socket: Response code: 407 True
MainProcess: Thread_0: 1536073658: do_socket: Reading response headers
MainProcess: Thread_0: 1536073658: do_socket: Received Proxy-Authenticate: sanitized (301)
MainProcess: Thread_0: 1536073658: do_socket: Received Date: Tue, 04 Sep 2018 15:07:38 GMT
MainProcess: Thread_0: 1536073658: do_socket: Received Cache-Control: no-cache
MainProcess: Thread_0: 1536073658: do_socket: Received Pragma: no-cache
MainProcess: Thread_0: 1536073658: do_socket: Received Content-Type: text/html; charset="UTF-8"
MainProcess: Thread_0: 1536073658: do_socket: Received Content-Length: 2536
MainProcess: Thread_0: 1536073658: do_socket: Received Accept-Ranges: none
MainProcess: Thread_0: 1536073658: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1536073658: do_transaction: Auth required
MainProcess: Thread_0: 1536073658: do_transaction: Challenged
MainProcess: Thread_0: 1536073658: get_response_sspi: pywin32 SSPI
MainProcess: Thread_0: 1536073658: fwd_data: Reading response data
MainProcess: Thread_0: 1536073658: fwd_data: Content length 2536
MainProcess: Thread_0: 1536073658: do_socket: Entering
MainProcess: Thread_0: 1536073658: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_0: 1536073658: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_0: 1536073658: do_socket: Sending User-Agent: curl/7.59.0
MainProcess: Thread_0: 1536073658: do_socket: Sending Proxy-Connection: Keep-Alive
MainProcess: Thread_0: 1536073658: do_socket: Sending extra Proxy-Authorization: sanitized len(577)
MainProcess: Thread_0: 1536073658: do_socket: Reading response code
MainProcess: Thread_0: 1536073658: do_socket: Response code: 200 False
MainProcess: Thread_0: 1536073658: do_socket: Reading response headers
MainProcess: Thread_0: 1536073658: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1536073658: do_CONNECT: Tunneling through proxy
MainProcess: Thread_0: 1536073658: log_message: "CONNECT getcomposer.org:443 HTTP/1.1" 200 -
MainProcess: Thread_0: 1536073658: do_CONNECT: Connection closed by proxy
MainProcess: Thread_0: 1536073658: do_CONNECT: Cleanup proxy connection
MainProcess: Thread_0: 1536073658: do_CONNECT: 517 bytes read, 517 bytes written
MainProcess: Thread_0: 1536073658: do_CONNECT: Done
MainProcess: MainThread: 1536073659: verify_request: Client address: 127.0.0.1
MainProcess: Thread_0: 1536073659: do_CONNECT: Entering
MainProcess: Thread_0: 1536073659: do_transaction: Entering
MainProcess: Thread_0: 1536073659: get_destination: getcomposer.org:443
MainProcess: Thread_0: 1536073659: get_destination: getcomposer.org:443 => ('54.36.53.46', 443) + /
MainProcess: Thread_0: 1536073659: do_socket_connect: New connection: ('192.168.1.241', 8080)
MainProcess: Thread_0: 1536073659: get_response_sspi: pywin32 SSPI
MainProcess: Thread_0: 1536073659: fwd_data: Reading response data
MainProcess: Thread_0: 1536073659: do_socket: Entering
MainProcess: Thread_0: 1536073659: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_0: 1536073659: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_0: 1536073659: do_socket: Sending User-Agent: curl/7.59.0
MainProcess: Thread_0: 1536073659: do_socket: Sending Proxy-Connection: Keep-Alive
MainProcess: Thread_0: 1536073659: do_socket: Sending extra Proxy-Authorization: sanitized len(85)
MainProcess: Thread_0: 1536073659: do_socket: Reading response code
MainProcess: Thread_0: 1536073659: do_socket: Response code: 407 True
MainProcess: Thread_0: 1536073659: do_socket: Reading response headers
MainProcess: Thread_0: 1536073659: do_socket: Received Proxy-Authenticate: sanitized (301)
MainProcess: Thread_0: 1536073659: do_socket: Received Date: Tue, 04 Sep 2018 15:07:39 GMT
MainProcess: Thread_0: 1536073659: do_socket: Received Cache-Control: no-cache
MainProcess: Thread_0: 1536073659: do_socket: Received Pragma: no-cache
MainProcess: Thread_0: 1536073659: do_socket: Received Content-Type: text/html; charset="UTF-8"
MainProcess: Thread_0: 1536073659: do_socket: Received Content-Length: 2536
MainProcess: Thread_0: 1536073659: do_socket: Received Accept-Ranges: none
MainProcess: Thread_0: 1536073659: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1536073659: do_transaction: Auth required
MainProcess: Thread_0: 1536073659: do_transaction: Challenged
MainProcess: Thread_0: 1536073659: get_response_sspi: pywin32 SSPI
MainProcess: Thread_0: 1536073659: fwd_data: Reading response data
MainProcess: Thread_0: 1536073659: fwd_data: Content length 2536
MainProcess: Thread_0: 1536073659: do_socket: Entering
MainProcess: Thread_0: 1536073659: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_0: 1536073659: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_0: 1536073659: do_socket: Sending User-Agent: curl/7.59.0
MainProcess: Thread_0: 1536073659: do_socket: Sending Proxy-Connection: Keep-Alive
MainProcess: Thread_0: 1536073659: do_socket: Sending extra Proxy-Authorization: sanitized len(577)
MainProcess: Thread_0: 1536073659: do_socket: Reading response code
MainProcess: Thread_0: 1536073659: do_socket: Response code: 200 False
MainProcess: Thread_0: 1536073659: do_socket: Reading response headers
MainProcess: Thread_0: 1536073659: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1536073659: do_CONNECT: Tunneling through proxy
MainProcess: Thread_0: 1536073659: log_message: "CONNECT getcomposer.org:443 HTTP/1.1" 200 -
MainProcess: Thread_0: 1536073659: do_CONNECT: Connection closed by proxy
MainProcess: Thread_0: 1536073659: do_CONNECT: Cleanup proxy connection
MainProcess: Thread_0: 1536073659: do_CONNECT: 517 bytes read, 517 bytes written
MainProcess: Thread_0: 1536073659: do_CONNECT: Done
MainProcess: MainThread: 1536073660: verify_request: Client address: 127.0.0.1
MainProcess: Thread_0: 1536073660: do_CONNECT: Entering
MainProcess: Thread_0: 1536073660: do_transaction: Entering
MainProcess: Thread_0: 1536073660: get_destination: getcomposer.org:443
MainProcess: Thread_0: 1536073660: get_destination: getcomposer.org:443 => ('54.36.53.46', 443) + /
MainProcess: Thread_0: 1536073660: do_socket_connect: New connection: ('192.168.1.241', 8080)
MainProcess: Thread_0: 1536073660: get_response_sspi: pywin32 SSPI
MainProcess: Thread_0: 1536073660: fwd_data: Reading response data
MainProcess: Thread_0: 1536073660: do_socket: Entering
MainProcess: Thread_0: 1536073660: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_0: 1536073660: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_0: 1536073660: do_socket: Sending User-Agent: curl/7.59.0
MainProcess: Thread_0: 1536073660: do_socket: Sending Proxy-Connection: Keep-Alive
MainProcess: Thread_0: 1536073660: do_socket: Sending extra Proxy-Authorization: sanitized len(85)
MainProcess: Thread_0: 1536073660: do_socket: Reading response code
MainProcess: Thread_0: 1536073660: do_socket: Response code: 407 True
MainProcess: Thread_0: 1536073660: do_socket: Reading response headers
MainProcess: Thread_0: 1536073660: do_socket: Received Proxy-Authenticate: sanitized (301)
MainProcess: Thread_0: 1536073660: do_socket: Received Date: Tue, 04 Sep 2018 15:07:40 GMT
MainProcess: Thread_0: 1536073660: do_socket: Received Cache-Control: no-cache
MainProcess: Thread_0: 1536073660: do_socket: Received Pragma: no-cache
MainProcess: Thread_0: 1536073660: do_socket: Received Content-Type: text/html; charset="UTF-8"
MainProcess: Thread_0: 1536073660: do_socket: Received Content-Length: 2536
MainProcess: Thread_0: 1536073660: do_socket: Received Accept-Ranges: none
MainProcess: Thread_0: 1536073660: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1536073660: do_transaction: Auth required
MainProcess: Thread_0: 1536073660: do_transaction: Challenged
MainProcess: Thread_0: 1536073660: get_response_sspi: pywin32 SSPI
MainProcess: Thread_0: 1536073660: fwd_data: Reading response data
MainProcess: Thread_0: 1536073660: fwd_data: Content length 2536
MainProcess: Thread_0: 1536073660: do_socket: Entering
MainProcess: Thread_0: 1536073660: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_0: 1536073660: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_0: 1536073660: do_socket: Sending User-Agent: curl/7.59.0
MainProcess: Thread_0: 1536073660: do_socket: Sending Proxy-Connection: Keep-Alive
MainProcess: Thread_0: 1536073660: do_socket: Sending extra Proxy-Authorization: sanitized len(577)
MainProcess: Thread_0: 1536073660: do_socket: Reading response code
MainProcess: Thread_0: 1536073660: do_socket: Response code: 200 False
MainProcess: Thread_0: 1536073660: do_socket: Reading response headers
MainProcess: Thread_0: 1536073660: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1536073660: do_CONNECT: Tunneling through proxy
MainProcess: Thread_0: 1536073660: log_message: "CONNECT getcomposer.org:443 HTTP/1.1" 200 -
MainProcess: Thread_0: 1536073660: do_CONNECT: Connection closed by proxy
MainProcess: Thread_0: 1536073660: do_CONNECT: Cleanup proxy connection
MainProcess: Thread_0: 1536073660: do_CONNECT: 517 bytes read, 517 bytes written
MainProcess: Thread_0: 1536073660: do_CONNECT: Done
MainProcess: MainThread: 1536073661: verify_request: Client address: 127.0.0.1
MainProcess: Thread_0: 1536073661: do_CONNECT: Entering
MainProcess: Thread_0: 1536073661: do_transaction: Entering
MainProcess: Thread_0: 1536073661: get_destination: getcomposer.org:443
MainProcess: Thread_0: 1536073661: get_destination: getcomposer.org:443 => ('54.36.53.46', 443) + /
MainProcess: Thread_0: 1536073661: do_socket_connect: New connection: ('192.168.1.241', 8080)
MainProcess: Thread_0: 1536073661: get_response_sspi: pywin32 SSPI
MainProcess: Thread_0: 1536073661: fwd_data: Reading response data
MainProcess: Thread_0: 1536073661: do_socket: Entering
MainProcess: Thread_0: 1536073661: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_0: 1536073661: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_0: 1536073661: do_socket: Sending User-Agent: curl/7.59.0
MainProcess: Thread_0: 1536073661: do_socket: Sending Proxy-Connection: Keep-Alive
MainProcess: Thread_0: 1536073661: do_socket: Sending extra Proxy-Authorization: sanitized len(85)
MainProcess: Thread_0: 1536073661: do_socket: Reading response code
MainProcess: Thread_0: 1536073661: do_socket: Response code: 407 True
MainProcess: Thread_0: 1536073661: do_socket: Reading response headers
MainProcess: Thread_0: 1536073661: do_socket: Received Proxy-Authenticate: sanitized (301)
MainProcess: Thread_0: 1536073661: do_socket: Received Date: Tue, 04 Sep 2018 15:07:41 GMT
MainProcess: Thread_0: 1536073661: do_socket: Received Cache-Control: no-cache
MainProcess: Thread_0: 1536073661: do_socket: Received Pragma: no-cache
MainProcess: Thread_0: 1536073661: do_socket: Received Content-Type: text/html; charset="UTF-8"
MainProcess: Thread_0: 1536073661: do_socket: Received Content-Length: 2536
MainProcess: Thread_0: 1536073661: do_socket: Received Accept-Ranges: none
MainProcess: Thread_0: 1536073661: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1536073661: do_transaction: Auth required
MainProcess: Thread_0: 1536073661: do_transaction: Challenged
MainProcess: Thread_0: 1536073661: get_response_sspi: pywin32 SSPI
MainProcess: Thread_0: 1536073661: fwd_data: Reading response data
MainProcess: Thread_0: 1536073661: fwd_data: Content length 2536
MainProcess: Thread_0: 1536073661: do_socket: Entering
MainProcess: Thread_0: 1536073661: do_socket: CONNECT getcomposer.org:443 HTTP/1.1
MainProcess: Thread_0: 1536073661: do_socket: Sending Host: getcomposer.org:443
MainProcess: Thread_0: 1536073661: do_socket: Sending User-Agent: curl/7.59.0
MainProcess: Thread_0: 1536073661: do_socket: Sending Proxy-Connection: Keep-Alive
MainProcess: Thread_0: 1536073661: do_socket: Sending extra Proxy-Authorization: sanitized len(577)
MainProcess: Thread_0: 1536073661: do_socket: Reading response code
MainProcess: Thread_0: 1536073661: do_socket: Response code: 200 False
MainProcess: Thread_0: 1536073661: do_socket: Reading response headers
MainProcess: Thread_0: 1536073661: do_socket: Received Proxy-Connection: keep-alive
MainProcess: Thread_0: 1536073661: do_CONNECT: Tunneling through proxy
MainProcess: Thread_0: 1536073661: log_message: "CONNECT getcomposer.org:443 HTTP/1.1" 200 -
MainProcess: Thread_0: 1536073661: do_CONNECT: Connection closed by client
MainProcess: Thread_0: 1536073661: do_CONNECT: Cleanup proxy connection
MainProcess: Thread_0: 1536073661: do_CONNECT: 310098 bytes read, 310098 bytes written
MainProcess: Thread_0: 1536073661: do_CONNECT: Done

@genotrance
Copy link
Owner

I tried both curl and wget and both worked with my proxy. Am unsure what's going on here. My versions are from MSYS and as follows:-

curl: 7.61.0 with OpenSSL 1.0.2c
wget: 1.19.4 (not sure what version of OpenSSL)

I also tried the latest version of curl linked with OpenSSL 1.1.0i and that worked too.

What are your versions?

Also, are you running the Px executable version posted or running with your own version of Python? If from source, can you try with the executable? Doubt this will make any difference since Px does nothing related to SSL.

curl/curl#2294 suggests that --ciphers DEFAULT might help. Like I said, I was unable to reproduce this failure so unsure if this will help you.

@ihmels
Copy link
Author

ihmels commented Sep 5, 2018

I'm running the executable. My versions are:

curl: curl 7.59.0 with OpenSSL/1.0.2p
wget: 1.19.1

@ihmels ihmels closed this as completed May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants