{"action":"opened","number":305,"pull_request":{"url":"https://api.github.com/repos/bagder/curl/pulls/305","id":37272794,"html_url":"https://github.com/bagder/curl/pull/305","diff_url":"https://github.com/bagder/curl/pull/305.diff","patch_url":"https://github.com/bagder/curl/pull/305.patch","issue_url":"https://api.github.com/repos/bagder/curl/issues/305","number":305,"state":"open","locked":false,"title":"Support HTTPS proxy (--proxy https://). Support SOCKS+HTTP* proxy combo.","user":{"login":"rousskov","id":1084944,"avatar_url":"https://avatars.githubusercontent.com/u/1084944?v=3","gravatar_id":"","url":"https://api.github.com/users/rousskov","html_url":"https://github.com/rousskov","followers_url":"https://api.github.com/users/rousskov/followers","following_url":"https://api.github.com/users/rousskov/following{/other_user}","gists_url":"https://api.github.com/users/rousskov/gists{/gist_id}","starred_url":"https://api.github.com/users/rousskov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rousskov/subscriptions","organizations_url":"https://api.github.com/users/rousskov/orgs","repos_url":"https://api.github.com/users/rousskov/repos","events_url":"https://api.github.com/users/rousskov/events{/privacy}","received_events_url":"https://api.github.com/users/rousskov/received_events","type":"User","site_admin":false},"body":"This feature was developed in 2013. Despite the death of one of the primary developers, we kept the code in sync with the official Curl releases, but failed to find the cycles for the official submission until now. The first sections below describe the two major parts of the new code (in a format suitable for a commit message) followed by usage examples and a to-do list.\r\n\r\n### 1. HTTPS proxies:\r\n\r\n```\r\nAn HTTPS proxy receives all transactions over an SSL/TLS connection.\r\nOnce a secure connection with the proxy is established, the user agent\r\nuses the proxy as usual, including sending CONNECT requests to instruct\r\nthe proxy to establish a [usually secure] TCP tunnel with an origin\r\nserver. HTTPS proxies protect nearly all aspects of user-proxy\r\ncommunications as opposed to HTTP proxies that receive all requests\r\n(including CONNECT requests) in vulnerable clear text.\r\n\r\nWith HTTPS proxies, it is possible to have two concurrent _nested_\r\nSSL/TLS sessions: the \"outer\" one between the user agent and the proxy\r\nand the \"inner\" one between the user agent and the origin server\r\n(through the proxy). This change adds supports for such nested sessions\r\nas well.\r\n\r\nA secure connection with a proxy requires its own set of the usual SSL\r\noptions (their actual descriptions differ and need polishing, see TODO):\r\n\r\n  --proxy-cacert FILE        CA certificate to verify peer against\r\n  --proxy-capath DIR         CA directory to verify peer against\r\n  --proxy-cert CERT[:PASSWD] Client certificate file and password\r\n  --proxy-cert-type TYPE     Certificate file type (DER/PEM/ENG)\r\n  --proxy-ciphers LIST       SSL ciphers to use\r\n  --proxy-crlfile FILE       Get a CRL list in PEM format from the file\r\n  --proxy-insecure           Allow connections to proxies with bad certs\r\n  --proxy-key KEY            Private key file name\r\n  --proxy-key-type TYPE      Private key file type (DER/PEM/ENG)\r\n  --proxy-pass PASS          Pass phrase for the private key\r\n  --proxy-ssl-allow-beast    Allow security flaw to improve interop\r\n  --proxy-sslv2              Use SSLv2\r\n  --proxy-sslv3              Use SSLv3\r\n  --proxy-tlsv1              Use TLSv1\r\n  --proxy-tlsuser USER       TLS username\r\n  --proxy-tlspassword STRING TLS password\r\n  --proxy-tlsauthtype STRING TLS authentication type (default SRP)\r\n\r\nAll --proxy-foo options are independent from their --foo counterparts,\r\nexcept --proxy-crlfile which defaults to --crlfile and --proxy-capath\r\nwhich defaults to --capath.\r\n\r\nCurl now also supports %{proxy_ssl_verify_result} --write-out variable,\r\nsimilar to the existing %{ssl_verify_result} variable.\r\n```\r\n\r\n### 2. SOCKS proxy + HTTP/HTTPS proxy combination:\r\n\r\n```\r\nIf both --socks* and --proxy options are given, Curl first connects to\r\nthe SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS\r\nproxy.\r\n```\r\n\r\n### 3. Copyright statement:\r\n\r\nCopyright (C) 2015 The Measurement Factory, Inc.\r\nDistributed under the terms of the Curl project itself.\r\nAuthors: Dmitry Kurochkin, Vasy Okhin, and Alex Rousskov.\r\n\r\n### 4. Usage examples:\r\n\r\n```\r\nproxy='--proxy https://localhost:3129/'\r\nca='--proxy-cacert ssl_cert/myCA.pem'\r\ncurl $ca $proxy http://www.example.com\r\ncurl $ca $proxy https://www.example.com\r\ncurl $ca $proxy --proxytunnel https://www.example.com\r\n\r\nsocks='--socks5 127.0.0.1:1080'\r\ncurl $ca $proxy --proxytunnel $socks http://www.example.com\r\ncurl $ca $proxy --proxytunnel $socks https://www.example.com\r\n\r\ncurl --insecure --proxytunnel $ca $socks $proxy \\\r\n\tftps://user:pass@127.0.0.1/example.txt\r\n\r\ncurl --insecure --proxytunnel $ca $socks $proxy \\\r\n    --ftp-ssl ftp://user:pass@127.0.0.1/example.txt\r\n\r\nformat='OR=%{ssl_verify_result},PR=%{proxy_ssl_verify_result}\\n\\n';\r\ncurl --proxy-insecure -w $format $proxy https://www.example.com\r\n```\r\n\r\n### 5. TODO:\r\n\r\n1. Change `--proxy-foo` option descriptions. The current approach of appending \"for proxy\" to the original `--foo` description does not work well in most cases.\r\n1. Add `--proxy-foo` options to mimic `--tlsv1.0`, `--tlsv1.1`, and `--tlsv1.2` added to Curl v7.42, after the active work on this feature has stopped.\r\n1. Finalize version-related `TBD` symbols.\r\n1. Man page updates.\r\n\r\nThe code passes `make check` tests except test cases that sometimes fail on \"slow\" boxes (165, 323, and 1900-1903) and the check-easy test case (missing `CURLOPT_PIPEWAIT`). The same test cases fail in virgin master.\r\n\r\nPlease note that SSL-inside-SSL does not work with OpenSSL versions ranging from 0.9.7a to 1.0.0-beta2, inclusively, due to an OpenSSL bug.\r\n\r\nThe code has seen more than a year of light use in a few different environments.\r\n\r\n\r\nWe will do our best to address your change requests, but we do _not_ consider ourselves Curl experts, and are looking forward to finally leaving this code in more capable hands :-). Thank you for Curl!","created_at":"2015-06-09T16:30:15Z","updated_at":"2015-06-09T16:30:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bagder/curl/pulls/305/commits","review_comments_url":"https://api.github.com/repos/bagder/curl/pulls/305/comments","review_comment_url":"https://api.github.com/repos/bagder/curl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bagder/curl/issues/305/comments","statuses_url":"https://api.github.com/repos/bagder/curl/statuses/1307cf846796b187ef6566bb2853ab29966bc284","head":{"label":"measurement-factory:https_proxy_master","ref":"https_proxy_master","sha":"1307cf846796b187ef6566bb2853ab29966bc284","user":{"login":"measurement-factory","id":5461029,"avatar_url":"https://avatars.githubusercontent.com/u/5461029?v=3","gravatar_id":"","url":"https://api.github.com/users/measurement-factory","html_url":"https://github.com/measurement-factory","followers_url":"https://api.github.com/users/measurement-factory/followers","following_url":"https://api.github.com/users/measurement-factory/following{/other_user}","gists_url":"https://api.github.com/users/measurement-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/measurement-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/measurement-factory/subscriptions","organizations_url":"https://api.github.com/users/measurement-factory/orgs","repos_url":"https://api.github.com/users/measurement-factory/repos","events_url":"https://api.github.com/users/measurement-factory/events{/privacy}","received_events_url":"https://api.github.com/users/measurement-factory/received_events","type":"Organization","site_admin":false},"repo":{"id":35106664,"name":"curl","full_name":"measurement-factory/curl","owner":{"login":"measurement-factory","id":5461029,"avatar_url":"https://avatars.githubusercontent.com/u/5461029?v=3","gravatar_id":"","url":"https://api.github.com/users/measurement-factory","html_url":"https://github.com/measurement-factory","followers_url":"https://api.github.com/users/measurement-factory/followers","following_url":"https://api.github.com/users/measurement-factory/following{/other_user}","gists_url":"https://api.github.com/users/measurement-factory/gists{/gist_id}","starred_url":"https://api.github.com/users/measurement-factory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/measurement-factory/subscriptions","organizations_url":"https://api.github.com/users/measurement-factory/orgs","repos_url":"https://api.github.com/users/measurement-factory/repos","events_url":"https://api.github.com/users/measurement-factory/events{/privacy}","received_events_url":"https://api.github.com/users/measurement-factory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/measurement-factory/curl","description":"Curl is a tool and libcurl is a library for transferring data with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TFTP, SCP, SFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, SMTP, POP3, RTSP and RTMP. libcurl offers a myriad of powerful features","fork":true,"url":"https://api.github.com/repos/measurement-factory/curl","forks_url":"https://api.github.com/repos/measurement-factory/curl/forks","keys_url":"https://api.github.com/repos/measurement-factory/curl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/measurement-factory/curl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/measurement-factory/curl/teams","hooks_url":"https://api.github.com/repos/measurement-factory/curl/hooks","issue_events_url":"https://api.github.com/repos/measurement-factory/curl/issues/events{/number}","events_url":"https://api.github.com/repos/measurement-factory/curl/events","assignees_url":"https://api.github.com/repos/measurement-factory/curl/assignees{/user}","branches_url":"https://api.github.com/repos/measurement-factory/curl/branches{/branch}","tags_url":"https://api.github.com/repos/measurement-factory/curl/tags","blobs_url":"https://api.github.com/repos/measurement-factory/curl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/measurement-factory/curl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/measurement-factory/curl/git/refs{/sha}","trees_url":"https://api.github.com/repos/measurement-factory/curl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/measurement-factory/curl/statuses/{sha}","languages_url":"https://api.github.com/repos/measurement-factory/curl/languages","stargazers_url":"https://api.github.com/repos/measurement-factory/curl/stargazers","contributors_url":"https://api.github.com/repos/measurement-factory/curl/contributors","subscribers_url":"https://api.github.com/repos/measurement-factory/curl/subscribers","subscription_url":"https://api.github.com/repos/measurement-factory/curl/subscription","commits_url":"https://api.github.com/repos/measurement-factory/curl/commits{/sha}","git_commits_url":"https://api.github.com/repos/measurement-factory/curl/git/commits{/sha}","comments_url":"https://api.github.com/repos/measurement-factory/curl/comments{/number}","issue_comment_url":"https://api.github.com/repos/measurement-factory/curl/issues/comments{/number}","contents_url":"https://api.github.com/repos/measurement-factory/curl/contents/{+path}","compare_url":"https://api.github.com/repos/measurement-factory/curl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/measurement-factory/curl/merges","archive_url":"https://api.github.com/repos/measurement-factory/curl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/measurement-factory/curl/downloads","issues_url":"https://api.github.com/repos/measurement-factory/curl/issues{/number}","pulls_url":"https://api.github.com/repos/measurement-factory/curl/pulls{/number}","milestones_url":"https://api.github.com/repos/measurement-factory/curl/milestones{/number}","notifications_url":"https://api.github.com/repos/measurement-factory/curl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/measurement-factory/curl/labels{/name}","releases_url":"https://api.github.com/repos/measurement-factory/curl/releases{/id}","created_at":"2015-05-05T15:02:32Z","updated_at":"2015-05-05T15:02:39Z","pushed_at":"2015-06-09T16:14:17Z","git_url":"git://github.com/measurement-factory/curl.git","ssh_url":"git@github.com:measurement-factory/curl.git","clone_url":"https://github.com/measurement-factory/curl.git","svn_url":"https://github.com/measurement-factory/curl","homepage":"http://curl.haxx.se/","size":31532,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bagder:master","ref":"master","sha":"cbf2920d02b6d8feff7b8a36b174fef162bbcf1d","user":{"login":"bagder","id":177011,"avatar_url":"https://avatars.githubusercontent.com/u/177011?v=3","gravatar_id":"","url":"https://api.github.com/users/bagder","html_url":"https://github.com/bagder","followers_url":"https://api.github.com/users/bagder/followers","following_url":"https://api.github.com/users/bagder/following{/other_user}","gists_url":"https://api.github.com/users/bagder/gists{/gist_id}","starred_url":"https://api.github.com/users/bagder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bagder/subscriptions","organizations_url":"https://api.github.com/users/bagder/orgs","repos_url":"https://api.github.com/users/bagder/repos","events_url":"https://api.github.com/users/bagder/events{/privacy}","received_events_url":"https://api.github.com/users/bagder/received_events","type":"User","site_admin":false},"repo":{"id":569041,"name":"curl","full_name":"bagder/curl","owner":{"login":"bagder","id":177011,"avatar_url":"https://avatars.githubusercontent.com/u/177011?v=3","gravatar_id":"","url":"https://api.github.com/users/bagder","html_url":"https://github.com/bagder","followers_url":"https://api.github.com/users/bagder/followers","following_url":"https://api.github.com/users/bagder/following{/other_user}","gists_url":"https://api.github.com/users/bagder/gists{/gist_id}","starred_url":"https://api.github.com/users/bagder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bagder/subscriptions","organizations_url":"https://api.github.com/users/bagder/orgs","repos_url":"https://api.github.com/users/bagder/repos","events_url":"https://api.github.com/users/bagder/events{/privacy}","received_events_url":"https://api.github.com/users/bagder/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bagder/curl","description":"Curl is a tool and libcurl is a library for transferring data with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TFTP, SCP, SFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, SMTP, POP3, RTSP and RTMP. libcurl offers a myriad of powerful features","fork":false,"url":"https://api.github.com/repos/bagder/curl","forks_url":"https://api.github.com/repos/bagder/curl/forks","keys_url":"https://api.github.com/repos/bagder/curl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bagder/curl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bagder/curl/teams","hooks_url":"https://api.github.com/repos/bagder/curl/hooks","issue_events_url":"https://api.github.com/repos/bagder/curl/issues/events{/number}","events_url":"https://api.github.com/repos/bagder/curl/events","assignees_url":"https://api.github.com/repos/bagder/curl/assignees{/user}","branches_url":"https://api.github.com/repos/bagder/curl/branches{/branch}","tags_url":"https://api.github.com/repos/bagder/curl/tags","blobs_url":"https://api.github.com/repos/bagder/curl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bagder/curl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bagder/curl/git/refs{/sha}","trees_url":"https://api.github.com/repos/bagder/curl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bagder/curl/statuses/{sha}","languages_url":"https://api.github.com/repos/bagder/curl/languages","stargazers_url":"https://api.github.com/repos/bagder/curl/stargazers","contributors_url":"https://api.github.com/repos/bagder/curl/contributors","subscribers_url":"https://api.github.com/repos/bagder/curl/subscribers","subscription_url":"https://api.github.com/repos/bagder/curl/subscription","commits_url":"https://api.github.com/repos/bagder/curl/commits{/sha}","git_commits_url":"https://api.github.com/repos/bagder/curl/git/commits{/sha}","comments_url":"https://api.github.com/repos/bagder/curl/comments{/number}","issue_comment_url":"https://api.github.com/repos/bagder/curl/issues/comments{/number}","contents_url":"https://api.github.com/repos/bagder/curl/contents/{+path}","compare_url":"https://api.github.com/repos/bagder/curl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bagder/curl/merges","archive_url":"https://api.github.com/repos/bagder/curl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bagder/curl/downloads","issues_url":"https://api.github.com/repos/bagder/curl/issues{/number}","pulls_url":"https://api.github.com/repos/bagder/curl/pulls{/number}","milestones_url":"https://api.github.com/repos/bagder/curl/milestones{/number}","notifications_url":"https://api.github.com/repos/bagder/curl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bagder/curl/labels{/name}","releases_url":"https://api.github.com/repos/bagder/curl/releases{/id}","created_at":"2010-03-18T22:32:22Z","updated_at":"2015-06-09T03:16:50Z","pushed_at":"2015-06-09T06:10:07Z","git_url":"git://github.com/bagder/curl.git","ssh_url":"git@github.com:bagder/curl.git","clone_url":"https://github.com/bagder/curl.git","svn_url":"https://github.com/bagder/curl","homepage":"http://curl.haxx.se/","size":79334,"stargazers_count":1728,"watchers_count":1728,"language":"C","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":590,"mirror_url":null,"open_issues_count":16,"forks":590,"open_issues":16,"watchers":1728,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bagder/curl/pulls/305"},"html":{"href":"https://github.com/bagder/curl/pull/305"},"issue":{"href":"https://api.github.com/repos/bagder/curl/issues/305"},"comments":{"href":"https://api.github.com/repos/bagder/curl/issues/305/comments"},"review_comments":{"href":"https://api.github.com/repos/bagder/curl/pulls/305/comments"},"review_comment":{"href":"https://api.github.com/repos/bagder/curl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bagder/curl/pulls/305/commits"},"statuses":{"href":"https://api.github.com/repos/bagder/curl/statuses/1307cf846796b187ef6566bb2853ab29966bc284"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1552,"deletions":753,"changed_files":48}}