{"action":"created","comment":{"url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/pulls/comments/60176159","id":60176159,"diff_hunk":"@@ -191,6 +191,26 @@ static void server_recv_cb(EV_P_ ev_io *w, int revents)\n         }\n     }\n \n+    if (verbose) {\n+        uint16_t port = 0;\n+        char ipstr[max(INET_ADDRSTRLEN, INET6_ADDRSTRLEN)];\n+        memset(&ipstr, 0, max(INET_ADDRSTRLEN, INET6_ADDRSTRLEN));\n+\n+        if (AF_INET == server->destaddr.ss_family) {\n+            struct sockaddr_in *sa = (struct sockaddr_in *)&(server->destaddr);\n+            inet_ntop(AF_INET, &(sa->sin_addr), ipstr, INET_ADDRSTRLEN);","path":"src/redir.c","position":null,"original_position":19,"commit_id":"5ca2ecab6d54d44b6410dd6e449b24a3a8bf1ebb","original_commit_id":"10ff7e5f995c6f07c77bed59149bdbc3e55b7ea6","user":{"login":"kimw","id":658250,"avatar_url":"https://avatars.githubusercontent.com/u/658250?v=3","gravatar_id":"","url":"https://api.github.com/users/kimw","html_url":"https://github.com/kimw","followers_url":"https://api.github.com/users/kimw/followers","following_url":"https://api.github.com/users/kimw/following{/other_user}","gists_url":"https://api.github.com/users/kimw/gists{/gist_id}","starred_url":"https://api.github.com/users/kimw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimw/subscriptions","organizations_url":"https://api.github.com/users/kimw/orgs","repos_url":"https://api.github.com/users/kimw/repos","events_url":"https://api.github.com/users/kimw/events{/privacy}","received_events_url":"https://api.github.com/users/kimw/received_events","type":"User","site_admin":false},"body":"checked","created_at":"2016-04-19T05:53:08Z","updated_at":"2016-04-19T05:53:08Z","html_url":"https://github.com/shadowsocks/shadowsocks-libev/pull/590#discussion_r60176159","pull_request_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/pulls/590","_links":{"self":{"href":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/pulls/comments/60176159"},"html":{"href":"https://github.com/shadowsocks/shadowsocks-libev/pull/590#discussion_r60176159"},"pull_request":{"href":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/pulls/590"}}},"pull_request":{"url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/pulls/590","id":66814277,"html_url":"https://github.com/shadowsocks/shadowsocks-libev/pull/590","diff_url":"https://github.com/shadowsocks/shadowsocks-libev/pull/590.diff","patch_url":"https://github.com/shadowsocks/shadowsocks-libev/pull/590.patch","issue_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/590","number":590,"state":"open","locked":false,"title":"fix `ss-redir -v`.","user":{"login":"kimw","id":658250,"avatar_url":"https://avatars.githubusercontent.com/u/658250?v=3","gravatar_id":"","url":"https://api.github.com/users/kimw","html_url":"https://github.com/kimw","followers_url":"https://api.github.com/users/kimw/followers","following_url":"https://api.github.com/users/kimw/following{/other_user}","gists_url":"https://api.github.com/users/kimw/gists{/gist_id}","starred_url":"https://api.github.com/users/kimw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimw/subscriptions","organizations_url":"https://api.github.com/users/kimw/orgs","repos_url":"https://api.github.com/users/kimw/repos","events_url":"https://api.github.com/users/kimw/events{/privacy}","received_events_url":"https://api.github.com/users/kimw/received_events","type":"User","site_admin":false},"body":"It's now output messages while redirecting.\r\nThis is useful at the time building up a router.","created_at":"2016-04-18T08:19:43Z","updated_at":"2016-04-19T05:53:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"823183778e825c8efb75194714a7215a746507da","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/pulls/590/commits","review_comments_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/pulls/590/comments","review_comment_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/590/comments","statuses_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/statuses/5ca2ecab6d54d44b6410dd6e449b24a3a8bf1ebb","head":{"label":"kimw:verbose","ref":"verbose","sha":"5ca2ecab6d54d44b6410dd6e449b24a3a8bf1ebb","user":{"login":"kimw","id":658250,"avatar_url":"https://avatars.githubusercontent.com/u/658250?v=3","gravatar_id":"","url":"https://api.github.com/users/kimw","html_url":"https://github.com/kimw","followers_url":"https://api.github.com/users/kimw/followers","following_url":"https://api.github.com/users/kimw/following{/other_user}","gists_url":"https://api.github.com/users/kimw/gists{/gist_id}","starred_url":"https://api.github.com/users/kimw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimw/subscriptions","organizations_url":"https://api.github.com/users/kimw/orgs","repos_url":"https://api.github.com/users/kimw/repos","events_url":"https://api.github.com/users/kimw/events{/privacy}","received_events_url":"https://api.github.com/users/kimw/received_events","type":"User","site_admin":false},"repo":{"id":54688895,"name":"shadowsocks-libev","full_name":"kimw/shadowsocks-libev","owner":{"login":"kimw","id":658250,"avatar_url":"https://avatars.githubusercontent.com/u/658250?v=3","gravatar_id":"","url":"https://api.github.com/users/kimw","html_url":"https://github.com/kimw","followers_url":"https://api.github.com/users/kimw/followers","following_url":"https://api.github.com/users/kimw/following{/other_user}","gists_url":"https://api.github.com/users/kimw/gists{/gist_id}","starred_url":"https://api.github.com/users/kimw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimw/subscriptions","organizations_url":"https://api.github.com/users/kimw/orgs","repos_url":"https://api.github.com/users/kimw/repos","events_url":"https://api.github.com/users/kimw/events{/privacy}","received_events_url":"https://api.github.com/users/kimw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kimw/shadowsocks-libev","description":"libev port of shadowsocks","fork":true,"url":"https://api.github.com/repos/kimw/shadowsocks-libev","forks_url":"https://api.github.com/repos/kimw/shadowsocks-libev/forks","keys_url":"https://api.github.com/repos/kimw/shadowsocks-libev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kimw/shadowsocks-libev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kimw/shadowsocks-libev/teams","hooks_url":"https://api.github.com/repos/kimw/shadowsocks-libev/hooks","issue_events_url":"https://api.github.com/repos/kimw/shadowsocks-libev/issues/events{/number}","events_url":"https://api.github.com/repos/kimw/shadowsocks-libev/events","assignees_url":"https://api.github.com/repos/kimw/shadowsocks-libev/assignees{/user}","branches_url":"https://api.github.com/repos/kimw/shadowsocks-libev/branches{/branch}","tags_url":"https://api.github.com/repos/kimw/shadowsocks-libev/tags","blobs_url":"https://api.github.com/repos/kimw/shadowsocks-libev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kimw/shadowsocks-libev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kimw/shadowsocks-libev/git/refs{/sha}","trees_url":"https://api.github.com/repos/kimw/shadowsocks-libev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kimw/shadowsocks-libev/statuses/{sha}","languages_url":"https://api.github.com/repos/kimw/shadowsocks-libev/languages","stargazers_url":"https://api.github.com/repos/kimw/shadowsocks-libev/stargazers","contributors_url":"https://api.github.com/repos/kimw/shadowsocks-libev/contributors","subscribers_url":"https://api.github.com/repos/kimw/shadowsocks-libev/subscribers","subscription_url":"https://api.github.com/repos/kimw/shadowsocks-libev/subscription","commits_url":"https://api.github.com/repos/kimw/shadowsocks-libev/commits{/sha}","git_commits_url":"https://api.github.com/repos/kimw/shadowsocks-libev/git/commits{/sha}","comments_url":"https://api.github.com/repos/kimw/shadowsocks-libev/comments{/number}","issue_comment_url":"https://api.github.com/repos/kimw/shadowsocks-libev/issues/comments{/number}","contents_url":"https://api.github.com/repos/kimw/shadowsocks-libev/contents/{+path}","compare_url":"https://api.github.com/repos/kimw/shadowsocks-libev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kimw/shadowsocks-libev/merges","archive_url":"https://api.github.com/repos/kimw/shadowsocks-libev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kimw/shadowsocks-libev/downloads","issues_url":"https://api.github.com/repos/kimw/shadowsocks-libev/issues{/number}","pulls_url":"https://api.github.com/repos/kimw/shadowsocks-libev/pulls{/number}","milestones_url":"https://api.github.com/repos/kimw/shadowsocks-libev/milestones{/number}","notifications_url":"https://api.github.com/repos/kimw/shadowsocks-libev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kimw/shadowsocks-libev/labels{/name}","releases_url":"https://api.github.com/repos/kimw/shadowsocks-libev/releases{/id}","deployments_url":"https://api.github.com/repos/kimw/shadowsocks-libev/deployments","created_at":"2016-03-25T02:35:11Z","updated_at":"2016-03-25T02:35:14Z","pushed_at":"2016-04-19T05:52:02Z","git_url":"git://github.com/kimw/shadowsocks-libev.git","ssh_url":"git@github.com:kimw/shadowsocks-libev.git","clone_url":"https://github.com/kimw/shadowsocks-libev.git","svn_url":"https://github.com/kimw/shadowsocks-libev","homepage":"http://shadowsocks.org/en/download/servers.html","size":7285,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"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":"shadowsocks:master","ref":"master","sha":"6c2c49ad60d5e719d479e2664a8cf649b8279567","user":{"login":"shadowsocks","id":3006190,"avatar_url":"https://avatars.githubusercontent.com/u/3006190?v=3","gravatar_id":"","url":"https://api.github.com/users/shadowsocks","html_url":"https://github.com/shadowsocks","followers_url":"https://api.github.com/users/shadowsocks/followers","following_url":"https://api.github.com/users/shadowsocks/following{/other_user}","gists_url":"https://api.github.com/users/shadowsocks/gists{/gist_id}","starred_url":"https://api.github.com/users/shadowsocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadowsocks/subscriptions","organizations_url":"https://api.github.com/users/shadowsocks/orgs","repos_url":"https://api.github.com/users/shadowsocks/repos","events_url":"https://api.github.com/users/shadowsocks/events{/privacy}","received_events_url":"https://api.github.com/users/shadowsocks/received_events","type":"Organization","site_admin":false},"repo":{"id":7177269,"name":"shadowsocks-libev","full_name":"shadowsocks/shadowsocks-libev","owner":{"login":"shadowsocks","id":3006190,"avatar_url":"https://avatars.githubusercontent.com/u/3006190?v=3","gravatar_id":"","url":"https://api.github.com/users/shadowsocks","html_url":"https://github.com/shadowsocks","followers_url":"https://api.github.com/users/shadowsocks/followers","following_url":"https://api.github.com/users/shadowsocks/following{/other_user}","gists_url":"https://api.github.com/users/shadowsocks/gists{/gist_id}","starred_url":"https://api.github.com/users/shadowsocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadowsocks/subscriptions","organizations_url":"https://api.github.com/users/shadowsocks/orgs","repos_url":"https://api.github.com/users/shadowsocks/repos","events_url":"https://api.github.com/users/shadowsocks/events{/privacy}","received_events_url":"https://api.github.com/users/shadowsocks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shadowsocks/shadowsocks-libev","description":"libev port of shadowsocks","fork":true,"url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev","forks_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/forks","keys_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/teams","hooks_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/hooks","issue_events_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/events{/number}","events_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/events","assignees_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/assignees{/user}","branches_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/branches{/branch}","tags_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/tags","blobs_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/git/refs{/sha}","trees_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/statuses/{sha}","languages_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/languages","stargazers_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/stargazers","contributors_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/contributors","subscribers_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/subscribers","subscription_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/subscription","commits_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/commits{/sha}","git_commits_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/git/commits{/sha}","comments_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/comments{/number}","issue_comment_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/comments{/number}","contents_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/contents/{+path}","compare_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/merges","archive_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/downloads","issues_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues{/number}","pulls_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/pulls{/number}","milestones_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/milestones{/number}","notifications_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/labels{/name}","releases_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/releases{/id}","deployments_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/deployments","created_at":"2012-12-15T08:11:07Z","updated_at":"2016-04-19T05:18:48Z","pushed_at":"2016-04-19T05:52:05Z","git_url":"git://github.com/shadowsocks/shadowsocks-libev.git","ssh_url":"git@github.com:shadowsocks/shadowsocks-libev.git","clone_url":"https://github.com/shadowsocks/shadowsocks-libev.git","svn_url":"https://github.com/shadowsocks/shadowsocks-libev","homepage":"http://shadowsocks.org/en/download/servers.html","size":7749,"stargazers_count":2488,"watchers_count":2488,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1810,"mirror_url":null,"open_issues_count":1,"forks":1810,"open_issues":1,"watchers":2488,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/pulls/590"},"html":{"href":"https://github.com/shadowsocks/shadowsocks-libev/pull/590"},"issue":{"href":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/590"},"comments":{"href":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/590/comments"},"review_comments":{"href":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/pulls/590/comments"},"review_comment":{"href":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/pulls/590/commits"},"statuses":{"href":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/statuses/5ca2ecab6d54d44b6410dd6e449b24a3a8bf1ebb"}}}}