{"action":"created","comment":{"url":"https://api.github.com/repos/getlantern/lantern/pulls/comments/38816299","id":38816299,"diff_hunk":"@@ -0,0 +1,83 @@\n+# genconfig\n+\n+**Generate the YAML file and embedded Go datastructures containing the network configuration for the Lantern client**\n+\n+\n+## How it works\n+\n+Config generation currently follows this approach:\n+\n+1. Build a *model*, a complete list of working chained servers, masquerades and proxied sites.\n+\n+1. Fill the Go code templates (*.go), based on the model.\n+\n+1. Fill the YAML template, based on the model. The YAML template already has filled in the LFS round-robin (flashlight servers for domain fronting).\n+\n+## Using genconfig\n+\n+### Setup\n+\n+You need the s3cmd tool installed and set up.  To install on Ubuntu:\n+\n+```bash\n+sudo apt-get install s3cmd\n+```\n+\n+On OS X:\n+\n+```bash\n+brew install s3cmd\n+```\n+\n+And then run `s3cmd --configure` and follow the on-screen instructions.  You\n+can get AWS credentials that are good for uploading to S3 in\n+[too-many-secrets/lantern_aws/aws_credential](https://github.com/getlantern/too-many-secrets/blob/master/lantern_aws/aws_credential).\n+\n+### Managing masquerade hosts\n+\n+The file domains.txt contains the list of masquerade hosts we use, and\n+blacklist.txt contains a list of blacklisted domains that we exclude even if\n+present in domains.txt.\n+\n+To alter the list of domains or blacklist:\n+\n+1. Edit [`domains.txt`](genconfig/domains.txt) and/or [`blacklist.txt`](genconfig/blacklist.txt)\n+2. `go run genconfig.go -domains domains.txt -blacklist blacklist.txt`.\n+3. Commit the changed [`masquerades.go`](config/masquerades.go) and [`cloud.yaml`](genconfig/cloud.yaml) to git if you want.\n+4. *[Deprecated: we are not doing it any more]* Upload cloud.yaml to s3 using [`udpateyaml.bash`](genconfig/updateyaml.bash) if you want.\n+\n+### Managing proxied sites\n+\n+Lists of proxied sites are expected to live as text files in a directory, one\n+domain per line.  You provide this directory to `genconfig` with the `-proxiedsites` argument.\n+\n+### Managing chained proxies\n+\n+The IPs, access tokens, and other details that clients need in order to\n+connect to the chained (that is, non-fronted) proxies we run are contained in\n+a JSON file that normally lives in `genconfig/fallbacks.json` and is fed to\n+`genconfig` with the optional `-fallbacks` argument.\n+\n+You only to concern yourself with this when the list of chained proxies\n+changes (e.g., when we launch or kill some server).  To learn how to reenerate\n+the `fallbacks.json` file in that case, see [the relevant\n+section](https://github.com/getlantern/lantern_aws#regenerating-flashlightgenconfigfallbackjson)\n+of the README of the lantern_aws project.\n+\n+### Uploading to Redis\n+\n+To add a bunch of servers to the queue of a datacenter, so they'll get pulled by the config server as necessary,\n+\n+- Compile a fallbacks.json that only includes the given servers.  The quickest way to do this would be to generate the fallbacks.json with a prefix that only includes these servers.\n+\n+- Generate a cloud.yaml from this fallbacks.json, as explained above.","path":"src/github.com/getlantern/flashlight/genconfig/README.md","position":73,"original_position":73,"commit_id":"ce1c9e7513ea9cc6b2ebb10b8d438d1dc20b8063","original_commit_id":"ce1c9e7513ea9cc6b2ebb10b8d438d1dc20b8063","user":{"login":"aranhoide","id":2204867,"avatar_url":"https://avatars.githubusercontent.com/u/2204867?v=3","gravatar_id":"","url":"https://api.github.com/users/aranhoide","html_url":"https://github.com/aranhoide","followers_url":"https://api.github.com/users/aranhoide/followers","following_url":"https://api.github.com/users/aranhoide/following{/other_user}","gists_url":"https://api.github.com/users/aranhoide/gists{/gist_id}","starred_url":"https://api.github.com/users/aranhoide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aranhoide/subscriptions","organizations_url":"https://api.github.com/users/aranhoide/orgs","repos_url":"https://api.github.com/users/aranhoide/repos","events_url":"https://api.github.com/users/aranhoide/events{/privacy}","received_events_url":"https://api.github.com/users/aranhoide/received_events","type":"User","site_admin":false},"body":"Unless you pass the `--srv` option, (which as I've just said, you shouldn't anymore), then the chained fallbacks are ignored.  I think this part of the docs should be removed or moved to a more marginal section.","created_at":"2015-09-06T00:56:19Z","updated_at":"2015-09-06T00:56:19Z","html_url":"https://github.com/getlantern/lantern/pull/3102#discussion_r38816299","pull_request_url":"https://api.github.com/repos/getlantern/lantern/pulls/3102","_links":{"self":{"href":"https://api.github.com/repos/getlantern/lantern/pulls/comments/38816299"},"html":{"href":"https://github.com/getlantern/lantern/pull/3102#discussion_r38816299"},"pull_request":{"href":"https://api.github.com/repos/getlantern/lantern/pulls/3102"}}},"pull_request":{"url":"https://api.github.com/repos/getlantern/lantern/pulls/3102","id":44291922,"html_url":"https://github.com/getlantern/lantern/pull/3102","diff_url":"https://github.com/getlantern/lantern/pull/3102.diff","patch_url":"https://github.com/getlantern/lantern/pull/3102.patch","issue_url":"https://api.github.com/repos/getlantern/lantern/issues/3102","number":3102,"state":"open","locked":false,"title":"Updated READMEs for config process","user":{"login":"uaalto","id":12701448,"avatar_url":"https://avatars.githubusercontent.com/u/12701448?v=3","gravatar_id":"","url":"https://api.github.com/users/uaalto","html_url":"https://github.com/uaalto","followers_url":"https://api.github.com/users/uaalto/followers","following_url":"https://api.github.com/users/uaalto/following{/other_user}","gists_url":"https://api.github.com/users/uaalto/gists{/gist_id}","starred_url":"https://api.github.com/users/uaalto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uaalto/subscriptions","organizations_url":"https://api.github.com/users/uaalto/orgs","repos_url":"https://api.github.com/users/uaalto/repos","events_url":"https://api.github.com/users/uaalto/events{/privacy}","received_events_url":"https://api.github.com/users/uaalto/received_events","type":"User","site_admin":false},"body":"Along https://github.com/getlantern/config-server/pull/1/files closes #3098 ","created_at":"2015-09-05T23:14:13Z","updated_at":"2015-09-06T00:56:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a9ca9cb1acff4749135f697583c29379aa5c8240","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/getlantern/lantern/pulls/3102/commits","review_comments_url":"https://api.github.com/repos/getlantern/lantern/pulls/3102/comments","review_comment_url":"https://api.github.com/repos/getlantern/lantern/pulls/comments{/number}","comments_url":"https://api.github.com/repos/getlantern/lantern/issues/3102/comments","statuses_url":"https://api.github.com/repos/getlantern/lantern/statuses/ce1c9e7513ea9cc6b2ebb10b8d438d1dc20b8063","head":{"label":"getlantern:issue-3098","ref":"issue-3098","sha":"ce1c9e7513ea9cc6b2ebb10b8d438d1dc20b8063","user":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?v=3","gravatar_id":"","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"repo":{"id":1380117,"name":"lantern","full_name":"getlantern/lantern","owner":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?v=3","gravatar_id":"","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getlantern/lantern","description":"Open Internet for everyone. Lantern is a free desktop application that delivers fast, reliable and secure access to the open Internet for users in censored regions. It uses a variety of techniques to stay unblocked, including P2P and domain fronting. Lantern relies on users in uncensored regions acting as access points to the open Internet.","fork":false,"url":"https://api.github.com/repos/getlantern/lantern","forks_url":"https://api.github.com/repos/getlantern/lantern/forks","keys_url":"https://api.github.com/repos/getlantern/lantern/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getlantern/lantern/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getlantern/lantern/teams","hooks_url":"https://api.github.com/repos/getlantern/lantern/hooks","issue_events_url":"https://api.github.com/repos/getlantern/lantern/issues/events{/number}","events_url":"https://api.github.com/repos/getlantern/lantern/events","assignees_url":"https://api.github.com/repos/getlantern/lantern/assignees{/user}","branches_url":"https://api.github.com/repos/getlantern/lantern/branches{/branch}","tags_url":"https://api.github.com/repos/getlantern/lantern/tags","blobs_url":"https://api.github.com/repos/getlantern/lantern/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getlantern/lantern/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getlantern/lantern/git/refs{/sha}","trees_url":"https://api.github.com/repos/getlantern/lantern/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getlantern/lantern/statuses/{sha}","languages_url":"https://api.github.com/repos/getlantern/lantern/languages","stargazers_url":"https://api.github.com/repos/getlantern/lantern/stargazers","contributors_url":"https://api.github.com/repos/getlantern/lantern/contributors","subscribers_url":"https://api.github.com/repos/getlantern/lantern/subscribers","subscription_url":"https://api.github.com/repos/getlantern/lantern/subscription","commits_url":"https://api.github.com/repos/getlantern/lantern/commits{/sha}","git_commits_url":"https://api.github.com/repos/getlantern/lantern/git/commits{/sha}","comments_url":"https://api.github.com/repos/getlantern/lantern/comments{/number}","issue_comment_url":"https://api.github.com/repos/getlantern/lantern/issues/comments{/number}","contents_url":"https://api.github.com/repos/getlantern/lantern/contents/{+path}","compare_url":"https://api.github.com/repos/getlantern/lantern/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getlantern/lantern/merges","archive_url":"https://api.github.com/repos/getlantern/lantern/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getlantern/lantern/downloads","issues_url":"https://api.github.com/repos/getlantern/lantern/issues{/number}","pulls_url":"https://api.github.com/repos/getlantern/lantern/pulls{/number}","milestones_url":"https://api.github.com/repos/getlantern/lantern/milestones{/number}","notifications_url":"https://api.github.com/repos/getlantern/lantern/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getlantern/lantern/labels{/name}","releases_url":"https://api.github.com/repos/getlantern/lantern/releases{/id}","created_at":"2011-02-17T22:12:29Z","updated_at":"2015-09-06T00:54:57Z","pushed_at":"2015-09-05T23:14:13Z","git_url":"git://github.com/getlantern/lantern.git","ssh_url":"git@github.com:getlantern/lantern.git","clone_url":"https://github.com/getlantern/lantern.git","svn_url":"https://github.com/getlantern/lantern","homepage":"https://getlantern.org","size":946015,"stargazers_count":5682,"watchers_count":5682,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1041,"mirror_url":null,"open_issues_count":359,"forks":1041,"open_issues":359,"watchers":5682,"default_branch":"valencia"}},"base":{"label":"getlantern:valencia","ref":"valencia","sha":"ce6b7a2e57a625a0902cbf1b6733e586e01b603d","user":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?v=3","gravatar_id":"","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"repo":{"id":1380117,"name":"lantern","full_name":"getlantern/lantern","owner":{"login":"getlantern","id":624178,"avatar_url":"https://avatars.githubusercontent.com/u/624178?v=3","gravatar_id":"","url":"https://api.github.com/users/getlantern","html_url":"https://github.com/getlantern","followers_url":"https://api.github.com/users/getlantern/followers","following_url":"https://api.github.com/users/getlantern/following{/other_user}","gists_url":"https://api.github.com/users/getlantern/gists{/gist_id}","starred_url":"https://api.github.com/users/getlantern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getlantern/subscriptions","organizations_url":"https://api.github.com/users/getlantern/orgs","repos_url":"https://api.github.com/users/getlantern/repos","events_url":"https://api.github.com/users/getlantern/events{/privacy}","received_events_url":"https://api.github.com/users/getlantern/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getlantern/lantern","description":"Open Internet for everyone. Lantern is a free desktop application that delivers fast, reliable and secure access to the open Internet for users in censored regions. It uses a variety of techniques to stay unblocked, including P2P and domain fronting. Lantern relies on users in uncensored regions acting as access points to the open Internet.","fork":false,"url":"https://api.github.com/repos/getlantern/lantern","forks_url":"https://api.github.com/repos/getlantern/lantern/forks","keys_url":"https://api.github.com/repos/getlantern/lantern/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getlantern/lantern/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getlantern/lantern/teams","hooks_url":"https://api.github.com/repos/getlantern/lantern/hooks","issue_events_url":"https://api.github.com/repos/getlantern/lantern/issues/events{/number}","events_url":"https://api.github.com/repos/getlantern/lantern/events","assignees_url":"https://api.github.com/repos/getlantern/lantern/assignees{/user}","branches_url":"https://api.github.com/repos/getlantern/lantern/branches{/branch}","tags_url":"https://api.github.com/repos/getlantern/lantern/tags","blobs_url":"https://api.github.com/repos/getlantern/lantern/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getlantern/lantern/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getlantern/lantern/git/refs{/sha}","trees_url":"https://api.github.com/repos/getlantern/lantern/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getlantern/lantern/statuses/{sha}","languages_url":"https://api.github.com/repos/getlantern/lantern/languages","stargazers_url":"https://api.github.com/repos/getlantern/lantern/stargazers","contributors_url":"https://api.github.com/repos/getlantern/lantern/contributors","subscribers_url":"https://api.github.com/repos/getlantern/lantern/subscribers","subscription_url":"https://api.github.com/repos/getlantern/lantern/subscription","commits_url":"https://api.github.com/repos/getlantern/lantern/commits{/sha}","git_commits_url":"https://api.github.com/repos/getlantern/lantern/git/commits{/sha}","comments_url":"https://api.github.com/repos/getlantern/lantern/comments{/number}","issue_comment_url":"https://api.github.com/repos/getlantern/lantern/issues/comments{/number}","contents_url":"https://api.github.com/repos/getlantern/lantern/contents/{+path}","compare_url":"https://api.github.com/repos/getlantern/lantern/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getlantern/lantern/merges","archive_url":"https://api.github.com/repos/getlantern/lantern/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getlantern/lantern/downloads","issues_url":"https://api.github.com/repos/getlantern/lantern/issues{/number}","pulls_url":"https://api.github.com/repos/getlantern/lantern/pulls{/number}","milestones_url":"https://api.github.com/repos/getlantern/lantern/milestones{/number}","notifications_url":"https://api.github.com/repos/getlantern/lantern/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getlantern/lantern/labels{/name}","releases_url":"https://api.github.com/repos/getlantern/lantern/releases{/id}","created_at":"2011-02-17T22:12:29Z","updated_at":"2015-09-06T00:54:57Z","pushed_at":"2015-09-05T23:14:13Z","git_url":"git://github.com/getlantern/lantern.git","ssh_url":"git@github.com:getlantern/lantern.git","clone_url":"https://github.com/getlantern/lantern.git","svn_url":"https://github.com/getlantern/lantern","homepage":"https://getlantern.org","size":946015,"stargazers_count":5682,"watchers_count":5682,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1041,"mirror_url":null,"open_issues_count":359,"forks":1041,"open_issues":359,"watchers":5682,"default_branch":"valencia"}},"_links":{"self":{"href":"https://api.github.com/repos/getlantern/lantern/pulls/3102"},"html":{"href":"https://github.com/getlantern/lantern/pull/3102"},"issue":{"href":"https://api.github.com/repos/getlantern/lantern/issues/3102"},"comments":{"href":"https://api.github.com/repos/getlantern/lantern/issues/3102/comments"},"review_comments":{"href":"https://api.github.com/repos/getlantern/lantern/pulls/3102/comments"},"review_comment":{"href":"https://api.github.com/repos/getlantern/lantern/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/getlantern/lantern/pulls/3102/commits"},"statuses":{"href":"https://api.github.com/repos/getlantern/lantern/statuses/ce1c9e7513ea9cc6b2ebb10b8d438d1dc20b8063"}}}}