{"action":"created","comment":{"url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/pulls/comments/253140563","pull_request_review_id":199191789,"id":253140563,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI1MzE0MDU2Mw==","diff_hunk":"@@ -0,0 +1,52 @@\n+package org.littleshoot.proxy.impl;\n+\n+import java.util.regex.Matcher;\n+import java.util.regex.Pattern;\n+\n+import io.netty.buffer.ByteBuf;\n+import io.netty.channel.ChannelHandlerContext;\n+import io.netty.channel.ChannelInboundHandlerAdapter;\n+import io.netty.util.AttributeKey;\n+\n+public class HttpProxyProtocolRequestDecoder extends ChannelInboundHandlerAdapter {\n+\n+  public static final AttributeKey<String> SOURCE_IP_ATTRIBUTE = AttributeKey.valueOf(\"sourceIp\");\n+\n+  // PROXY_STRING + single space + INET_PROTOCOL + single space + CLIENT_IP + single space + PROXY_IP + single space + CLIENT_PORT + single space + PROXY_PORT + \"\\r\\n\"\n+  // Example: PROXY TCP4 198.51.100.22 203.0.113.7 35646 80\\r\\n\n+  // Source: https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html","path":"src/main/java/org/littleshoot/proxy/impl/HttpProxyProtocolRequestDecoder.java","position":17,"original_position":17,"commit_id":"e7c5b7fe8f8c51ccf789f07e02b5cceb477f892e","original_commit_id":"e7c5b7fe8f8c51ccf789f07e02b5cceb477f892e","user":{"login":"mjallday","id":252280,"node_id":"MDQ6VXNlcjI1MjI4MA==","avatar_url":"https://avatars0.githubusercontent.com/u/252280?v=4","gravatar_id":"","url":"https://api.github.com/users/mjallday","html_url":"https://github.com/mjallday","followers_url":"https://api.github.com/users/mjallday/followers","following_url":"https://api.github.com/users/mjallday/following{/other_user}","gists_url":"https://api.github.com/users/mjallday/gists{/gist_id}","starred_url":"https://api.github.com/users/mjallday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjallday/subscriptions","organizations_url":"https://api.github.com/users/mjallday/orgs","repos_url":"https://api.github.com/users/mjallday/repos","events_url":"https://api.github.com/users/mjallday/events{/privacy}","received_events_url":"https://api.github.com/users/mjallday/received_events","type":"User","site_admin":false},"body":"https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html\r\n\r\n`PROXY_STRING + single space + INET_PROTOCOL + single space + CLIENT_IP + single space + PROXY_IP + single space + CLIENT_PORT + single space + PROXY_PORT + \"\\r\\n\"`\r\n\r\nshould also support IPV6\r\n\r\n`PROXY TCP6 2001:DB8::21f:5bff:febf:ce22:8a2e 2001:DB8::12f:8baa:eafc:ce29:6b2e 35646 80\\r\\n`","created_at":"2019-02-01T17:50:25Z","updated_at":"2019-02-01T17:51:30Z","html_url":"https://github.com/verygoodsecurity/LittleProxy/pull/60#discussion_r253140563","pull_request_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/pulls/60","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/verygoodsecurity/LittleProxy/pulls/comments/253140563"},"html":{"href":"https://github.com/verygoodsecurity/LittleProxy/pull/60#discussion_r253140563"},"pull_request":{"href":"https://api.github.com/repos/verygoodsecurity/LittleProxy/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/pulls/60","id":249678881,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQ5Njc4ODgx","html_url":"https://github.com/verygoodsecurity/LittleProxy/pull/60","diff_url":"https://github.com/verygoodsecurity/LittleProxy/pull/60.diff","patch_url":"https://github.com/verygoodsecurity/LittleProxy/pull/60.patch","issue_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/issues/60","number":60,"state":"open","locked":false,"title":"WIP. ProxyProtocol header handler","user":{"login":"zdmytriv","id":1759112,"node_id":"MDQ6VXNlcjE3NTkxMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1759112?v=4","gravatar_id":"","url":"https://api.github.com/users/zdmytriv","html_url":"https://github.com/zdmytriv","followers_url":"https://api.github.com/users/zdmytriv/followers","following_url":"https://api.github.com/users/zdmytriv/following{/other_user}","gists_url":"https://api.github.com/users/zdmytriv/gists{/gist_id}","starred_url":"https://api.github.com/users/zdmytriv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdmytriv/subscriptions","organizations_url":"https://api.github.com/users/zdmytriv/orgs","repos_url":"https://api.github.com/users/zdmytriv/repos","events_url":"https://api.github.com/users/zdmytriv/events{/privacy}","received_events_url":"https://api.github.com/users/zdmytriv/received_events","type":"User","site_admin":false},"body":"ProxyProtocol header handler","created_at":"2019-02-01T17:28:05Z","updated_at":"2019-02-01T17:51:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6e7f26f6f05679594f9251df5f33db401ea09ab","assignee":null,"assignees":[],"requested_reviewers":[{"login":"viacheslav-fomin-main","id":18006133,"node_id":"MDQ6VXNlcjE4MDA2MTMz","avatar_url":"https://avatars3.githubusercontent.com/u/18006133?v=4","gravatar_id":"","url":"https://api.github.com/users/viacheslav-fomin-main","html_url":"https://github.com/viacheslav-fomin-main","followers_url":"https://api.github.com/users/viacheslav-fomin-main/followers","following_url":"https://api.github.com/users/viacheslav-fomin-main/following{/other_user}","gists_url":"https://api.github.com/users/viacheslav-fomin-main/gists{/gist_id}","starred_url":"https://api.github.com/users/viacheslav-fomin-main/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viacheslav-fomin-main/subscriptions","organizations_url":"https://api.github.com/users/viacheslav-fomin-main/orgs","repos_url":"https://api.github.com/users/viacheslav-fomin-main/repos","events_url":"https://api.github.com/users/viacheslav-fomin-main/events{/privacy}","received_events_url":"https://api.github.com/users/viacheslav-fomin-main/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/pulls/60/commits","review_comments_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/pulls/60/comments","review_comment_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/issues/60/comments","statuses_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/statuses/e7c5b7fe8f8c51ccf789f07e02b5cceb477f892e","head":{"label":"zdmytriv:proxy-protocol-handler","ref":"proxy-protocol-handler","sha":"e7c5b7fe8f8c51ccf789f07e02b5cceb477f892e","user":{"login":"zdmytriv","id":1759112,"node_id":"MDQ6VXNlcjE3NTkxMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1759112?v=4","gravatar_id":"","url":"https://api.github.com/users/zdmytriv","html_url":"https://github.com/zdmytriv","followers_url":"https://api.github.com/users/zdmytriv/followers","following_url":"https://api.github.com/users/zdmytriv/following{/other_user}","gists_url":"https://api.github.com/users/zdmytriv/gists{/gist_id}","starred_url":"https://api.github.com/users/zdmytriv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdmytriv/subscriptions","organizations_url":"https://api.github.com/users/zdmytriv/orgs","repos_url":"https://api.github.com/users/zdmytriv/repos","events_url":"https://api.github.com/users/zdmytriv/events{/privacy}","received_events_url":"https://api.github.com/users/zdmytriv/received_events","type":"User","site_admin":false},"repo":{"id":114365131,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQzNjUxMzE=","name":"LittleProxy","full_name":"zdmytriv/LittleProxy","private":false,"owner":{"login":"zdmytriv","id":1759112,"node_id":"MDQ6VXNlcjE3NTkxMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1759112?v=4","gravatar_id":"","url":"https://api.github.com/users/zdmytriv","html_url":"https://github.com/zdmytriv","followers_url":"https://api.github.com/users/zdmytriv/followers","following_url":"https://api.github.com/users/zdmytriv/following{/other_user}","gists_url":"https://api.github.com/users/zdmytriv/gists{/gist_id}","starred_url":"https://api.github.com/users/zdmytriv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdmytriv/subscriptions","organizations_url":"https://api.github.com/users/zdmytriv/orgs","repos_url":"https://api.github.com/users/zdmytriv/repos","events_url":"https://api.github.com/users/zdmytriv/events{/privacy}","received_events_url":"https://api.github.com/users/zdmytriv/received_events","type":"User","site_admin":false},"html_url":"https://github.com/zdmytriv/LittleProxy","description":"High performance HTTP proxy originally written by your friends at Lantern and now maintained by a stellar group of volunteer open source programmers.","fork":true,"url":"https://api.github.com/repos/zdmytriv/LittleProxy","forks_url":"https://api.github.com/repos/zdmytriv/LittleProxy/forks","keys_url":"https://api.github.com/repos/zdmytriv/LittleProxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zdmytriv/LittleProxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zdmytriv/LittleProxy/teams","hooks_url":"https://api.github.com/repos/zdmytriv/LittleProxy/hooks","issue_events_url":"https://api.github.com/repos/zdmytriv/LittleProxy/issues/events{/number}","events_url":"https://api.github.com/repos/zdmytriv/LittleProxy/events","assignees_url":"https://api.github.com/repos/zdmytriv/LittleProxy/assignees{/user}","branches_url":"https://api.github.com/repos/zdmytriv/LittleProxy/branches{/branch}","tags_url":"https://api.github.com/repos/zdmytriv/LittleProxy/tags","blobs_url":"https://api.github.com/repos/zdmytriv/LittleProxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zdmytriv/LittleProxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zdmytriv/LittleProxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/zdmytriv/LittleProxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zdmytriv/LittleProxy/statuses/{sha}","languages_url":"https://api.github.com/repos/zdmytriv/LittleProxy/languages","stargazers_url":"https://api.github.com/repos/zdmytriv/LittleProxy/stargazers","contributors_url":"https://api.github.com/repos/zdmytriv/LittleProxy/contributors","subscribers_url":"https://api.github.com/repos/zdmytriv/LittleProxy/subscribers","subscription_url":"https://api.github.com/repos/zdmytriv/LittleProxy/subscription","commits_url":"https://api.github.com/repos/zdmytriv/LittleProxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/zdmytriv/LittleProxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/zdmytriv/LittleProxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/zdmytriv/LittleProxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/zdmytriv/LittleProxy/contents/{+path}","compare_url":"https://api.github.com/repos/zdmytriv/LittleProxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zdmytriv/LittleProxy/merges","archive_url":"https://api.github.com/repos/zdmytriv/LittleProxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zdmytriv/LittleProxy/downloads","issues_url":"https://api.github.com/repos/zdmytriv/LittleProxy/issues{/number}","pulls_url":"https://api.github.com/repos/zdmytriv/LittleProxy/pulls{/number}","milestones_url":"https://api.github.com/repos/zdmytriv/LittleProxy/milestones{/number}","notifications_url":"https://api.github.com/repos/zdmytriv/LittleProxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zdmytriv/LittleProxy/labels{/name}","releases_url":"https://api.github.com/repos/zdmytriv/LittleProxy/releases{/id}","deployments_url":"https://api.github.com/repos/zdmytriv/LittleProxy/deployments","created_at":"2017-12-15T11:50:48Z","updated_at":"2018-12-19T16:16:17Z","pushed_at":"2019-02-01T17:27:27Z","git_url":"git://github.com/zdmytriv/LittleProxy.git","ssh_url":"git@github.com:zdmytriv/LittleProxy.git","clone_url":"https://github.com/zdmytriv/LittleProxy.git","svn_url":"https://github.com/zdmytriv/LittleProxy","homepage":"https://www.getlantern.org","size":7579,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"vgs-edition"}},"base":{"label":"verygoodsecurity:vgs-edition","ref":"vgs-edition","sha":"3ffa94d6c12d5388b8d919b0857941429cc8b3ac","user":{"login":"verygoodsecurity","id":17788525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3Nzg4NTI1","avatar_url":"https://avatars0.githubusercontent.com/u/17788525?v=4","gravatar_id":"","url":"https://api.github.com/users/verygoodsecurity","html_url":"https://github.com/verygoodsecurity","followers_url":"https://api.github.com/users/verygoodsecurity/followers","following_url":"https://api.github.com/users/verygoodsecurity/following{/other_user}","gists_url":"https://api.github.com/users/verygoodsecurity/gists{/gist_id}","starred_url":"https://api.github.com/users/verygoodsecurity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verygoodsecurity/subscriptions","organizations_url":"https://api.github.com/users/verygoodsecurity/orgs","repos_url":"https://api.github.com/users/verygoodsecurity/repos","events_url":"https://api.github.com/users/verygoodsecurity/events{/privacy}","received_events_url":"https://api.github.com/users/verygoodsecurity/received_events","type":"Organization","site_admin":false},"repo":{"id":83826935,"node_id":"MDEwOlJlcG9zaXRvcnk4MzgyNjkzNQ==","name":"LittleProxy","full_name":"verygoodsecurity/LittleProxy","private":false,"owner":{"login":"verygoodsecurity","id":17788525,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3Nzg4NTI1","avatar_url":"https://avatars0.githubusercontent.com/u/17788525?v=4","gravatar_id":"","url":"https://api.github.com/users/verygoodsecurity","html_url":"https://github.com/verygoodsecurity","followers_url":"https://api.github.com/users/verygoodsecurity/followers","following_url":"https://api.github.com/users/verygoodsecurity/following{/other_user}","gists_url":"https://api.github.com/users/verygoodsecurity/gists{/gist_id}","starred_url":"https://api.github.com/users/verygoodsecurity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verygoodsecurity/subscriptions","organizations_url":"https://api.github.com/users/verygoodsecurity/orgs","repos_url":"https://api.github.com/users/verygoodsecurity/repos","events_url":"https://api.github.com/users/verygoodsecurity/events{/privacy}","received_events_url":"https://api.github.com/users/verygoodsecurity/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/verygoodsecurity/LittleProxy","description":"High performance HTTP proxy originally written by your friends at Lantern and now maintained by a stellar group of volunteer open source programmers.","fork":true,"url":"https://api.github.com/repos/verygoodsecurity/LittleProxy","forks_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/forks","keys_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/teams","hooks_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/hooks","issue_events_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/issues/events{/number}","events_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/events","assignees_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/assignees{/user}","branches_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/branches{/branch}","tags_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/tags","blobs_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/statuses/{sha}","languages_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/languages","stargazers_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/stargazers","contributors_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/contributors","subscribers_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/subscribers","subscription_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/subscription","commits_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/contents/{+path}","compare_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/merges","archive_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/downloads","issues_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/issues{/number}","pulls_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/pulls{/number}","milestones_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/milestones{/number}","notifications_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/labels{/name}","releases_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/releases{/id}","deployments_url":"https://api.github.com/repos/verygoodsecurity/LittleProxy/deployments","created_at":"2017-03-03T18:05:10Z","updated_at":"2018-10-03T03:51:18Z","pushed_at":"2019-02-01T17:28:05Z","git_url":"git://github.com/verygoodsecurity/LittleProxy.git","ssh_url":"git@github.com:verygoodsecurity/LittleProxy.git","clone_url":"https://github.com/verygoodsecurity/LittleProxy.git","svn_url":"https://github.com/verygoodsecurity/LittleProxy","homepage":"https://www.getlantern.org","size":7569,"stargazers_count":4,"watchers_count":4,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":9,"open_issues":8,"watchers":4,"default_branch":"vgs-edition"}},"_links":{"self":{"href":"https://api.github.com/repos/verygoodsecurity/LittleProxy/pulls/60"},"html":{"href":"https://github.com/verygoodsecurity/LittleProxy/pull/60"},"issue":{"href":"https://api.github.com/repos/verygoodsecurity/LittleProxy/issues/60"},"comments":{"href":"https://api.github.com/repos/verygoodsecurity/LittleProxy/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/verygoodsecurity/LittleProxy/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/verygoodsecurity/LittleProxy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/verygoodsecurity/LittleProxy/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/verygoodsecurity/LittleProxy/statuses/e7c5b7fe8f8c51ccf789f07e02b5cceb477f892e"}},"author_association":"NONE"}}
{"actor":{"display_login":"mjallday"}}