{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/vert.x/pulls/comments/64457825","id":64457825,"diff_hunk":"@@ -0,0 +1,181 @@\n+/*\n+ * Copyright (c) 2011-2014 The original author or authors\n+ * ------------------------------------------------------\n+ * All rights reserved. This program and the accompanying materials\n+ * are made available under the terms of the Eclipse Public License v1.0\n+ * and Apache License v2.0 which accompanies this distribution.\n+ *\n+ *     The Eclipse Public License is available at\n+ *     http://www.eclipse.org/legal/epl-v10.html\n+ *\n+ *     The Apache License v2.0 is available at\n+ *     http://www.opensource.org/licenses/apache2.0.php\n+ *\n+ * You may elect to redistribute this code under either of these licenses.\n+ */\n+\n+package io.vertx.core.net;\n+\n+import java.util.Objects;\n+\n+import io.vertx.codegen.annotations.DataObject;\n+import io.vertx.core.json.JsonObject;\n+\n+/**\n+ * Proxy options for a NetClient or HttpClient\n+ * @author <a href=\"http://oss.lehmann.cx/\">Alexander Lehmann</a>\n+ */\n+@DataObject(generateConverter = true)\n+public class ProxyOptions implements Cloneable {\n+\n+  private String proxyHost;\n+  private int proxyPort;\n+  private String proxyUsername;\n+  private String proxyPassword;\n+  private ProxyType proxyType;\n+\n+  /**\n+   * Default constructor.\n+   */\n+  public ProxyOptions() {\n+    proxyHost = \"localhost\";\n+    proxyPort = 3128;\n+    proxyUsername = null;\n+    proxyPassword = null;\n+    proxyType = ProxyType.HTTP;\n+  }\n+\n+  /**\n+   * Copy constructor.\n+   *\n+   * @param other  the options to copy\n+   */\n+  public ProxyOptions(ProxyOptions other) {\n+    proxyHost = other.getProxyHost();\n+    proxyPort = other.getProxyPort();\n+    proxyUsername = other.getProxyUsername();\n+    proxyPassword = other.getProxyPassword();\n+    proxyType = other.getProxyType();\n+  }\n+\n+  /**\n+   * Create options from JSON.\n+   *\n+   * @param json  the JSON\n+   */\n+  public ProxyOptions(JsonObject json) {\n+    this();\n+    ProxyOptionsConverter.fromJson(json, this);\n+  }\n+\n+  /**\n+   * Get proxy host.\n+   *\n+   * @return  proxy hosts\n+   */\n+  public String getProxyHost() {\n+    return proxyHost;\n+  }\n+\n+  /**\n+   * Set proxy host.\n+   *\n+   * @param proxyHost the proxy host to connect to\n+   * @return a reference to this, so the API can be used fluently\n+   */\n+  public ProxyOptions setProxyHost(String proxyHost) {\n+    this.proxyHost = proxyHost;\n+    return this;\n+  }\n+\n+  /**\n+   * Get proxy port.\n+   *\n+   * @return  proxy port\n+   */\n+  public int getProxyPort() {\n+    return proxyPort;\n+  }\n+\n+  /**\n+   * Set proxy port.\n+   *\n+   * @param proxyPort the proxy port to connect to\n+   * @return a reference to this, so the API can be used fluently\n+   */\n+  public ProxyOptions setProxyPort(int proxyPort) {\n+    this.proxyPort = proxyPort;\n+    return this;\n+  }\n+\n+  /**\n+   * Get proxy username.\n+   *\n+   * @return  proxy username\n+   */\n+  public String getProxyUsername() {\n+    return proxyUsername;\n+  }\n+\n+  /**\n+   * Set proxy username.\n+   *\n+   * @param proxyUsername the proxy username\n+   * @return a reference to this, so the API can be used fluently\n+   */\n+  public ProxyOptions setProxyUsername(String proxyUsername) {\n+    this.proxyUsername = proxyUsername;\n+    return this;\n+  }\n+\n+  /**\n+   * Get proxy password.\n+   *\n+   * @return  proxy password\n+   */\n+  public String getProxyPassword() {\n+    return proxyPassword;\n+  }\n+\n+  /**\n+   * Set proxy password.\n+   *\n+   * @param proxyPassword the proxy password\n+   * @return a reference to this, so the API can be used fluently\n+   */\n+  public ProxyOptions setProxyPassword(String proxyPassword) {\n+    this.proxyPassword = proxyPassword;\n+    return this;\n+  }\n+\n+  /**\n+   * Get proxy type.\n+   *\n+   *<p>ProxyType can be HTTP, SOCKS4 and SOCKS5\n+   *\n+   * @return  proxy type\n+   */\n+  public ProxyType getProxyType() {\n+    return proxyType;\n+  }\n+\n+  /**\n+   * Set proxy type.\n+   *\n+   * <p>ProxyType can be HTTP, SOCKS4 and SOCKS5\n+   *\n+   * @param proxyType the proxy type to connect to\n+   * @return a reference to this, so the API can be used fluently\n+   */\n+  public ProxyOptions setProxyType(ProxyType proxyType) {\n+    Objects.requireNonNull(proxyType, \"ProxyType may not be null\");\n+    this.proxyType = proxyType;\n+    return this;\n+  }\n+\n+  @Override\n+  public ProxyOptions clone() {","path":"src/main/java/io/vertx/core/net/ProxyOptions.java","position":177,"original_position":177,"commit_id":"c57271321cea0853b62fe9b5d687d8e36b3e5553","original_commit_id":"c57271321cea0853b62fe9b5d687d8e36b3e5553","user":{"login":"vietj","id":225674,"avatar_url":"https://avatars.githubusercontent.com/u/225674?v=3","gravatar_id":"","url":"https://api.github.com/users/vietj","html_url":"https://github.com/vietj","followers_url":"https://api.github.com/users/vietj/followers","following_url":"https://api.github.com/users/vietj/following{/other_user}","gists_url":"https://api.github.com/users/vietj/gists{/gist_id}","starred_url":"https://api.github.com/users/vietj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vietj/subscriptions","organizations_url":"https://api.github.com/users/vietj/orgs","repos_url":"https://api.github.com/users/vietj/repos","events_url":"https://api.github.com/users/vietj/events{/privacy}","received_events_url":"https://api.github.com/users/vietj/received_events","type":"User","site_admin":false},"body":"should use copy constructor, it's the common idiom for Vert.x data objects","created_at":"2016-05-24T19:24:42Z","updated_at":"2016-05-24T19:24:42Z","html_url":"https://github.com/eclipse/vert.x/pull/1435#discussion_r64457825","pull_request_url":"https://api.github.com/repos/eclipse/vert.x/pulls/1435","_links":{"self":{"href":"https://api.github.com/repos/eclipse/vert.x/pulls/comments/64457825"},"html":{"href":"https://github.com/eclipse/vert.x/pull/1435#discussion_r64457825"},"pull_request":{"href":"https://api.github.com/repos/eclipse/vert.x/pulls/1435"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/vert.x/pulls/1435","id":71134448,"html_url":"https://github.com/eclipse/vert.x/pull/1435","diff_url":"https://github.com/eclipse/vert.x/pull/1435.diff","patch_url":"https://github.com/eclipse/vert.x/pull/1435.patch","issue_url":"https://api.github.com/repos/eclipse/vert.x/issues/1435","number":1435,"state":"open","locked":false,"title":"issue#101: Socks 4/5 Proxy handler in NetClient","user":{"login":"alexlehm","id":156144,"avatar_url":"https://avatars.githubusercontent.com/u/156144?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlehm","html_url":"https://github.com/alexlehm","followers_url":"https://api.github.com/users/alexlehm/followers","following_url":"https://api.github.com/users/alexlehm/following{/other_user}","gists_url":"https://api.github.com/users/alexlehm/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlehm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlehm/subscriptions","organizations_url":"https://api.github.com/users/alexlehm/orgs","repos_url":"https://api.github.com/users/alexlehm/repos","events_url":"https://api.github.com/users/alexlehm/events{/privacy}","received_events_url":"https://api.github.com/users/alexlehm/received_events","type":"User","site_admin":false},"body":"fixes https://github.com/vert-x3/issues/issues/101\r\n\r\nadd SOCKS proxy support to HttpClient and NetClient\r\nchanged proxy options into a ProxyObject class\r\nadd small socks4/5 proxy for testing\r\nmove proxyOptions property to ClientOptionsBase\r\nadd unit tests\r\nadd missing ctx.fireXXX in VertxHandler\r\nmove ProxyChannelProvider to its own package\r\nadd classnotfound check to NetClientImpl\r\nadd to documentation about proxy config\r\n","created_at":"2016-05-23T23:03:00Z","updated_at":"2016-05-24T19:24:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51fa6f042c0189a1d08e81549705327c930d4893","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/vert.x/pulls/1435/commits","review_comments_url":"https://api.github.com/repos/eclipse/vert.x/pulls/1435/comments","review_comment_url":"https://api.github.com/repos/eclipse/vert.x/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/vert.x/issues/1435/comments","statuses_url":"https://api.github.com/repos/eclipse/vert.x/statuses/c57271321cea0853b62fe9b5d687d8e36b3e5553","head":{"label":"alexlehm:issues/#101-socks45-squashed","ref":"issues/#101-socks45-squashed","sha":"c57271321cea0853b62fe9b5d687d8e36b3e5553","user":{"login":"alexlehm","id":156144,"avatar_url":"https://avatars.githubusercontent.com/u/156144?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlehm","html_url":"https://github.com/alexlehm","followers_url":"https://api.github.com/users/alexlehm/followers","following_url":"https://api.github.com/users/alexlehm/following{/other_user}","gists_url":"https://api.github.com/users/alexlehm/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlehm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlehm/subscriptions","organizations_url":"https://api.github.com/users/alexlehm/orgs","repos_url":"https://api.github.com/users/alexlehm/repos","events_url":"https://api.github.com/users/alexlehm/events{/privacy}","received_events_url":"https://api.github.com/users/alexlehm/received_events","type":"User","site_admin":false},"repo":{"id":18156124,"name":"vert.x","full_name":"alexlehm/vert.x","owner":{"login":"alexlehm","id":156144,"avatar_url":"https://avatars.githubusercontent.com/u/156144?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlehm","html_url":"https://github.com/alexlehm","followers_url":"https://api.github.com/users/alexlehm/followers","following_url":"https://api.github.com/users/alexlehm/following{/other_user}","gists_url":"https://api.github.com/users/alexlehm/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlehm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlehm/subscriptions","organizations_url":"https://api.github.com/users/alexlehm/orgs","repos_url":"https://api.github.com/users/alexlehm/repos","events_url":"https://api.github.com/users/alexlehm/events{/privacy}","received_events_url":"https://api.github.com/users/alexlehm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexlehm/vert.x","description":"vert.x - The scalable polyglot application platform for the JVM","fork":true,"url":"https://api.github.com/repos/alexlehm/vert.x","forks_url":"https://api.github.com/repos/alexlehm/vert.x/forks","keys_url":"https://api.github.com/repos/alexlehm/vert.x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexlehm/vert.x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexlehm/vert.x/teams","hooks_url":"https://api.github.com/repos/alexlehm/vert.x/hooks","issue_events_url":"https://api.github.com/repos/alexlehm/vert.x/issues/events{/number}","events_url":"https://api.github.com/repos/alexlehm/vert.x/events","assignees_url":"https://api.github.com/repos/alexlehm/vert.x/assignees{/user}","branches_url":"https://api.github.com/repos/alexlehm/vert.x/branches{/branch}","tags_url":"https://api.github.com/repos/alexlehm/vert.x/tags","blobs_url":"https://api.github.com/repos/alexlehm/vert.x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexlehm/vert.x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexlehm/vert.x/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexlehm/vert.x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexlehm/vert.x/statuses/{sha}","languages_url":"https://api.github.com/repos/alexlehm/vert.x/languages","stargazers_url":"https://api.github.com/repos/alexlehm/vert.x/stargazers","contributors_url":"https://api.github.com/repos/alexlehm/vert.x/contributors","subscribers_url":"https://api.github.com/repos/alexlehm/vert.x/subscribers","subscription_url":"https://api.github.com/repos/alexlehm/vert.x/subscription","commits_url":"https://api.github.com/repos/alexlehm/vert.x/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexlehm/vert.x/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexlehm/vert.x/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexlehm/vert.x/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexlehm/vert.x/contents/{+path}","compare_url":"https://api.github.com/repos/alexlehm/vert.x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexlehm/vert.x/merges","archive_url":"https://api.github.com/repos/alexlehm/vert.x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexlehm/vert.x/downloads","issues_url":"https://api.github.com/repos/alexlehm/vert.x/issues{/number}","pulls_url":"https://api.github.com/repos/alexlehm/vert.x/pulls{/number}","milestones_url":"https://api.github.com/repos/alexlehm/vert.x/milestones{/number}","notifications_url":"https://api.github.com/repos/alexlehm/vert.x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexlehm/vert.x/labels{/name}","releases_url":"https://api.github.com/repos/alexlehm/vert.x/releases{/id}","deployments_url":"https://api.github.com/repos/alexlehm/vert.x/deployments","created_at":"2014-03-26T22:24:48Z","updated_at":"2016-04-17T15:56:48Z","pushed_at":"2016-05-23T22:14:51Z","git_url":"git://github.com/alexlehm/vert.x.git","ssh_url":"git@github.com:alexlehm/vert.x.git","clone_url":"https://github.com/alexlehm/vert.x.git","svn_url":"https://github.com/alexlehm/vert.x","homepage":"http://vertx.io","size":95137,"stargazers_count":1,"watchers_count":1,"language":"Java","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":1,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"03a493fd255f41a9476ff8fa8cbcdbf78fe20db8","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":1911523,"name":"vert.x","full_name":"eclipse/vert.x","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/vert.x","description":"Vert.x is a tool-kit for building reactive applications on the JVM","fork":false,"url":"https://api.github.com/repos/eclipse/vert.x","forks_url":"https://api.github.com/repos/eclipse/vert.x/forks","keys_url":"https://api.github.com/repos/eclipse/vert.x/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/vert.x/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/vert.x/teams","hooks_url":"https://api.github.com/repos/eclipse/vert.x/hooks","issue_events_url":"https://api.github.com/repos/eclipse/vert.x/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/vert.x/events","assignees_url":"https://api.github.com/repos/eclipse/vert.x/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/vert.x/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/vert.x/tags","blobs_url":"https://api.github.com/repos/eclipse/vert.x/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/vert.x/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/vert.x/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/vert.x/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/vert.x/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/vert.x/languages","stargazers_url":"https://api.github.com/repos/eclipse/vert.x/stargazers","contributors_url":"https://api.github.com/repos/eclipse/vert.x/contributors","subscribers_url":"https://api.github.com/repos/eclipse/vert.x/subscribers","subscription_url":"https://api.github.com/repos/eclipse/vert.x/subscription","commits_url":"https://api.github.com/repos/eclipse/vert.x/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/vert.x/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/vert.x/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/vert.x/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/vert.x/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/vert.x/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/vert.x/merges","archive_url":"https://api.github.com/repos/eclipse/vert.x/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/vert.x/downloads","issues_url":"https://api.github.com/repos/eclipse/vert.x/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/vert.x/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/vert.x/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/vert.x/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/vert.x/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/vert.x/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/vert.x/deployments","created_at":"2011-06-17T14:54:55Z","updated_at":"2016-05-24T16:27:57Z","pushed_at":"2016-05-24T17:09:40Z","git_url":"git://github.com/eclipse/vert.x.git","ssh_url":"git@github.com:eclipse/vert.x.git","clone_url":"https://github.com/eclipse/vert.x.git","svn_url":"https://github.com/eclipse/vert.x","homepage":"http://vertx.io","size":366201,"stargazers_count":4807,"watchers_count":4807,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":937,"mirror_url":null,"open_issues_count":73,"forks":937,"open_issues":73,"watchers":4807,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/vert.x/pulls/1435"},"html":{"href":"https://github.com/eclipse/vert.x/pull/1435"},"issue":{"href":"https://api.github.com/repos/eclipse/vert.x/issues/1435"},"comments":{"href":"https://api.github.com/repos/eclipse/vert.x/issues/1435/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/vert.x/pulls/1435/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/vert.x/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/vert.x/pulls/1435/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/vert.x/statuses/c57271321cea0853b62fe9b5d687d8e36b3e5553"}}}}
{"actor":{"display_login":"vietj"}}