{"id":555,"date":"2020-05-22T14:42:41","date_gmt":"2020-05-22T06:42:41","guid":{"rendered":"https:\/\/www.yinyubo.cn\/?p=555"},"modified":"2022-05-17T09:41:00","modified_gmt":"2022-05-17T01:41:00","slug":"diffy","status":"publish","type":"post","link":"https:\/\/www.yinyubo.com\/?p=555","title":{"rendered":"diffy\u505a\u6d41\u91cf\u6bd4\u5bf9\u7684\u5b9e\u8df5\u548c\u6837\u4f8b"},"content":{"rendered":"<h1 id=\"diffy\u6d41\u91cf\u6bd4\u5bf9demo\u4ee3\u7801\uff0c\u4ee5\u53ca\u6548\u679c-\u4f8b\u5b50\u4ee3\u7801\u7684\u7b80\u5355\u4ecb\u7ecd\">\u4f8b\u5b50\u4ee3\u7801\u7684\u7b80\u5355\u4ecb\u7ecd<\/h1>\n<p>\u56e0\u4e3a\u8981\u60f3\u505a\u8fd9\u4e2a\u6d41\u91cf\u6bd4\u5bf9\uff0c\u90a3\u5f97\u6709\u524d\u7aef\u4ee3\u7801\uff0c\u540e\u7aef\u4ee3\u7801\uff0cnginx\uff0c\u6d4b\u8bd5\u540c\u5b66\u60f3\u8981\u719f\u6089diffy\u7684\u529f\u80fd\uff0c\u9700\u8981\u6709\u4fee\u6539\u524d\u540e\u7aef\u4ee3\u7801\u7684\u80fd\u529b\uff0c\u6211\u4eec\u7684AIMP\u9879\u76ee\u90e8\u7f72\u8d77\u6765\u76f8\u5bf9\u590d\u6742\uff0c\u6240\u4ee5\u6211\u7f16\u5199\u4e86\u4e00\u4e2a\u5c0f\u9879\u76ee\uff0c\u7528\u4e8e\u540c\u5b66\u4eec\u6d4b\u8bd5\u3002<br \/>\n1.\u524d\u7aef\u4ee3\u7801 vue\u67b6\u6784\uff1ahttps:\/\/gitee.com\/li_shuai520\/diffy.example.frontend.git\u3002\u63d0\u4f9b\u4e00\u4e2a\u9875\u9762\uff0c\u6709\u8f93\u5165\u6846\u548c\u6309\u94ae\uff0c\u4f9b\u7528\u6237\u8f93\u5165\u548c\u89e6\u53d1http\u8bf7\u6c42\u5230\u540e\u7aef<br \/>\n2.\u540e\u7aef\u4ee3\u7801python3:\u00a0https:\/\/gitee.com\/li_shuai520\/diffy.example.backend.git\u3002\u91cc\u9762\u5305\u542b4\u6bb5\u4ee3\u7801\uff0c4\u6bb5\u4ee3\u7801\u90fd\u8fd0\u884c\u8d77\u6765\uff0c\u4f1a\u5360\u75285000,50001,5002,5003\u7aef\u53e3<br \/>\n3.nginx\u5173\u952e\u914d\u7f6e\u5982\u4e0b\uff1a<br \/>\n192.168.0.240 \u662f\u8fd0\u884cdiffy\u673a\u5668\u7684IP\uff0c192.168.1.5\u662f\u8fd0\u884c\u6211\u672c\u673a\u7684IP<\/p>\n<div class=\"code panel pdl conf-macro output-block\" data-hasbody=\"true\" data-macro-name=\"code\">\n<div class=\"codeContent panelContent pdl\">\n<div>\n<div id=\"highlighter_62078\" class=\"syntaxhighlighter sh-confluence nogutter  java\">\n<pre class=\"lang:python decode:true EnlighterJSRAW\" data-enlighter-language=\"golang\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">location \/api {\n            mirror \/mirror;\n            proxy_set_header Host $host;\n            proxy_set_header X-Real-IP              $remote_addr;\n            proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;\n            proxy_set_header X-NginX-Proxy      true;\n            proxy_pass http:\/\/192.168.1.5:5000\/getMsg;\n    }\n    location = \/mirror {\n            internal;\n            proxy_set_header Host $host;\n            proxy_set_header X-Real-IP              $remote_addr;\n            proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;\n            proxy_set_header X-NginX-Proxy      true;\n            proxy_pass http:\/\/192.168.0.240:8880\/getMsg;\n    }<\/code><\/pre>\n<h2 id=\"diffy\u6d41\u91cf\u6bd4\u5bf9demo\u4ee3\u7801\uff0c\u4ee5\u53ca\u6548\u679c-\u4e1a\u52a1\u56fe\">\u4e1a\u52a1\u5b9e\u8df5\u56fe<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-556 size-full\" src=\"https:\/\/yinyubo-1257235934.cos.ap-nanjing.myqcloud.com\/content\/\u4e0b\u8f7d.png\" alt=\"\" width=\"1011\" height=\"902\" \/><\/p>\n<h2 id=\"diffy\u6d41\u91cf\u6bd4\u5bf9demo\u4ee3\u7801\uff0c\u4ee5\u53ca\u6548\u679c-\u524d\u7aef\u4ee3\u7801\u5b89\u88c5\">\u524d\u7aef\u4ee3\u7801\u5b89\u88c5<\/h2>\n<p>1.\u628a\u524d\u7aef\u4ee3\u7801\u4e0b\u8f7d\u5230\u672c\u5730\uff0c\u4fee\u6539src\\components\\Lzw.vue\u91cc\u7684const path \u4e3a\u81ea\u5df1\u7684nginx\u540e\u53f0\u8def\u5f84<br \/>\n1.\u8fd0\u884c\u547d\u4ee4npm install ,npm run build\u3002\u4ea7\u751fdist\u76ee\u5f55<br \/>\n2.\u628adist\u76ee\u5f55\u91cc\u7684\u6587\u4ef6\u590d\u5236\u5230nginx\u7684\/usr\/share\/nginx\/html\u76ee\u5f55\u4e0b<\/p>\n<h2 id=\"diffy\u6d41\u91cf\u6bd4\u5bf9demo\u4ee3\u7801\uff0c\u4ee5\u53ca\u6548\u679c-nginx\u914d\u7f6e\">nginx\u914d\u7f6e<\/h2>\n<p>1.\u4fee\u6539\/etc\/nginx\/conf.d\/default.conf\u3002\u914d\u7f6e\u540e\u7aef\u53cd\u5411\u4ee3\u7406\u548c\u6d41\u91cf\u955c\u50cf<\/p>\n<h2 id=\"diffy\u6d41\u91cf\u6bd4\u5bf9demo\u4ee3\u7801\uff0c\u4ee5\u53ca\u6548\u679c-\u540e\u7aef\u4ee3\u7801\u5b89\u88c5\">\u540e\u7aef\u4ee3\u7801\u5b89\u88c5<\/h2>\n<p>\u628a4\u4e2a\u4ee3\u7801run\u5c31\u5b8c\u4e8b\u4e86\u3002new_code\u548cold_code\u7684\u533a\u522b\uff0c\u5c31\u5728\/getMsg\u8fd9\u4e2a\u63a5\u53e3\u7684get\u8bf7\u6c42\u7684\u975e\u8fd4\u56de\u7ed3\u679c\u4e2d\uff0c\u591a\u4e86\u4e00\u4e2a\u201cnew\u201d\uff1a\u968f\u673a\u6570 \u3002\u6211\u4eec\u7684\u76ee\u6807\uff0c\u5c31\u662fdiffy\u8981\u80fd\u6bd4\u8f83\u5e76\u544a\u8bc9\u6211\u4eec\uff0c\u8fd9\u4e2anew\u5728\u65b0\u8001\u4ee3\u7801\u4e2d\u662f\u4e0d\u540c\u7684<br \/>\nnew_code\u67092\u4e2a\u4e00\u6837\u7684\uff0c\u5360\u7528\u4e865000\u548c5001<br \/>\nold_code\u4e5f\u67092\u4e2a\u4e00\u6837\u7684\uff0c\u5360\u7528\u4e865002\u548c5003<\/p>\n<h2 id=\"diffy\u6d41\u91cf\u6bd4\u5bf9demo\u4ee3\u7801\uff0c\u4ee5\u53ca\u6548\u679c-diffy\u7528docker\u5b89\u88c5\">diffy\u7528docker\u5b89\u88c5<\/h2>\n<p>\u5176\u4e2d192.168.1.5\u662f\u6211\u81ea\u5df1\u7535\u8111\u7684IP\u5730\u5740<\/p>\n<pre class=\"lang:python decode:true\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">docker run -ti \\\n  -p 8880:8880 -p 8881:8881 -p 8888:8888 \\\n  diffy\/diffy \\\n    -candidate=192.168.1.5:5001 \\\n    -master.primary=192.168.1.5:5002 \\\n    -master.secondary=192.168.1.5:5003 \\\n    -service.protocol=http \\\n    -serviceName=\"Test-Service\" \\\n    -summary.email='zhenwei.li@sfere-elec.com' \\\n    -proxy.port=:8880 \\\n    -admin.port=:8881 \\\n    -http.port=:8888 \\\n    -allowHttpSideEffects=true \\\n    -rootUrl=localhost:8888<\/code><\/pre>\n<h2 id=\"diffy\u6d41\u91cf\u6bd4\u5bf9demo\u4ee3\u7801\uff0c\u4ee5\u53ca\u6548\u679c-\u4f7f\u7528\u622a\u56fe\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">\u4f7f\u7528\u622a\u56fe<\/code><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-557 size-full\" src=\"https:\/\/yinyubo-1257235934.cos.ap-nanjing.myqcloud.com\/content\/image2020-5-22_11-46-32.png\" alt=\"\" width=\"484\" height=\"469\" \/><\/p>\n<hr \/>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-558 size-large\" src=\"https:\/\/yinyubo-1257235934.cos.ap-nanjing.myqcloud.com\/content\/Image-1-3-1024x342.png\" alt=\"\" width=\"900\" height=\"301\" \/><\/p>\n<hr \/>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-559 size-full\" src=\"https:\/\/yinyubo-1257235934.cos.ap-nanjing.myqcloud.com\/content\/image2020-5-22_11-49-4.png\" alt=\"\" width=\"803\" height=\"410\" \/><\/p>\n<hr \/>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-560 size-large\" src=\"https:\/\/yinyubo-1257235934.cos.ap-nanjing.myqcloud.com\/content\/image2020-5-22_11-50-19-1024x275.png\" alt=\"\" width=\"900\" height=\"242\" \/><\/p>\n<hr \/>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-561 size-full\" src=\"https:\/\/yinyubo-1257235934.cos.ap-nanjing.myqcloud.com\/content\/image2020-5-22_11-52-38.png\" alt=\"\" width=\"564\" height=\"428\" \/><\/p>\n<hr \/>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-562 size-full\" src=\"https:\/\/yinyubo-1257235934.cos.ap-nanjing.myqcloud.com\/content\/image2020-5-22_11-54-45.png\" alt=\"\" width=\"735\" height=\"394\" \/><\/p>\n<hr \/>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-563 size-full\" src=\"https:\/\/yinyubo-1257235934.cos.ap-nanjing.myqcloud.com\/content\/image2020-5-22_11-56-9.png\" alt=\"\" width=\"803\" height=\"492\" \/><\/p>\n<hr \/>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4f8b\u5b50\u4ee3\u7801\u7684\u7b80\u5355\u4ecb\u7ecd \u56e0\u4e3a\u8981\u60f3\u505a\u8fd9\u4e2a\u6d41\u91cf\u6bd4\u5bf9\uff0c\u90a3\u5f97\u6709\u524d\u7aef\u4ee3\u7801\uff0c\u540e\u7aef\u4ee3\u7801\uff0cnginx\uff0c\u6d4b\u8bd5\u540c\u5b66\u60f3\u8981\u719f\u6089diffy\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-555","post","type-post","status-publish","format-standard","hentry","category-10"],"_links":{"self":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts\/555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=555"}],"version-history":[{"count":2,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts\/555\/revisions"}],"predecessor-version":[{"id":886,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts\/555\/revisions\/886"}],"wp:attachment":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}