{"action":"created","comment":{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/comments/100660534","pull_request_review_id":21379424,"id":100660534,"diff_hunk":"@@ -0,0 +1,53 @@\n+.. _openbsd:\n+\n+OpenBSD\n+===\n+\n+ 1. :ref:`Install the mitmproxy certificate on the test device <certinstall>`\n+\n+ 2. Enable IP forwarding:\n+\n+    >>> sudo sysctl -w net.inet.ip.forwarding=1\n+\n+ 3. Place the following two lines in **/etc/pf.conf**:\n+\n+    .. code-block:: none\n+\n+        mitm_if = \"re2\"\n+        pass in quick proto tcp from $mitm_if to port { 80, 443 } divert-to 127.0.0.1 port 8080\n+\n+    These rules tell pf to divert all traffic from ``$mitm_if`` destined for\n+    port 80 or 443 to the local mitmproxy instance running on port 8080. You\n+    should replace ``$mitm_if`` value with the interface on which your test\n+    device will appear.\n+\n+ 4. Configure pf with the rules:\n+\n+    >>> doas pfctl -f /etc/pf.conf\n+\n+ 5. And now enable it:\n+\n+    >>> doas pfctl -e\n+\n+ 6. Fire up mitmproxy. You probably want a command like this:\n+\n+    >>> mitmproxy -T --host\n+\n+    The ``-T`` flag turns on transparent mode, and the ``--host``\n+    argument tells mitmproxy to use the value of the Host header for URL display.\n+\n+ 7. Finally, configure your test device to use the host on which mitmproxy is\n+    running as the default gateway.\n+\n+.. note::\n+\n+    Note that the **divert-to** rules in the pf.conf given above only apply to\n+    inbound traffic. **This means that they will NOT redirect traffic coming\n+    from the box running pf itself.** We can't distinguish between an outbound\n+    connection from a non-mitmproxy app, and an outbound connection from\n+    mitmproxy itself - if you want to intercept your traffic, you should use an\n+    external host to run mitmproxy. None the less, pf is flexible to cater for","path":"docs/transparent/openbsd.rst","position":null,"original_position":49,"commit_id":"4adc575bade2b85621c94aad756bc3ee0a176caf","original_commit_id":"9dfc80dc2d9690e9d3d8d34696a7050c2238f284","user":{"login":"yjh0502","id":554344,"avatar_url":"https://avatars.githubusercontent.com/u/554344?v=3","gravatar_id":"","url":"https://api.github.com/users/yjh0502","html_url":"https://github.com/yjh0502","followers_url":"https://api.github.com/users/yjh0502/followers","following_url":"https://api.github.com/users/yjh0502/following{/other_user}","gists_url":"https://api.github.com/users/yjh0502/gists{/gist_id}","starred_url":"https://api.github.com/users/yjh0502/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yjh0502/subscriptions","organizations_url":"https://api.github.com/users/yjh0502/orgs","repos_url":"https://api.github.com/users/yjh0502/repos","events_url":"https://api.github.com/users/yjh0502/events{/privacy}","received_events_url":"https://api.github.com/users/yjh0502/received_events","type":"User","site_admin":false},"body":"@dwfreed I copy-pasted the text from `osx.rst`, so I fixed both documents and pushed.","created_at":"2017-02-11T05:06:50Z","updated_at":"2017-02-11T05:06:50Z","html_url":"https://github.com/mitmproxy/mitmproxy/pull/2008#discussion_r100660534","pull_request_url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/2008","_links":{"self":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/comments/100660534"},"html":{"href":"https://github.com/mitmproxy/mitmproxy/pull/2008#discussion_r100660534"},"pull_request":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/2008"}}},"pull_request":{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/2008","id":105741063,"html_url":"https://github.com/mitmproxy/mitmproxy/pull/2008","diff_url":"https://github.com/mitmproxy/mitmproxy/pull/2008.diff","patch_url":"https://github.com/mitmproxy/mitmproxy/pull/2008.patch","issue_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/2008","number":2008,"state":"open","locked":false,"title":"Add transparent proxy support for OpenBSD","user":{"login":"yjh0502","id":554344,"avatar_url":"https://avatars.githubusercontent.com/u/554344?v=3","gravatar_id":"","url":"https://api.github.com/users/yjh0502","html_url":"https://github.com/yjh0502","followers_url":"https://api.github.com/users/yjh0502/followers","following_url":"https://api.github.com/users/yjh0502/following{/other_user}","gists_url":"https://api.github.com/users/yjh0502/gists{/gist_id}","starred_url":"https://api.github.com/users/yjh0502/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yjh0502/subscriptions","organizations_url":"https://api.github.com/users/yjh0502/orgs","repos_url":"https://api.github.com/users/yjh0502/repos","events_url":"https://api.github.com/users/yjh0502/events{/privacy}","received_events_url":"https://api.github.com/users/yjh0502/received_events","type":"User","site_admin":false},"body":"Add transparent proxy support for OpenBSD with pf divert-to.","created_at":"2017-02-11T04:18:22Z","updated_at":"2017-02-11T05:06:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"55b717b5a9efd8a464ff3da3eb5c4637a7357acb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/2008/commits","review_comments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/2008/comments","review_comment_url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/2008/comments","statuses_url":"https://api.github.com/repos/mitmproxy/mitmproxy/statuses/4adc575bade2b85621c94aad756bc3ee0a176caf","head":{"label":"yjh0502:master","ref":"master","sha":"4adc575bade2b85621c94aad756bc3ee0a176caf","user":{"login":"yjh0502","id":554344,"avatar_url":"https://avatars.githubusercontent.com/u/554344?v=3","gravatar_id":"","url":"https://api.github.com/users/yjh0502","html_url":"https://github.com/yjh0502","followers_url":"https://api.github.com/users/yjh0502/followers","following_url":"https://api.github.com/users/yjh0502/following{/other_user}","gists_url":"https://api.github.com/users/yjh0502/gists{/gist_id}","starred_url":"https://api.github.com/users/yjh0502/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yjh0502/subscriptions","organizations_url":"https://api.github.com/users/yjh0502/orgs","repos_url":"https://api.github.com/users/yjh0502/repos","events_url":"https://api.github.com/users/yjh0502/events{/privacy}","received_events_url":"https://api.github.com/users/yjh0502/received_events","type":"User","site_admin":false},"repo":{"id":81629990,"name":"mitmproxy","full_name":"yjh0502/mitmproxy","owner":{"login":"yjh0502","id":554344,"avatar_url":"https://avatars.githubusercontent.com/u/554344?v=3","gravatar_id":"","url":"https://api.github.com/users/yjh0502","html_url":"https://github.com/yjh0502","followers_url":"https://api.github.com/users/yjh0502/followers","following_url":"https://api.github.com/users/yjh0502/following{/other_user}","gists_url":"https://api.github.com/users/yjh0502/gists{/gist_id}","starred_url":"https://api.github.com/users/yjh0502/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yjh0502/subscriptions","organizations_url":"https://api.github.com/users/yjh0502/orgs","repos_url":"https://api.github.com/users/yjh0502/repos","events_url":"https://api.github.com/users/yjh0502/events{/privacy}","received_events_url":"https://api.github.com/users/yjh0502/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yjh0502/mitmproxy","description":"An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers","fork":true,"url":"https://api.github.com/repos/yjh0502/mitmproxy","forks_url":"https://api.github.com/repos/yjh0502/mitmproxy/forks","keys_url":"https://api.github.com/repos/yjh0502/mitmproxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yjh0502/mitmproxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yjh0502/mitmproxy/teams","hooks_url":"https://api.github.com/repos/yjh0502/mitmproxy/hooks","issue_events_url":"https://api.github.com/repos/yjh0502/mitmproxy/issues/events{/number}","events_url":"https://api.github.com/repos/yjh0502/mitmproxy/events","assignees_url":"https://api.github.com/repos/yjh0502/mitmproxy/assignees{/user}","branches_url":"https://api.github.com/repos/yjh0502/mitmproxy/branches{/branch}","tags_url":"https://api.github.com/repos/yjh0502/mitmproxy/tags","blobs_url":"https://api.github.com/repos/yjh0502/mitmproxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yjh0502/mitmproxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yjh0502/mitmproxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/yjh0502/mitmproxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yjh0502/mitmproxy/statuses/{sha}","languages_url":"https://api.github.com/repos/yjh0502/mitmproxy/languages","stargazers_url":"https://api.github.com/repos/yjh0502/mitmproxy/stargazers","contributors_url":"https://api.github.com/repos/yjh0502/mitmproxy/contributors","subscribers_url":"https://api.github.com/repos/yjh0502/mitmproxy/subscribers","subscription_url":"https://api.github.com/repos/yjh0502/mitmproxy/subscription","commits_url":"https://api.github.com/repos/yjh0502/mitmproxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/yjh0502/mitmproxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/yjh0502/mitmproxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/yjh0502/mitmproxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/yjh0502/mitmproxy/contents/{+path}","compare_url":"https://api.github.com/repos/yjh0502/mitmproxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yjh0502/mitmproxy/merges","archive_url":"https://api.github.com/repos/yjh0502/mitmproxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yjh0502/mitmproxy/downloads","issues_url":"https://api.github.com/repos/yjh0502/mitmproxy/issues{/number}","pulls_url":"https://api.github.com/repos/yjh0502/mitmproxy/pulls{/number}","milestones_url":"https://api.github.com/repos/yjh0502/mitmproxy/milestones{/number}","notifications_url":"https://api.github.com/repos/yjh0502/mitmproxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yjh0502/mitmproxy/labels{/name}","releases_url":"https://api.github.com/repos/yjh0502/mitmproxy/releases{/id}","deployments_url":"https://api.github.com/repos/yjh0502/mitmproxy/deployments","created_at":"2017-02-11T04:14:19Z","updated_at":"2017-02-11T04:14:22Z","pushed_at":"2017-02-11T05:05:37Z","git_url":"git://github.com/yjh0502/mitmproxy.git","ssh_url":"git@github.com:yjh0502/mitmproxy.git","clone_url":"https://github.com/yjh0502/mitmproxy.git","svn_url":"https://github.com/yjh0502/mitmproxy","homepage":"http://mitmproxy.org","size":36161,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"mitmproxy:master","ref":"master","sha":"71742654e3cab347378509f559dc14399b4eb65e","user":{"login":"mitmproxy","id":4652787,"avatar_url":"https://avatars.githubusercontent.com/u/4652787?v=3","gravatar_id":"","url":"https://api.github.com/users/mitmproxy","html_url":"https://github.com/mitmproxy","followers_url":"https://api.github.com/users/mitmproxy/followers","following_url":"https://api.github.com/users/mitmproxy/following{/other_user}","gists_url":"https://api.github.com/users/mitmproxy/gists{/gist_id}","starred_url":"https://api.github.com/users/mitmproxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitmproxy/subscriptions","organizations_url":"https://api.github.com/users/mitmproxy/orgs","repos_url":"https://api.github.com/users/mitmproxy/repos","events_url":"https://api.github.com/users/mitmproxy/events{/privacy}","received_events_url":"https://api.github.com/users/mitmproxy/received_events","type":"Organization","site_admin":false},"repo":{"id":519832,"name":"mitmproxy","full_name":"mitmproxy/mitmproxy","owner":{"login":"mitmproxy","id":4652787,"avatar_url":"https://avatars.githubusercontent.com/u/4652787?v=3","gravatar_id":"","url":"https://api.github.com/users/mitmproxy","html_url":"https://github.com/mitmproxy","followers_url":"https://api.github.com/users/mitmproxy/followers","following_url":"https://api.github.com/users/mitmproxy/following{/other_user}","gists_url":"https://api.github.com/users/mitmproxy/gists{/gist_id}","starred_url":"https://api.github.com/users/mitmproxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitmproxy/subscriptions","organizations_url":"https://api.github.com/users/mitmproxy/orgs","repos_url":"https://api.github.com/users/mitmproxy/repos","events_url":"https://api.github.com/users/mitmproxy/events{/privacy}","received_events_url":"https://api.github.com/users/mitmproxy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitmproxy/mitmproxy","description":"An interactive TLS-capable intercepting HTTP proxy for penetration testers and software developers","fork":false,"url":"https://api.github.com/repos/mitmproxy/mitmproxy","forks_url":"https://api.github.com/repos/mitmproxy/mitmproxy/forks","keys_url":"https://api.github.com/repos/mitmproxy/mitmproxy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitmproxy/mitmproxy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitmproxy/mitmproxy/teams","hooks_url":"https://api.github.com/repos/mitmproxy/mitmproxy/hooks","issue_events_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/events{/number}","events_url":"https://api.github.com/repos/mitmproxy/mitmproxy/events","assignees_url":"https://api.github.com/repos/mitmproxy/mitmproxy/assignees{/user}","branches_url":"https://api.github.com/repos/mitmproxy/mitmproxy/branches{/branch}","tags_url":"https://api.github.com/repos/mitmproxy/mitmproxy/tags","blobs_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitmproxy/mitmproxy/statuses/{sha}","languages_url":"https://api.github.com/repos/mitmproxy/mitmproxy/languages","stargazers_url":"https://api.github.com/repos/mitmproxy/mitmproxy/stargazers","contributors_url":"https://api.github.com/repos/mitmproxy/mitmproxy/contributors","subscribers_url":"https://api.github.com/repos/mitmproxy/mitmproxy/subscribers","subscription_url":"https://api.github.com/repos/mitmproxy/mitmproxy/subscription","commits_url":"https://api.github.com/repos/mitmproxy/mitmproxy/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitmproxy/mitmproxy/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitmproxy/mitmproxy/contents/{+path}","compare_url":"https://api.github.com/repos/mitmproxy/mitmproxy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitmproxy/mitmproxy/merges","archive_url":"https://api.github.com/repos/mitmproxy/mitmproxy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitmproxy/mitmproxy/downloads","issues_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues{/number}","pulls_url":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls{/number}","milestones_url":"https://api.github.com/repos/mitmproxy/mitmproxy/milestones{/number}","notifications_url":"https://api.github.com/repos/mitmproxy/mitmproxy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitmproxy/mitmproxy/labels{/name}","releases_url":"https://api.github.com/repos/mitmproxy/mitmproxy/releases{/id}","deployments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/deployments","created_at":"2010-02-16T04:10:13Z","updated_at":"2017-02-10T20:57:55Z","pushed_at":"2017-02-11T05:05:39Z","git_url":"git://github.com/mitmproxy/mitmproxy.git","ssh_url":"git@github.com:mitmproxy/mitmproxy.git","clone_url":"https://github.com/mitmproxy/mitmproxy.git","svn_url":"https://github.com/mitmproxy/mitmproxy","homepage":"http://mitmproxy.org","size":36161,"stargazers_count":7182,"watchers_count":7182,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":989,"mirror_url":null,"open_issues_count":76,"forks":989,"open_issues":76,"watchers":7182,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/2008"},"html":{"href":"https://github.com/mitmproxy/mitmproxy/pull/2008"},"issue":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/2008"},"comments":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/2008/comments"},"review_comments":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/2008/comments"},"review_comment":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/pulls/2008/commits"},"statuses":{"href":"https://api.github.com/repos/mitmproxy/mitmproxy/statuses/4adc575bade2b85621c94aad756bc3ee0a176caf"}}}}
{"actor":{"display_login":"yjh0502"}}