{"action":"created","issue":{"url":"https://api.github.com/repos/raptorswing/Qt-Socks-Server/issues/11","labels_url":"https://api.github.com/repos/raptorswing/Qt-Socks-Server/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/raptorswing/Qt-Socks-Server/issues/11/comments","events_url":"https://api.github.com/repos/raptorswing/Qt-Socks-Server/issues/11/events","html_url":"https://github.com/raptorswing/Qt-Socks-Server/pull/11","id":107339635,"number":11,"title":"Fix parsing of IPv4 address in SOCKS4A","user":{"login":"blochbergermax","id":9423081,"avatar_url":"https://avatars.githubusercontent.com/u/9423081?v=3","gravatar_id":"","url":"https://api.github.com/users/blochbergermax","html_url":"https://github.com/blochbergermax","followers_url":"https://api.github.com/users/blochbergermax/followers","following_url":"https://api.github.com/users/blochbergermax/following{/other_user}","gists_url":"https://api.github.com/users/blochbergermax/gists{/gist_id}","starred_url":"https://api.github.com/users/blochbergermax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blochbergermax/subscriptions","organizations_url":"https://api.github.com/users/blochbergermax/orgs","repos_url":"https://api.github.com/users/blochbergermax/repos","events_url":"https://api.github.com/users/blochbergermax/events{/privacy}","received_events_url":"https://api.github.com/users/blochbergermax/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-19T15:33:28Z","updated_at":"2015-09-21T19:21:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/raptorswing/Qt-Socks-Server/pulls/11","html_url":"https://github.com/raptorswing/Qt-Socks-Server/pull/11","diff_url":"https://github.com/raptorswing/Qt-Socks-Server/pull/11.diff","patch_url":"https://github.com/raptorswing/Qt-Socks-Server/pull/11.patch"},"body":"According to the protocol a domain is used instead of an IPv4 address if the address is `0.0.0.x` with `x` non-zero.\r\n\r\nSince `(0x00000000 & 0x000000ff) == 0x00000000` the IP address `0.0.0.0` was considered to be a domain as well, so we need to check if not only the first 3 octets are zero but if the last octet is non-zero as well.\r\n\r\nI'm not sure if any client sets `0.0.0.0` as IP address. I didn't see a real life issue with this, but nonetheless let's try to be true to the specification."},"comment":{"url":"https://api.github.com/repos/raptorswing/Qt-Socks-Server/issues/comments/142083811","html_url":"https://github.com/raptorswing/Qt-Socks-Server/pull/11#issuecomment-142083811","issue_url":"https://api.github.com/repos/raptorswing/Qt-Socks-Server/issues/11","id":142083811,"user":{"login":"raptorswing","id":971991,"avatar_url":"https://avatars.githubusercontent.com/u/971991?v=3","gravatar_id":"","url":"https://api.github.com/users/raptorswing","html_url":"https://github.com/raptorswing","followers_url":"https://api.github.com/users/raptorswing/followers","following_url":"https://api.github.com/users/raptorswing/following{/other_user}","gists_url":"https://api.github.com/users/raptorswing/gists{/gist_id}","starred_url":"https://api.github.com/users/raptorswing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raptorswing/subscriptions","organizations_url":"https://api.github.com/users/raptorswing/orgs","repos_url":"https://api.github.com/users/raptorswing/repos","events_url":"https://api.github.com/users/raptorswing/events{/privacy}","received_events_url":"https://api.github.com/users/raptorswing/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T19:21:23Z","updated_at":"2015-09-21T19:21:23Z","body":"Good find - thanks."}}