{"action":"created","comment":{"url":"https://api.github.com/repos/4Catalyzer/sge-dns/pulls/comments/145485765","pull_request_review_id":70293525,"id":145485765,"diff_hunk":"@@ -0,0 +1,32 @@\n+import logging\n+import socket\n+import time\n+\n+from dnslib.server import DNSServer, DNSLogger\n+from dnslib import RR, QTYPE\n+\n+logger = logging.getLogger(__name__)\n+\n+logging.basicConfig(level=logging.DEBUG)\n+\n+class TestResolver:\n+    def resolve(self,request,handler):\n+        qname = request.q.qname\n+        qtype = 'A'#QTYPE[request.q.qtype]\n+        ip = socket.gethostbyname(qname.label[0])\n+        reply = request.reply()\n+        reply.add_answer(*RR.fromZone(\"%s 180 %s %s\" % (qname, qtype, ip)))\n+        return reply\n+\n+logger_dns = DNSLogger()\n+\n+resolver = TestResolver()\n+\n+server_udp = DNSServer(resolver, port=53, address=\"\", logger=logger_dns)\n+server_udp.start_thread()\n+\n+server_tcp = DNSServer(resolver, port=53, address=\"\", logger=logger_dns, tcp=True)\n+server_tcp.start_thread()\n+\n+while server_udp.isAlive():","path":"dns.py","position":31,"original_position":31,"commit_id":"f97ebd023d48ce1ce7e6dae9e2166761b3511b04","original_commit_id":"f97ebd023d48ce1ce7e6dae9e2166761b3511b04","user":{"login":"taion","id":3112159,"avatar_url":"https://avatars0.githubusercontent.com/u/3112159?v=4","gravatar_id":"","url":"https://api.github.com/users/taion","html_url":"https://github.com/taion","followers_url":"https://api.github.com/users/taion/followers","following_url":"https://api.github.com/users/taion/following{/other_user}","gists_url":"https://api.github.com/users/taion/gists{/gist_id}","starred_url":"https://api.github.com/users/taion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taion/subscriptions","organizations_url":"https://api.github.com/users/taion/orgs","repos_url":"https://api.github.com/users/taion/repos","events_url":"https://api.github.com/users/taion/events{/privacy}","received_events_url":"https://api.github.com/users/taion/received_events","type":"User","site_admin":false},"body":"check `server_tcp` as well?","created_at":"2017-10-18T17:30:33Z","updated_at":"2017-10-18T17:30:37Z","html_url":"https://github.com/4Catalyzer/sge-dns/pull/2#discussion_r145485765","pull_request_url":"https://api.github.com/repos/4Catalyzer/sge-dns/pulls/2","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/4Catalyzer/sge-dns/pulls/comments/145485765"},"html":{"href":"https://github.com/4Catalyzer/sge-dns/pull/2#discussion_r145485765"},"pull_request":{"href":"https://api.github.com/repos/4Catalyzer/sge-dns/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/4Catalyzer/sge-dns/pulls/2","id":147207140,"html_url":"https://github.com/4Catalyzer/sge-dns/pull/2","diff_url":"https://github.com/4Catalyzer/sge-dns/pull/2.diff","patch_url":"https://github.com/4Catalyzer/sge-dns/pull/2.patch","issue_url":"https://api.github.com/repos/4Catalyzer/sge-dns/issues/2","number":2,"state":"open","locked":false,"title":"Initial commit of dns code","user":{"login":"cancan101","id":51059,"avatar_url":"https://avatars1.githubusercontent.com/u/51059?v=4","gravatar_id":"","url":"https://api.github.com/users/cancan101","html_url":"https://github.com/cancan101","followers_url":"https://api.github.com/users/cancan101/followers","following_url":"https://api.github.com/users/cancan101/following{/other_user}","gists_url":"https://api.github.com/users/cancan101/gists{/gist_id}","starred_url":"https://api.github.com/users/cancan101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cancan101/subscriptions","organizations_url":"https://api.github.com/users/cancan101/orgs","repos_url":"https://api.github.com/users/cancan101/repos","events_url":"https://api.github.com/users/cancan101/events{/privacy}","received_events_url":"https://api.github.com/users/cancan101/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-10-18T04:28:35Z","updated_at":"2017-10-18T17:30:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3235ed919b8b54d47cf9484e18ec2a9f3d8ee42e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/4Catalyzer/sge-dns/pulls/2/commits","review_comments_url":"https://api.github.com/repos/4Catalyzer/sge-dns/pulls/2/comments","review_comment_url":"https://api.github.com/repos/4Catalyzer/sge-dns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/4Catalyzer/sge-dns/issues/2/comments","statuses_url":"https://api.github.com/repos/4Catalyzer/sge-dns/statuses/f97ebd023d48ce1ce7e6dae9e2166761b3511b04","head":{"label":"4Catalyzer:initial_code","ref":"initial_code","sha":"f97ebd023d48ce1ce7e6dae9e2166761b3511b04","user":{"login":"4Catalyzer","id":13967986,"avatar_url":"https://avatars1.githubusercontent.com/u/13967986?v=4","gravatar_id":"","url":"https://api.github.com/users/4Catalyzer","html_url":"https://github.com/4Catalyzer","followers_url":"https://api.github.com/users/4Catalyzer/followers","following_url":"https://api.github.com/users/4Catalyzer/following{/other_user}","gists_url":"https://api.github.com/users/4Catalyzer/gists{/gist_id}","starred_url":"https://api.github.com/users/4Catalyzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4Catalyzer/subscriptions","organizations_url":"https://api.github.com/users/4Catalyzer/orgs","repos_url":"https://api.github.com/users/4Catalyzer/repos","events_url":"https://api.github.com/users/4Catalyzer/events{/privacy}","received_events_url":"https://api.github.com/users/4Catalyzer/received_events","type":"Organization","site_admin":false},"repo":{"id":107358464,"name":"sge-dns","full_name":"4Catalyzer/sge-dns","owner":{"login":"4Catalyzer","id":13967986,"avatar_url":"https://avatars1.githubusercontent.com/u/13967986?v=4","gravatar_id":"","url":"https://api.github.com/users/4Catalyzer","html_url":"https://github.com/4Catalyzer","followers_url":"https://api.github.com/users/4Catalyzer/followers","following_url":"https://api.github.com/users/4Catalyzer/following{/other_user}","gists_url":"https://api.github.com/users/4Catalyzer/gists{/gist_id}","starred_url":"https://api.github.com/users/4Catalyzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4Catalyzer/subscriptions","organizations_url":"https://api.github.com/users/4Catalyzer/orgs","repos_url":"https://api.github.com/users/4Catalyzer/repos","events_url":"https://api.github.com/users/4Catalyzer/events{/privacy}","received_events_url":"https://api.github.com/users/4Catalyzer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/4Catalyzer/sge-dns","description":null,"fork":false,"url":"https://api.github.com/repos/4Catalyzer/sge-dns","forks_url":"https://api.github.com/repos/4Catalyzer/sge-dns/forks","keys_url":"https://api.github.com/repos/4Catalyzer/sge-dns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4Catalyzer/sge-dns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4Catalyzer/sge-dns/teams","hooks_url":"https://api.github.com/repos/4Catalyzer/sge-dns/hooks","issue_events_url":"https://api.github.com/repos/4Catalyzer/sge-dns/issues/events{/number}","events_url":"https://api.github.com/repos/4Catalyzer/sge-dns/events","assignees_url":"https://api.github.com/repos/4Catalyzer/sge-dns/assignees{/user}","branches_url":"https://api.github.com/repos/4Catalyzer/sge-dns/branches{/branch}","tags_url":"https://api.github.com/repos/4Catalyzer/sge-dns/tags","blobs_url":"https://api.github.com/repos/4Catalyzer/sge-dns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4Catalyzer/sge-dns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4Catalyzer/sge-dns/git/refs{/sha}","trees_url":"https://api.github.com/repos/4Catalyzer/sge-dns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4Catalyzer/sge-dns/statuses/{sha}","languages_url":"https://api.github.com/repos/4Catalyzer/sge-dns/languages","stargazers_url":"https://api.github.com/repos/4Catalyzer/sge-dns/stargazers","contributors_url":"https://api.github.com/repos/4Catalyzer/sge-dns/contributors","subscribers_url":"https://api.github.com/repos/4Catalyzer/sge-dns/subscribers","subscription_url":"https://api.github.com/repos/4Catalyzer/sge-dns/subscription","commits_url":"https://api.github.com/repos/4Catalyzer/sge-dns/commits{/sha}","git_commits_url":"https://api.github.com/repos/4Catalyzer/sge-dns/git/commits{/sha}","comments_url":"https://api.github.com/repos/4Catalyzer/sge-dns/comments{/number}","issue_comment_url":"https://api.github.com/repos/4Catalyzer/sge-dns/issues/comments{/number}","contents_url":"https://api.github.com/repos/4Catalyzer/sge-dns/contents/{+path}","compare_url":"https://api.github.com/repos/4Catalyzer/sge-dns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4Catalyzer/sge-dns/merges","archive_url":"https://api.github.com/repos/4Catalyzer/sge-dns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4Catalyzer/sge-dns/downloads","issues_url":"https://api.github.com/repos/4Catalyzer/sge-dns/issues{/number}","pulls_url":"https://api.github.com/repos/4Catalyzer/sge-dns/pulls{/number}","milestones_url":"https://api.github.com/repos/4Catalyzer/sge-dns/milestones{/number}","notifications_url":"https://api.github.com/repos/4Catalyzer/sge-dns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4Catalyzer/sge-dns/labels{/name}","releases_url":"https://api.github.com/repos/4Catalyzer/sge-dns/releases{/id}","deployments_url":"https://api.github.com/repos/4Catalyzer/sge-dns/deployments","created_at":"2017-10-18T04:23:15Z","updated_at":"2017-10-18T04:23:15Z","pushed_at":"2017-10-18T04:28:35Z","git_url":"git://github.com/4Catalyzer/sge-dns.git","ssh_url":"git@github.com:4Catalyzer/sge-dns.git","clone_url":"https://github.com/4Catalyzer/sge-dns.git","svn_url":"https://github.com/4Catalyzer/sge-dns","homepage":null,"size":1,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"4Catalyzer:master","ref":"master","sha":"ab44b10b2c01b6ec017be700fafe52ce30f4f846","user":{"login":"4Catalyzer","id":13967986,"avatar_url":"https://avatars1.githubusercontent.com/u/13967986?v=4","gravatar_id":"","url":"https://api.github.com/users/4Catalyzer","html_url":"https://github.com/4Catalyzer","followers_url":"https://api.github.com/users/4Catalyzer/followers","following_url":"https://api.github.com/users/4Catalyzer/following{/other_user}","gists_url":"https://api.github.com/users/4Catalyzer/gists{/gist_id}","starred_url":"https://api.github.com/users/4Catalyzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4Catalyzer/subscriptions","organizations_url":"https://api.github.com/users/4Catalyzer/orgs","repos_url":"https://api.github.com/users/4Catalyzer/repos","events_url":"https://api.github.com/users/4Catalyzer/events{/privacy}","received_events_url":"https://api.github.com/users/4Catalyzer/received_events","type":"Organization","site_admin":false},"repo":{"id":107358464,"name":"sge-dns","full_name":"4Catalyzer/sge-dns","owner":{"login":"4Catalyzer","id":13967986,"avatar_url":"https://avatars1.githubusercontent.com/u/13967986?v=4","gravatar_id":"","url":"https://api.github.com/users/4Catalyzer","html_url":"https://github.com/4Catalyzer","followers_url":"https://api.github.com/users/4Catalyzer/followers","following_url":"https://api.github.com/users/4Catalyzer/following{/other_user}","gists_url":"https://api.github.com/users/4Catalyzer/gists{/gist_id}","starred_url":"https://api.github.com/users/4Catalyzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4Catalyzer/subscriptions","organizations_url":"https://api.github.com/users/4Catalyzer/orgs","repos_url":"https://api.github.com/users/4Catalyzer/repos","events_url":"https://api.github.com/users/4Catalyzer/events{/privacy}","received_events_url":"https://api.github.com/users/4Catalyzer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/4Catalyzer/sge-dns","description":null,"fork":false,"url":"https://api.github.com/repos/4Catalyzer/sge-dns","forks_url":"https://api.github.com/repos/4Catalyzer/sge-dns/forks","keys_url":"https://api.github.com/repos/4Catalyzer/sge-dns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4Catalyzer/sge-dns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4Catalyzer/sge-dns/teams","hooks_url":"https://api.github.com/repos/4Catalyzer/sge-dns/hooks","issue_events_url":"https://api.github.com/repos/4Catalyzer/sge-dns/issues/events{/number}","events_url":"https://api.github.com/repos/4Catalyzer/sge-dns/events","assignees_url":"https://api.github.com/repos/4Catalyzer/sge-dns/assignees{/user}","branches_url":"https://api.github.com/repos/4Catalyzer/sge-dns/branches{/branch}","tags_url":"https://api.github.com/repos/4Catalyzer/sge-dns/tags","blobs_url":"https://api.github.com/repos/4Catalyzer/sge-dns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4Catalyzer/sge-dns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4Catalyzer/sge-dns/git/refs{/sha}","trees_url":"https://api.github.com/repos/4Catalyzer/sge-dns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4Catalyzer/sge-dns/statuses/{sha}","languages_url":"https://api.github.com/repos/4Catalyzer/sge-dns/languages","stargazers_url":"https://api.github.com/repos/4Catalyzer/sge-dns/stargazers","contributors_url":"https://api.github.com/repos/4Catalyzer/sge-dns/contributors","subscribers_url":"https://api.github.com/repos/4Catalyzer/sge-dns/subscribers","subscription_url":"https://api.github.com/repos/4Catalyzer/sge-dns/subscription","commits_url":"https://api.github.com/repos/4Catalyzer/sge-dns/commits{/sha}","git_commits_url":"https://api.github.com/repos/4Catalyzer/sge-dns/git/commits{/sha}","comments_url":"https://api.github.com/repos/4Catalyzer/sge-dns/comments{/number}","issue_comment_url":"https://api.github.com/repos/4Catalyzer/sge-dns/issues/comments{/number}","contents_url":"https://api.github.com/repos/4Catalyzer/sge-dns/contents/{+path}","compare_url":"https://api.github.com/repos/4Catalyzer/sge-dns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4Catalyzer/sge-dns/merges","archive_url":"https://api.github.com/repos/4Catalyzer/sge-dns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4Catalyzer/sge-dns/downloads","issues_url":"https://api.github.com/repos/4Catalyzer/sge-dns/issues{/number}","pulls_url":"https://api.github.com/repos/4Catalyzer/sge-dns/pulls{/number}","milestones_url":"https://api.github.com/repos/4Catalyzer/sge-dns/milestones{/number}","notifications_url":"https://api.github.com/repos/4Catalyzer/sge-dns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4Catalyzer/sge-dns/labels{/name}","releases_url":"https://api.github.com/repos/4Catalyzer/sge-dns/releases{/id}","deployments_url":"https://api.github.com/repos/4Catalyzer/sge-dns/deployments","created_at":"2017-10-18T04:23:15Z","updated_at":"2017-10-18T04:23:15Z","pushed_at":"2017-10-18T04:28:35Z","git_url":"git://github.com/4Catalyzer/sge-dns.git","ssh_url":"git@github.com:4Catalyzer/sge-dns.git","clone_url":"https://github.com/4Catalyzer/sge-dns.git","svn_url":"https://github.com/4Catalyzer/sge-dns","homepage":null,"size":1,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/4Catalyzer/sge-dns/pulls/2"},"html":{"href":"https://github.com/4Catalyzer/sge-dns/pull/2"},"issue":{"href":"https://api.github.com/repos/4Catalyzer/sge-dns/issues/2"},"comments":{"href":"https://api.github.com/repos/4Catalyzer/sge-dns/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/4Catalyzer/sge-dns/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/4Catalyzer/sge-dns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/4Catalyzer/sge-dns/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/4Catalyzer/sge-dns/statuses/f97ebd023d48ce1ce7e6dae9e2166761b3511b04"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"taion"}}