{"action":"created","comment":{"url":"https://api.github.com/repos/getlantern/lantern_aws/pulls/comments/66184549","id":66184549,"diff_hunk":"@@ -40,12 +41,21 @@ def add_http_access_data(d_out):\n def add_obfs4_access_data(d_out):\n     d_out['pluggabletransport'] = 'obfs4'\n     p = re.compile('Bridge obfs4.+cert=([^ ]+) iat-mode=([0-9])')\n-    with open('obfs4_bridgeline.txt') as f:\n-        for line in f:\n-            m = p.match(line)\n-            if m:\n-                d_out['cert'] = m.group(1)\n-                d_out['pluggabletransportsettings'] = {'iat-mode': m.group(2)}\n+    for i in range(0, 10):\n+        time.sleep(2)\n+        try:\n+            with open('obfs4_bridgeline.txt') as f:\n+                for line in f:\n+                    m = p.match(line)\n+                    if m:\n+                        d_out['cert'] = m.group(1)\n+                        d_out['pluggabletransportsettings'] = {'iat-mode': m.group(2)}\n+                return\n+        except Exception, e:\n+            if i == 9:\n+                # Last pass, log exception\n+                logging.exception(e)","path":"salt/http_proxy/save_access_data.py","position":null,"original_position":31,"commit_id":"ead2d9464e9f472edfb073c95434d12910734c1d","original_commit_id":"bb59ec68fa8fb45c044c7ed7b85a39ed1fb6c93a","user":{"login":"oxtoacart","id":5000654,"avatar_url":"https://avatars.githubusercontent.com/u/5000654?v=3","gravatar_id":"","url":"https://api.github.com/users/oxtoacart","html_url":"https://github.com/oxtoacart","followers_url":"https://api.github.com/users/oxtoacart/followers","following_url":"https://api.github.com/users/oxtoacart/following{/other_user}","gists_url":"https://api.github.com/users/oxtoacart/gists{/gist_id}","starred_url":"https://api.github.com/users/oxtoacart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxtoacart/subscriptions","organizations_url":"https://api.github.com/users/oxtoacart/orgs","repos_url":"https://api.github.com/users/oxtoacart/repos","events_url":"https://api.github.com/users/oxtoacart/events{/privacy}","received_events_url":"https://api.github.com/users/oxtoacart/received_events","type":"User","site_admin":false},"body":"Oh yeah, good point.  Fixed.","created_at":"2016-06-08T02:30:38Z","updated_at":"2016-06-08T02:30:38Z","html_url":"https://github.com/getlantern/lantern_aws/pull/218#discussion_r66184549","pull_request_url":"https://api.github.com/repos/getlantern/lantern_aws/pulls/218","_links":{"self":{"href":"https://api.github.com/repos/getlantern/lantern_aws/pulls/comments/66184549"},"html":{"href":"https://github.com/getlantern/lantern_aws/pull/218#discussion_r66184549"},"pull_request":{"href":"https://api.github.com/repos/getlantern/lantern_aws/pulls/218"}}},"pull_request":{"url":"https://api.github.com/repos/getlantern/lantern_aws/pulls/218","id":72941862,"html_url":"https://github.com/getlantern/lantern_aws/pull/218","diff_url":"https://github.com/getlantern/lantern_aws/pull/218.diff","patch_url":"https://github.com/getlantern/lantern_aws/pull/218.patch","issue_url":"https://api.github.com/repos/getlantern/lantern_aws/issues/218","number":218,"state":"open","locked":false,"title":"Add randomization of proxy protocol and port","user":{"login":"oxtoacart","id":5000654,"avatar_url":"https://avatars.githubusercontent.com/u/5000654?v=3","gravatar_id":"","url":"https://api.github.com/users/oxtoacart","html_url":"https://github.com/oxtoacart","followers_url":"https://api.github.com/users/oxtoacart/followers","following_url":"https://api.github.com/users/oxtoacart/following{/other_user}","gists_url":"https://api.github.com/users/oxtoacart/gists{/gist_id}","starred_url":"https://api.github.com/users/oxtoacart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oxtoacart/subscriptions","organizations_url":"https://api.github.com/users/oxtoacart/orgs","repos_url":"https://api.github.com/users/oxtoacart/repos","events_url":"https://api.github.com/users/oxtoacart/events{/privacy}","received_events_url":"https://api.github.com/users/oxtoacart/received_events","type":"User","site_admin":false},"body":"I've tested that manually configuring the proxy_port and obfs4_port has the desired effect after running state.highstate on the proxy.  I've also added the code in refill_srvq.py to randomize the configuration for new proxies, but for the life of me I couldn't figure out how to get something into the queue that the script would read.  @aranhoide do you mind testing that piece of it?\r\n\r\ncc: @myleshorton ","created_at":"2016-06-07T20:23:32Z","updated_at":"2016-06-08T02:30:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"249cc061acf49361f842a3dc233ed38acc784f52","assignee":{"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},"milestone":null,"commits_url":"https://api.github.com/repos/getlantern/lantern_aws/pulls/218/commits","review_comments_url":"https://api.github.com/repos/getlantern/lantern_aws/pulls/218/comments","review_comment_url":"https://api.github.com/repos/getlantern/lantern_aws/pulls/comments{/number}","comments_url":"https://api.github.com/repos/getlantern/lantern_aws/issues/218/comments","statuses_url":"https://api.github.com/repos/getlantern/lantern_aws/statuses/ead2d9464e9f472edfb073c95434d12910734c1d","head":{"label":"getlantern:issue8","ref":"issue8","sha":"ead2d9464e9f472edfb073c95434d12910734c1d","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":5247106,"name":"lantern_aws","full_name":"getlantern/lantern_aws","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_aws","description":"AWS utilities and Salt configuration","fork":false,"url":"https://api.github.com/repos/getlantern/lantern_aws","forks_url":"https://api.github.com/repos/getlantern/lantern_aws/forks","keys_url":"https://api.github.com/repos/getlantern/lantern_aws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getlantern/lantern_aws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getlantern/lantern_aws/teams","hooks_url":"https://api.github.com/repos/getlantern/lantern_aws/hooks","issue_events_url":"https://api.github.com/repos/getlantern/lantern_aws/issues/events{/number}","events_url":"https://api.github.com/repos/getlantern/lantern_aws/events","assignees_url":"https://api.github.com/repos/getlantern/lantern_aws/assignees{/user}","branches_url":"https://api.github.com/repos/getlantern/lantern_aws/branches{/branch}","tags_url":"https://api.github.com/repos/getlantern/lantern_aws/tags","blobs_url":"https://api.github.com/repos/getlantern/lantern_aws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getlantern/lantern_aws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getlantern/lantern_aws/git/refs{/sha}","trees_url":"https://api.github.com/repos/getlantern/lantern_aws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getlantern/lantern_aws/statuses/{sha}","languages_url":"https://api.github.com/repos/getlantern/lantern_aws/languages","stargazers_url":"https://api.github.com/repos/getlantern/lantern_aws/stargazers","contributors_url":"https://api.github.com/repos/getlantern/lantern_aws/contributors","subscribers_url":"https://api.github.com/repos/getlantern/lantern_aws/subscribers","subscription_url":"https://api.github.com/repos/getlantern/lantern_aws/subscription","commits_url":"https://api.github.com/repos/getlantern/lantern_aws/commits{/sha}","git_commits_url":"https://api.github.com/repos/getlantern/lantern_aws/git/commits{/sha}","comments_url":"https://api.github.com/repos/getlantern/lantern_aws/comments{/number}","issue_comment_url":"https://api.github.com/repos/getlantern/lantern_aws/issues/comments{/number}","contents_url":"https://api.github.com/repos/getlantern/lantern_aws/contents/{+path}","compare_url":"https://api.github.com/repos/getlantern/lantern_aws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getlantern/lantern_aws/merges","archive_url":"https://api.github.com/repos/getlantern/lantern_aws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getlantern/lantern_aws/downloads","issues_url":"https://api.github.com/repos/getlantern/lantern_aws/issues{/number}","pulls_url":"https://api.github.com/repos/getlantern/lantern_aws/pulls{/number}","milestones_url":"https://api.github.com/repos/getlantern/lantern_aws/milestones{/number}","notifications_url":"https://api.github.com/repos/getlantern/lantern_aws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getlantern/lantern_aws/labels{/name}","releases_url":"https://api.github.com/repos/getlantern/lantern_aws/releases{/id}","deployments_url":"https://api.github.com/repos/getlantern/lantern_aws/deployments","created_at":"2012-07-31T14:43:10Z","updated_at":"2016-05-30T18:28:56Z","pushed_at":"2016-06-08T02:30:36Z","git_url":"git://github.com/getlantern/lantern_aws.git","ssh_url":"git@github.com:getlantern/lantern_aws.git","clone_url":"https://github.com/getlantern/lantern_aws.git","svn_url":"https://github.com/getlantern/lantern_aws","homepage":"","size":34858,"stargazers_count":24,"watchers_count":24,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":47,"forks":11,"open_issues":47,"watchers":24,"default_branch":"master"}},"base":{"label":"getlantern:master","ref":"master","sha":"f77637c2429facc34773eead31048f81ff207c21","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":5247106,"name":"lantern_aws","full_name":"getlantern/lantern_aws","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_aws","description":"AWS utilities and Salt configuration","fork":false,"url":"https://api.github.com/repos/getlantern/lantern_aws","forks_url":"https://api.github.com/repos/getlantern/lantern_aws/forks","keys_url":"https://api.github.com/repos/getlantern/lantern_aws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getlantern/lantern_aws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getlantern/lantern_aws/teams","hooks_url":"https://api.github.com/repos/getlantern/lantern_aws/hooks","issue_events_url":"https://api.github.com/repos/getlantern/lantern_aws/issues/events{/number}","events_url":"https://api.github.com/repos/getlantern/lantern_aws/events","assignees_url":"https://api.github.com/repos/getlantern/lantern_aws/assignees{/user}","branches_url":"https://api.github.com/repos/getlantern/lantern_aws/branches{/branch}","tags_url":"https://api.github.com/repos/getlantern/lantern_aws/tags","blobs_url":"https://api.github.com/repos/getlantern/lantern_aws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getlantern/lantern_aws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getlantern/lantern_aws/git/refs{/sha}","trees_url":"https://api.github.com/repos/getlantern/lantern_aws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getlantern/lantern_aws/statuses/{sha}","languages_url":"https://api.github.com/repos/getlantern/lantern_aws/languages","stargazers_url":"https://api.github.com/repos/getlantern/lantern_aws/stargazers","contributors_url":"https://api.github.com/repos/getlantern/lantern_aws/contributors","subscribers_url":"https://api.github.com/repos/getlantern/lantern_aws/subscribers","subscription_url":"https://api.github.com/repos/getlantern/lantern_aws/subscription","commits_url":"https://api.github.com/repos/getlantern/lantern_aws/commits{/sha}","git_commits_url":"https://api.github.com/repos/getlantern/lantern_aws/git/commits{/sha}","comments_url":"https://api.github.com/repos/getlantern/lantern_aws/comments{/number}","issue_comment_url":"https://api.github.com/repos/getlantern/lantern_aws/issues/comments{/number}","contents_url":"https://api.github.com/repos/getlantern/lantern_aws/contents/{+path}","compare_url":"https://api.github.com/repos/getlantern/lantern_aws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getlantern/lantern_aws/merges","archive_url":"https://api.github.com/repos/getlantern/lantern_aws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getlantern/lantern_aws/downloads","issues_url":"https://api.github.com/repos/getlantern/lantern_aws/issues{/number}","pulls_url":"https://api.github.com/repos/getlantern/lantern_aws/pulls{/number}","milestones_url":"https://api.github.com/repos/getlantern/lantern_aws/milestones{/number}","notifications_url":"https://api.github.com/repos/getlantern/lantern_aws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getlantern/lantern_aws/labels{/name}","releases_url":"https://api.github.com/repos/getlantern/lantern_aws/releases{/id}","deployments_url":"https://api.github.com/repos/getlantern/lantern_aws/deployments","created_at":"2012-07-31T14:43:10Z","updated_at":"2016-05-30T18:28:56Z","pushed_at":"2016-06-08T02:30:36Z","git_url":"git://github.com/getlantern/lantern_aws.git","ssh_url":"git@github.com:getlantern/lantern_aws.git","clone_url":"https://github.com/getlantern/lantern_aws.git","svn_url":"https://github.com/getlantern/lantern_aws","homepage":"","size":34858,"stargazers_count":24,"watchers_count":24,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":47,"forks":11,"open_issues":47,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/getlantern/lantern_aws/pulls/218"},"html":{"href":"https://github.com/getlantern/lantern_aws/pull/218"},"issue":{"href":"https://api.github.com/repos/getlantern/lantern_aws/issues/218"},"comments":{"href":"https://api.github.com/repos/getlantern/lantern_aws/issues/218/comments"},"review_comments":{"href":"https://api.github.com/repos/getlantern/lantern_aws/pulls/218/comments"},"review_comment":{"href":"https://api.github.com/repos/getlantern/lantern_aws/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/getlantern/lantern_aws/pulls/218/commits"},"statuses":{"href":"https://api.github.com/repos/getlantern/lantern_aws/statuses/ead2d9464e9f472edfb073c95434d12910734c1d"}}}}
{"actor":{"display_login":"oxtoacart"}}