{"id":167384,"date":"2020-10-13T07:23:55","date_gmt":"2020-10-12T23:23:55","guid":{"rendered":"http:\/\/4563.org\/?p=167384"},"modified":"2020-10-13T07:23:55","modified_gmt":"2020-10-12T23:23:55","slug":"%e6%b1%82%e4%b8%80%e4%b8%aa%e8%83%bd%e5%81%9a%e4%ba%8c%e7%ba%a7%e4%bb%a3%e7%90%86%e8%bd%ac%e5%8f%91%e7%9a%84%e5%b7%a5%e5%85%b7-%e5%9b%a0%e4%b8%ba-chrome-%e5%91%bd%e4%bb%a4%e8%a1%8c%e6%8c%82%e4%b8%8d","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=167384","title":{"rendered":"\u6c42\u4e00\u4e2a\u80fd\u505a\u4e8c\u7ea7\u4ee3\u7406\u8f6c\u53d1\u7684\u5de5\u5177, \u56e0\u4e3a Chrome \u547d\u4ee4\u884c\u6302\u4e0d\u4e0a\u5e26\u8ba4\u8bc1\u7684\u4ee3\u7406"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6c42\u4e00\u4e2a\u80fd\u505a\u4e8c\u7ea7\u4ee3\u7406\u8f6c\u53d1\u7684\u5de5\u5177, \u56e0\u4e3a Chrome \u547d\u4ee4\u884c\u6302\u4e0d\u4e0a\u5e26\u8ba4\u8bc1\u7684\u4ee3\u7406               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ClericPy <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u573a\u666f:<br \/>\u516c\u53f8\u91cc\u5728\u7528\u7684\u4ee3\u7406\u662f\u5e26 auth \u4fe1\u606f\u7684 user:[email&#160;protected]:port \u7684, \u4f46\u662f Chrome \u547d\u4ee4\u884c\u542f\u52a8\u7684\u65f6\u5019\u4e0d\u652f\u6301\u5e26\u8ba4\u8bc1\u7684\u4ee3\u7406, \u6240\u4ee5\u53ea\u80fd\u5148\u8f6c\u53d1\u5230\u4e00\u4e2a\u672c\u5730\u514d\u5bc6\u4ee3\u7406\u518d\u8fdb\u884c\u8bf7\u6c42.<\/p>\n<p>\u76ee\u524d\u5df2\u7ecf\u8fdb\u884c\u7684\u5c1d\u8bd5:<br \/>1. \u901a\u8fc7 &#8211;proxy-server=http:\/\/host:port \u76f4\u63a5\u6302\u90a3\u4e2a\u9700\u8981\u8ba4\u8bc1\u7684\u4ee3\u7406, \u6d4f\u89c8\u5668\u91cc\u4f1a\u6697\u5904\u8ba4\u8bc1\u6846, \u4f46\u662f Chrome CDP \u91cc\u9762\u7684 Fetch.enable(authChallengeResponse=true) + Fetch.continueWithAuth \u53d1\u73b0\u6839\u672c\u622a\u53d6\u4e0d\u5230\u524d\u9762\u7684\u90a3\u4e2a\u8ba4\u8bc1 Fetch.authRequired, \u53ea\u80fd\u622a\u53d6\u5230\u666e\u901a\u7684 Fetch.requestPaused \u4e8b\u4ef6<\/p>\n<p>2. \u901a\u8fc7 Network.setExtraHTTPHeaders \u5f3a\u5236\u5199\u5165 Proxy-Authorization, \u76f4\u63a5\u62a5\u9519\u5b8c\u5168\u6ca1\u7528<\/p>\n<p>3. \u76ee\u524d\u552f\u4e00\u6210\u529f\u7684\u5c31\u662f\u901a\u8fc7 cow \u505a\u4e8c\u7ea7\u4ee3\u7406, \u4f46\u662f\u770b\u8fc7 issue \u4f5c\u8005 2014 \u5e74\u8868\u793a\u4e0d\u5e0c\u671b\u5b9e\u73b0\u4e00\u4e2a\u7aef\u53e3\u8f6c\u53d1\u4e00\u4e2a\u4ee3\u7406\u7684\u529f\u80fd ( https:\/\/github.com\/cyfdecyf\/cow\/issues\/162), \u6240\u4ee5\u4e00\u4e2a cow \u8fdb\u7a0b\u53ea\u80fd\u505a\u4e00\u4e2a port + \u4e8c\u7ea7\u4ee3\u7406\u7684\u7ed1\u5b9a, \u5982\u679c\u7ed1\u5b9a\u591a\u4e2a, \u5c31\u4e0d\u80fd\u4e00\u5bf9\u4e00\u4e86.<\/p>\n<p>4. \u56de\u5934\u770b\u4e86\u4e0b mitmproxy \u91cc\u7684 connection \u76d1\u542c\u8f6c\u53d1, \u5e76\u4e0d\u9002\u5408\u6211\u60f3\u505a\u7684<\/p>\n<p>5. \u8bd5\u7740\u547d\u4ee4\u884c\u6302 export http_proxy \u7684\u65b9\u5f0f\u4ee3\u7406, Chrome \u542f\u52a8\u4e5f\u8981\u586b\u767b\u5f55\u6846<\/p>\n<p>\u603b\u7ed3: \u6c42\u4e00\u4e2a\u53ef\u4ee5\u5e2e\u6211\u628a\u5e26\u8ba4\u8bc1\u7684\u4ee3\u7406\u8f6c\u4e3a\u514d\u8ba4\u8bc1\u7684 host+port \u4ee3\u7406\u7684\u65b9\u5f0f. \u76ee\u524d\u60f3\u5230\u7684\u5c31\u662f\u6bcf\u6b21\u6302\u4ee3\u7406\u4e4b\u524d\u542f\u52a8\u4e00\u4e2a\u81ea\u5b9a\u4e49 rc \u8def\u5f84\u7684 cow \u8fdb\u7a0b.<\/p>\n<p>\u6709\u5176\u4ed6\u9009\u62e9\u5417, \u6700\u597d Python3 \u4ee5\u4e0a\u7684, \u5c31\u7701\u7684\u542f\u52a8\u8fdb\u7a0b\u4e86      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>12<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3711146\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yaoliyc <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Proxifier                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3711147\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : ClericPy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @yaoliyc \u611f\u8c22\u56de\u590d&#8230; \u770b\u4e86\u4e0b windows + mac \u7684, \u60f3\u90e8\u7f72\u5728 Linux \u670d\u52a1\u5668&#8230;<\/p>\n<p>\u73b0\u5728\u5728\u770b squid                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3711148\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : KyonLi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             v2ray                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3711149\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : ClericPy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @KyonLi \u6ca1\u627e\u5230\u53ef\u4ee5\u8ba9\u6211\u628a\u591a\u4e2a (\u5927\u6982 100 \u5de6\u53f3) \u539f\u672c\u5728\u7528\u7684\u9700\u8981\u8ba4\u8bc1\u7684\u4ee3\u7406\u8f6c\u4e8c\u7ea7\u4ee3\u7406\u7684\u591a\u7aef\u53e3\u65b9\u5f0f&#8230;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3711150\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xmh51 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             gost                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3711151\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ysmood <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u4ee5\u8bd5\u8bd5\u8fd9\u4e2a\uff0c\u5b9e\u9645\u4e0a\u662f\u53ef\u4ee5\u8bbe\u7f6e\u8d26\u6237\u5bc6\u7801\u7684 https:\/\/github.com\/go-rod\/rod\/blob\/c10d7b438f03186234016bea8f837d539192660e\/examples_test.go#L361-L383                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3711152\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : ClericPy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xmh51 \u76ee\u524d\u6765\u770b, \u6bd4 cow \u8212\u670d\u7684\u4e00\u70b9\u5c31\u662f\u547d\u4ee4\u884c\u53c2\u6570\u91cc\u5c31\u53ef\u4ee5\u5199\u8f6c\u53d1\u4ee3\u7406, \u4e0d\u7528\u50cf cow \u4e00\u4e2a\u4e2a\u62fc rc \u6587\u4ef6&#8230; \u975e\u5e38\u611f\u8c22! \u8fd9\u6837\u5b50\u591a\u5f00\u51e0\u4e2a\u8fdb\u7a0b\u4e5f\u53ef\u4ee5\u63a5\u53d7, golang \u771f\u8212\u670d<\/p>\n<p>@ysmood \u611f\u8c22, \u6211\u641c\u4e86\u5230\u5904\u90fd\u8bf4\u4e0d\u884c, \u8fd9\u91cc\u7684 HandleAuth \u5176\u5b9e\u5c31\u662f Fetch.enable \u91cc\u9762\u7684 paused := &amp;proto.FetchRequestPaused{}; auth := &amp;proto.FetchAuthRequired{}. \u6211\u5728\u6d4b\u8bd5\u7684\u65f6\u5019\u53d1\u73b0\u53ea\u80fd\u6536\u5230\u524d\u8005\u7684\u4e8b\u4ef6, \u540e\u8005\u62ff\u4e0d\u5230, \u6211\u518d\u770b\u770b\u8fd9\u4e2a\u4ee3\u7801. \u975e\u5e38\u611f\u8c22!<\/p>\n<p>PS: golang \u5728 Github \u4e0a\u5c45\u7136\u4e5f\u53ef\u4ee5\u51fd\u6570\u8df3\u8f6c, \u771f\u65b9\u4fbf                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3711153\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ysmood <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ClericPy github \u8fd9\u4e2a\u9884\u89c8\u786e\u5b9e\u5f88\u5f3a\uff0c\u4e0d\u8fc7\u76ee\u524d\u53ea\u662f\u641c\u7d22\u5173\u952e\u8bcd\uff0c\u8fd8\u6ca1\u652f\u6301 type-safe \u7684\u8df3\u8f6c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3711154\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : KyonLi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ClericPy 100 \u4e2a inbound+100 \u4e2a outbound+routing \u5c31\u884c\u4e86\u554a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3711155\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : ClericPy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @KyonLi \u6709 Python \u5b9e\u73b0\u4e48, \u8fd9\u65b9\u9762\u6ca1\u505a\u8fc7, \u5173\u952e\u8bcd\u90fd\u6ca1\u542c\u61c2                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3711156\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : muzuiget <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6ca1\u770b\u61c2\u4f60\u7b2c 1 \u70b9\u90a3\u4e2a Chrome CDP \u95ee\u9898\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3711157\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : ClericPy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @muzuiget <br \/>\u5f00\u542f fetch \u4ee5\u540e\u6293\u5305\u62ff\u5230 continueWithAuth \u4e8b\u4ef6, \u7ed3\u679c\u6211\u62ff\u4e0d\u5230                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6c42\u4e00\u4e2a\u80fd\u505a\u4e8c\u7ea7\u4ee3\u7406\u8f6c\u53d1\u7684\u5de5\u5177, \u56e0&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/167384"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=167384"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/167384\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=167384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=167384"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=167384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}