{"action":"opened","number":17,"pull_request":{"url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/pulls/17","id":47951927,"html_url":"https://github.com/heroku/ranch_proxy_protocol/pull/17","diff_url":"https://github.com/heroku/ranch_proxy_protocol/pull/17.diff","patch_url":"https://github.com/heroku/ranch_proxy_protocol/pull/17.patch","issue_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/issues/17","number":17,"state":"open","locked":false,"title":"Sni proxy protocol","user":{"login":"tsloughter","id":36227,"avatar_url":"https://avatars.githubusercontent.com/u/36227?v=3","gravatar_id":"","url":"https://api.github.com/users/tsloughter","html_url":"https://github.com/tsloughter","followers_url":"https://api.github.com/users/tsloughter/followers","following_url":"https://api.github.com/users/tsloughter/following{/other_user}","gists_url":"https://api.github.com/users/tsloughter/gists{/gist_id}","starred_url":"https://api.github.com/users/tsloughter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsloughter/subscriptions","organizations_url":"https://api.github.com/users/tsloughter/orgs","repos_url":"https://api.github.com/users/tsloughter/repos","events_url":"https://api.github.com/users/tsloughter/events{/privacy}","received_events_url":"https://api.github.com/users/tsloughter/received_events","type":"User","site_admin":false},"body":"This PR adds support for v2 of proxy protocol. If the first line of a request is empty (because the first bytes are <<\"\\r\\n\">>) we know to expect v2 not v1. Information about the connection sent by the proxy protocol (like `sni_hostname`) is stored in a list `connection_info` in the `proxy_socket` record.","created_at":"2015-10-16T19:44:59Z","updated_at":"2015-10-16T19:44:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/pulls/17/commits","review_comments_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/pulls/17/comments","review_comment_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/pulls/comments{/number}","comments_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/issues/17/comments","statuses_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/statuses/5f3413ef0f4cc0dbc7db048f965b2a4b0ecef826","head":{"label":"heroku:sni_proxy_protocol","ref":"sni_proxy_protocol","sha":"5f3413ef0f4cc0dbc7db048f965b2a4b0ecef826","user":{"login":"heroku","id":23211,"avatar_url":"https://avatars.githubusercontent.com/u/23211?v=3","gravatar_id":"","url":"https://api.github.com/users/heroku","html_url":"https://github.com/heroku","followers_url":"https://api.github.com/users/heroku/followers","following_url":"https://api.github.com/users/heroku/following{/other_user}","gists_url":"https://api.github.com/users/heroku/gists{/gist_id}","starred_url":"https://api.github.com/users/heroku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heroku/subscriptions","organizations_url":"https://api.github.com/users/heroku/orgs","repos_url":"https://api.github.com/users/heroku/repos","events_url":"https://api.github.com/users/heroku/events{/privacy}","received_events_url":"https://api.github.com/users/heroku/received_events","type":"Organization","site_admin":false},"repo":{"id":14349937,"name":"ranch_proxy_protocol","full_name":"heroku/ranch_proxy_protocol","owner":{"login":"heroku","id":23211,"avatar_url":"https://avatars.githubusercontent.com/u/23211?v=3","gravatar_id":"","url":"https://api.github.com/users/heroku","html_url":"https://github.com/heroku","followers_url":"https://api.github.com/users/heroku/followers","following_url":"https://api.github.com/users/heroku/following{/other_user}","gists_url":"https://api.github.com/users/heroku/gists{/gist_id}","starred_url":"https://api.github.com/users/heroku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heroku/subscriptions","organizations_url":"https://api.github.com/users/heroku/orgs","repos_url":"https://api.github.com/users/heroku/repos","events_url":"https://api.github.com/users/heroku/events{/privacy}","received_events_url":"https://api.github.com/users/heroku/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/heroku/ranch_proxy_protocol","description":"PROXY protocol support for ranch","fork":false,"url":"https://api.github.com/repos/heroku/ranch_proxy_protocol","forks_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/forks","keys_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/teams","hooks_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/hooks","issue_events_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/issues/events{/number}","events_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/events","assignees_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/assignees{/user}","branches_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/branches{/branch}","tags_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/tags","blobs_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/git/refs{/sha}","trees_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/statuses/{sha}","languages_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/languages","stargazers_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/stargazers","contributors_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/contributors","subscribers_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/subscribers","subscription_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/subscription","commits_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/commits{/sha}","git_commits_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/git/commits{/sha}","comments_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/comments{/number}","issue_comment_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/issues/comments{/number}","contents_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/contents/{+path}","compare_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/merges","archive_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/downloads","issues_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/issues{/number}","pulls_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/pulls{/number}","milestones_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/milestones{/number}","notifications_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/labels{/name}","releases_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/releases{/id}","created_at":"2013-11-13T00:59:37Z","updated_at":"2015-07-19T07:17:41Z","pushed_at":"2015-10-16T19:36:24Z","git_url":"git://github.com/heroku/ranch_proxy_protocol.git","ssh_url":"git@github.com:heroku/ranch_proxy_protocol.git","clone_url":"https://github.com/heroku/ranch_proxy_protocol.git","svn_url":"https://github.com/heroku/ranch_proxy_protocol","homepage":"","size":381,"stargazers_count":9,"watchers_count":9,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":9,"default_branch":"master"}},"base":{"label":"heroku:master","ref":"master","sha":"8dc8156665129b4f5016c11af5e8f272d8e3f692","user":{"login":"heroku","id":23211,"avatar_url":"https://avatars.githubusercontent.com/u/23211?v=3","gravatar_id":"","url":"https://api.github.com/users/heroku","html_url":"https://github.com/heroku","followers_url":"https://api.github.com/users/heroku/followers","following_url":"https://api.github.com/users/heroku/following{/other_user}","gists_url":"https://api.github.com/users/heroku/gists{/gist_id}","starred_url":"https://api.github.com/users/heroku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heroku/subscriptions","organizations_url":"https://api.github.com/users/heroku/orgs","repos_url":"https://api.github.com/users/heroku/repos","events_url":"https://api.github.com/users/heroku/events{/privacy}","received_events_url":"https://api.github.com/users/heroku/received_events","type":"Organization","site_admin":false},"repo":{"id":14349937,"name":"ranch_proxy_protocol","full_name":"heroku/ranch_proxy_protocol","owner":{"login":"heroku","id":23211,"avatar_url":"https://avatars.githubusercontent.com/u/23211?v=3","gravatar_id":"","url":"https://api.github.com/users/heroku","html_url":"https://github.com/heroku","followers_url":"https://api.github.com/users/heroku/followers","following_url":"https://api.github.com/users/heroku/following{/other_user}","gists_url":"https://api.github.com/users/heroku/gists{/gist_id}","starred_url":"https://api.github.com/users/heroku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heroku/subscriptions","organizations_url":"https://api.github.com/users/heroku/orgs","repos_url":"https://api.github.com/users/heroku/repos","events_url":"https://api.github.com/users/heroku/events{/privacy}","received_events_url":"https://api.github.com/users/heroku/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/heroku/ranch_proxy_protocol","description":"PROXY protocol support for ranch","fork":false,"url":"https://api.github.com/repos/heroku/ranch_proxy_protocol","forks_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/forks","keys_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/teams","hooks_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/hooks","issue_events_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/issues/events{/number}","events_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/events","assignees_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/assignees{/user}","branches_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/branches{/branch}","tags_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/tags","blobs_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/git/refs{/sha}","trees_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/statuses/{sha}","languages_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/languages","stargazers_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/stargazers","contributors_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/contributors","subscribers_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/subscribers","subscription_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/subscription","commits_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/commits{/sha}","git_commits_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/git/commits{/sha}","comments_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/comments{/number}","issue_comment_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/issues/comments{/number}","contents_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/contents/{+path}","compare_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/merges","archive_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/downloads","issues_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/issues{/number}","pulls_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/pulls{/number}","milestones_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/milestones{/number}","notifications_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/labels{/name}","releases_url":"https://api.github.com/repos/heroku/ranch_proxy_protocol/releases{/id}","created_at":"2013-11-13T00:59:37Z","updated_at":"2015-07-19T07:17:41Z","pushed_at":"2015-10-16T19:36:24Z","git_url":"git://github.com/heroku/ranch_proxy_protocol.git","ssh_url":"git@github.com:heroku/ranch_proxy_protocol.git","clone_url":"https://github.com/heroku/ranch_proxy_protocol.git","svn_url":"https://github.com/heroku/ranch_proxy_protocol","homepage":"","size":381,"stargazers_count":9,"watchers_count":9,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/heroku/ranch_proxy_protocol/pulls/17"},"html":{"href":"https://github.com/heroku/ranch_proxy_protocol/pull/17"},"issue":{"href":"https://api.github.com/repos/heroku/ranch_proxy_protocol/issues/17"},"comments":{"href":"https://api.github.com/repos/heroku/ranch_proxy_protocol/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/heroku/ranch_proxy_protocol/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/heroku/ranch_proxy_protocol/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/heroku/ranch_proxy_protocol/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/heroku/ranch_proxy_protocol/statuses/5f3413ef0f4cc0dbc7db048f965b2a4b0ecef826"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":12,"additions":200,"deletions":11,"changed_files":5}}