{"action":"opened","issue":{"url":"https://api.github.com/repos/getlantern/lantern/issues/2423","labels_url":"https://api.github.com/repos/getlantern/lantern/issues/2423/labels{/name}","comments_url":"https://api.github.com/repos/getlantern/lantern/issues/2423/comments","events_url":"https://api.github.com/repos/getlantern/lantern/issues/2423/events","html_url":"https://github.com/getlantern/lantern/issues/2423","id":69950397,"number":2423,"title":"Route HTTP traffic to trusted proxies only","user":{"login":"myleshorton","id":1143966,"avatar_url":"https://avatars.githubusercontent.com/u/1143966?v=3","gravatar_id":"","url":"https://api.github.com/users/myleshorton","html_url":"https://github.com/myleshorton","followers_url":"https://api.github.com/users/myleshorton/followers","following_url":"https://api.github.com/users/myleshorton/following{/other_user}","gists_url":"https://api.github.com/users/myleshorton/gists{/gist_id}","starred_url":"https://api.github.com/users/myleshorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myleshorton/subscriptions","organizations_url":"https://api.github.com/users/myleshorton/orgs","repos_url":"https://api.github.com/users/myleshorton/repos","events_url":"https://api.github.com/users/myleshorton/events{/privacy}","received_events_url":"https://api.github.com/users/myleshorton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/getlantern/lantern/milestones/88","html_url":"https://github.com/getlantern/lantern/milestones/2.0%20Beta%206","labels_url":"https://api.github.com/repos/getlantern/lantern/milestones/88/labels","id":1046270,"number":88,"title":"2.0 Beta 6","description":"","creator":{"login":"myleshorton","id":1143966,"avatar_url":"https://avatars.githubusercontent.com/u/1143966?v=3","gravatar_id":"","url":"https://api.github.com/users/myleshorton","html_url":"https://github.com/myleshorton","followers_url":"https://api.github.com/users/myleshorton/followers","following_url":"https://api.github.com/users/myleshorton/following{/other_user}","gists_url":"https://api.github.com/users/myleshorton/gists{/gist_id}","starred_url":"https://api.github.com/users/myleshorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myleshorton/subscriptions","organizations_url":"https://api.github.com/users/myleshorton/orgs","repos_url":"https://api.github.com/users/myleshorton/repos","events_url":"https://api.github.com/users/myleshorton/events{/privacy}","received_events_url":"https://api.github.com/users/myleshorton/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":7,"state":"open","created_at":"2015-03-31T04:24:47Z","updated_at":"2015-04-21T20:56:29Z","due_on":"2015-04-30T07:00:00Z","closed_at":null},"comments":0,"created_at":"2015-04-21T20:56:29Z","updated_at":"2015-04-21T20:56:29Z","closed_at":null,"body":"<a href=\"https://github.com/xiam\"><img src=\"https://avatars.githubusercontent.com/u/385670?v=3\" align=\"left\" width=\"96\" height=\"96\" hspace=\"10\"></img></a> **Issue by [xiam](https://github.com/xiam)**\n_Tuesday Apr 21, 2015 at 18:02 GMT_\n_Originally opened as https://github.com/getlantern/flashlight-build/pull/185_\n\n----\n\nThis PR adds support for routing plaintext HTTP traffic only to proxies deployed by Lantern, in this moment it may not represent any difference.\r\n\r\nHTTPs can travel safely along trusted and untrusted proxies without compromising user's data, as the protocol itself provides point to point encryption (well, point to Trusted Third Parties and eventually to point, but that's outside our scope).\r\n\r\nA new property `trusted` was added to our configuration settings, this feature depends on whether this flag is set true or not. If no servers marked as `trusted` are found Lantern will try to use any server (getting unsafe access is better than having no access at all).\r\n\r\nRouting an HTTP URL would produce a log like:\r\n\r\n```\r\ncurl -x 127.0.0.1:8787 http://www.google.com/humans.txt\r\n\r\nApr 21 19:56:19.621 - balancer: balancer.go:100 Dialing tcp://www.google.com:80 with (trusted) fronted proxy at nl.fallbacks.getiantem.org:443 using masquerade set cloudflare\r\n```\r\n\r\nWhile routing an HTTPs URL would look like:\r\n\r\n```\r\ncurl -x 127.0.0.1:8787 https://www.google.com/humans.txt\r\n\r\nApr 21 19:57:05.401 - balancer: balancer.go:100 Dialing tcp://s3.amazonaws.com:443 with chained proxy at 178.62.243.211:443\r\n```\r\n\r\nYou'll probably need to edit `lantern.yaml` manually to set the `trusted` field on fronted and chained proxies.\r\n\r\nI also added many comments on the code that would make it easier to understand what is each part trying to do and fixed a few minor bugs.\r\n\r\nSee our discussion at: https://github.com/getlantern/lantern/issues/2290\n\n----\n\n_**[xiam](https://github.com/xiam)** included the following code: https://github.com/getlantern/flashlight-build/pull/185/commits_\n"}}