{"id":80,"date":"2020-07-29T22:22:21","date_gmt":"2020-07-29T14:22:21","guid":{"rendered":"https:\/\/www.346pro.club\/?p=80"},"modified":"2020-07-29T22:22:22","modified_gmt":"2020-07-29T14:22:22","slug":"%e5%86%85%e7%bd%91%e7%a9%bf%e9%80%8f%e5%a4%a7%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/www.346pro.club\/?p=80","title":{"rendered":"\u5185\u7f51\u7a7f\u900f\u5927\u8bb0\u5f55"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u56e0\u4e3a\u5f88\u591a\u5f88\u591a\u7684\u539f\u56e0\uff0c\u6211\u65f6\u5e38\u8981\u8fdc\u7a0b\u63a7\u5236\u4e00\u4e0b\u5728\u5bb6\u91cc\u548c\u5728\u51fa\u79df\u623f\u5185\u7684\u7535\u8111\uff0c\u4f46\u6211\u5bb6\u91cc\u662f\u8981\u4e0d\u5230\u516c\u7f51\u5730\u5740\u7684\u79fb\u52a8\uff0c\u6211\u51fa\u79df\u5c4b\u662f\u5728\u4e24\u5c42nat\u540e\u9762\u7684\u623f\u4e1c\u7f51\u7edc\uff0c\u5185\u7f51\u7a7f\u900f\u5c31\u6210\u4e3a\u4e86\u6211\u51e0\u4e4e\u5fc5\u5907\u7684\u65b9\u6848\u3002<\/p><p>\u8bd5\u8fc7\u5f88\u591a\u79cd\u5185\u7f51\u7a7f\u900f\u65b9\u6848\uff0c\u6700\u65e9\u7684\u65f6\u5019\uff0c\u6211\u4f7f\u7528\u8fc7\u5411\u65e5\u8475\u8fdc\u7a0b\u63a7\u5236\u514d\u8d39\u7248\uff0c\u4f46\u662f\u90a3\u4e2a\u7248\u672c\uff0c\u901f\u7387\u4f4e\u8d28\u91cf\u5dee\uff0c\u552f\u4e00\u7684\u597d\u5904\u662f\u56fd\u5185\u7684\u670d\u52a1\u5668\uff0c\u4e0d\u9700\u8981\u62c5\u5fc3\u5bb6\u91cc\u7684\u79fb\u4e0d\u52a8\u8fde\u4e0d\u4e0a\u670d\u52a1\u5668\u3002<\/p><p>\u4e4b\u540e\u4f7f\u7528\u4e86teamviewer\u4e2a\u4eba\u514d\u8d39\u7248\uff0c\u7528\u8d77\u6765\u8fd8\u884c\uff0c\u6bd4\u8d77\u5411\u65e5\u8475\u6765\u8bf4\u597d\u4e86\u4e00\u70b9\uff0c\u4f46\u4e0d\u723d\u7684\u662fteamviewer\u7684\u8fdc\u7a0b\u56fe\u50cf\u8d28\u91cf\u4e5f\u662f\u4e00\u822c\uff0c\u800c\u4e14\u8fdc\u7a0b\u8fde\u4e0a\u4e4b\u540e\u4f1a\u5bfc\u81f4\u684c\u9762\u53d8\u6210\u7eaf\u9ed1\u8272\u3002<\/p><p>\u5728\u53bb\u5e74\uff0c\u6b63\u5f0f\u7684\u628a\u8fdc\u7a0b\u65b9\u5f0f\u6362\u6210\u4e86\u771f\u6b63\u7684\u5185\u7f51\u7a7f\u900f\u6a21\u5f0f\uff0c\u5728aliyun\u7684\u670d\u52a1\u5668\u4e0a\u642d\u5efa\u4e86frps\uff0c\u4e5f\u5c31\u662ffrp\u7684\u670d\u52a1\u7aef\uff0c\u4f7f\u7528\u4e0a\u4e86\u771f\u6b63\u7684\u5185\u7f51\u7aef\u53e3\u8f6c\u53d1\u7684\u6a21\u5f0f\u8fde\u63a5\uff0c\u8fd9\u6837\u53ef\u4ee5\u4e0d\u9700\u8981\u989d\u5916\u5b89\u88c5\u8fdc\u7a0b\u63a7\u5236\u8f6f\u4ef6\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528\u5fae\u8f6f\u81ea\u5e26\u7684\u8fdc\u7a0b\u684c\u9762\u8fde\u63a5\u5230\u5185\u7f51\u540e\u7684PC\u3002<\/p><p>\u4f46\u7ec8\u7a76frp\u662f\u4e00\u4e2a\u57fa\u4e8eTCP\u8f6c\u53d1\u65b9\u5f0f\u7684\u7aef\u53e3\u8f6c\u53d1\u5de5\u5177\uff0c\u6240\u6709\u7684\u8fde\u63a5\u90fd\u4f7f\u7528\u4e86\u670d\u52a1\u5668\u4f5c\u4e3a\u4e2d\u8f6c\uff0c\u8fd9\u6837\u5bf9\u4f7f\u7528\u4f9d\u7136\u6709\u4e00\u5b9a\u7684\u5f71\u54cd\uff0c\u4e8e\u662f\u6211\u73b0\u5728\uff0c\u66f4\u6362\u6210\u4e86ZeroTier\u7a7f\u900f\u65b9\u5f0f\uff0c\u5728\u8fd9\u91cc\u8bb0\u5f55\u4e00\u4e0b\u4f7f\u7528Windows\u4f5c\u4e3a\u5ba2\u6237\u7aef\u65f6\uff0c\u642d\u5efaZeroTier\u7684\u4e00\u4e9b\u5751\u548c\u6ce8\u610f\u4e8b\u9879\u3002<\/p><\/blockquote>\n\n\n\n<p>\u4e0b\u8f7d\u5c31\u4e0d\u8bf4\u4e86\uff0c\u76f4\u63a5\u4e0b\u8f7dmsi\u5b89\u88c5\u5305\u5373\u53ef\uff0c\u5728\u8fdc\u7a0b\u684c\u9762\u4e0a\u76f4\u63a5\u5b89\u88c5\u53ef\u80fd\u4f1a\u6709\u70b9\u5c0f\u95ee\u9898\uff0c\u5b98\u65b9\u63a8\u8350\u7684\u5b89\u88c5\u65b9\u6cd5\uff0c\u662f\u4f7f\u7528\u7ba1\u7406\u5458\u6743\u9650\u7684cmd\u5b89\u88c5<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>msiexec \/i\u00a0\"ZeroTier One.msi\"<\/code><\/pre>\n\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\u4ee5\u540e\uff0c\u4f1a\u6709\u4e24\u4e2a\u8def\u5f84\u9700\u8981\u6ce8\u610f\uff0c\u5206\u522b\u662f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>C:\\Program Files (x86)\\ZeroTier\\One<\/code><\/pre>\n\n\n\n<p>\u8fd9\u4e00\u4e2a\u8def\u5f84\u662f\u547d\u4ee4\u7684\u5b89\u88c5\u8def\u5f84\uff0c\u4e4b\u540e\u7684\u547d\u4ee4\u90fd\u4ee5\u8fd9\u4e2a\u8def\u5f84\u4e3a\u6839\u8def\u5f84\u8f93\u5165<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>C:\\ProgramData\\ZeroTier\\One<\/code><\/pre>\n\n\n\n<p>\u8fd9\u662f\u914d\u7f6e\u6587\u4ef6\u7684\u8def\u5f84\uff0c\u914d\u7f6e\u6587\u4ef6\u4ee5\u53caZeroTier\u7684\u672c\u4f53\u90fd\u5728\u8fd9\u4e2a\u8def\u5f84\u91cc\u9762<\/p>\n\n\n\n<p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u5728<a href=\"https:\/\/my.zerotier.com\/\">\u5b98\u65b9\u7684\u9762\u677f\u7f51\u7ad9<\/a>\u4e0a\u6ce8\u518c\u4e00\u4e2a\u7f51\u7edcID\u8d26\u53f7\uff0c\u767b\u5f55\u4e4b\u540e\u70b9\u51fbNetwork\u533a\u6bb5\uff0c\u91cc\u9762\u5e94\u8be5\u9ed8\u8ba4\u5df2\u7ecf\u521b\u5efa\u597d\u4e86\u4e00\u4e2a\u7f51\u7edc\u533a\u5757\uff0c\u70b9\u51fb\u8fdb\u5165\u8fd9\u4e2a\u533a\u5757\uff0c\u5148\u4e0d\u8981\u5173\u95ed\u9875\u9762<\/p>\n\n\n\n<p>\u4e4b\u540e\u5728ZeroTier One\u7684\u8f6f\u4ef6\u64cd\u4f5c\u754c\u9762\uff0c\u70b9\u51fb\u53f3\u952eJoin Network...\u8f93\u5165Network ID\uff0c\u5c31\u53ef\u4ee5\u52a0\u5165\u7f51\u7edc\u533a\u5757\u4e86\uff0c\u4e4b\u540e\u5728\u9762\u677f\u5185\uff0c\u627e\u5230Members\uff0c\u52fe\u9009\u4f60\u521a\u521a\u52a0\u5165\u7684\u7f51\u7edc\u8bbe\u5907\uff0c\u90a3\u4e48\u8fd9\u53f0\u8bbe\u5907\u5c31\u52a0\u5165\u4f60\u7684ZeroTier\u5c40\u57df\u7f51\u5185\u4e86\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Moon\u5728Windows\u4e0a\u7684\u914d\u7f6e<\/h2>\n\n\n\n<p>\u91cd\u70b9\u6765\u4e86\uff0c\u5982\u679c\u4e0d\u914d\u7f6e\u79c1\u6709Moons\u670d\u52a1\u5668\uff0c\u6240\u6709\u7684ZeroTier\u7f51\u7edc\u670d\u52a1\u5668\u90fd\u662f\u5728\u56fd\u5916\u7684\uff0c\u5bf9\u4e8e\u56fd\u5185\u7684\u7528\u6237\u5341\u5206\u7684\u4e0d\u53cb\u597d\uff0c\u90a3\u4e48\u8fd9\u4e2a\u65f6\u5019\u5c31\u9700\u8981\u6211\u4eec\u52a0\u5165\u4e00\u4e2a\u62e5\u6709\u56fd\u5185\u516c\u7f51\u7684\u670d\u52a1\u5668\uff0c\u6765\u52a0\u901fZeroTier\u7684\u7f51\u7edc\u4e92\u8054\u901f\u5ea6\u3002<\/p>\n\n\n\n<p>\u7531\u4e8e\u6211\u7684Aliyun\u670d\u52a1\u5668\u662fWindows Servers\uff0c\u6240\u4ee5\u5728\u5168\u90fd\u662fLinux\u7684\u6559\u7a0b\u91cc\u9762\u8e29\u4e86\u4e0d\u5c11\u5751\u3002<\/p>\n\n\n\n<p>\u9996\u5148\u662f\u751f\u6210\u914d\u7f6e\u6587\u4ef6\uff0c\u7f51\u4e0a\u7684\u6559\u7a0b\u662f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>zerotier-idtool initmoon identity.public > moon.json<\/code><\/pre>\n\n\n\n<p>\u5728Windows\u4e0a\u4f60\u9700\u8981\u4f7f\u7528\u7ba1\u7406\u5458\u6743\u9650\u7684CMD\u8fdb\u5165\u5b89\u88c5\u8def\u5f84\u6267\u884c\uff0c\u4f46\u4f60\u4f1a\u9047\u5230\u7b2c\u4e00\u4e2a\u9519\u8bef<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>identity.public is not a valid identity<\/code><\/pre>\n\n\n\n<p>\u4f60\u4f1a\u53d1\u73b0\u8def\u5f84\u91cc\u6ca1\u6709identity.public\u8fd9\u4e2a\u6587\u4ef6\uff0c\u5176\u5b9e\u8fd9\u4e2a\u6587\u4ef6\u5728ZeroTier\u7684\u914d\u7f6e\u8def\u5f84\u4e0b\uff0c\u6240\u4ee5\u4f60\u9700\u8981\u6267\u884c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>zerotier-idtool initmoon \"C:\\ProgramData\\ZeroTier\\One\\identity.public\" > moon.json<\/code><\/pre>\n\n\n\n<p>\u4e4b\u540e\u5728\"stableEndpoints\"\u4e2d\u914d\u7f6e\u597d\u516c\u7f51IP\uff0c\u5207\u8bb0\u7aef\u53e3\u53ea\u80fd\u662f9993\uff0c\u5728\u7f51\u4e0a\u67e5\u5230\u4e86\u4fee\u6539\u7aef\u53e3\u7684\u65b9\u6cd5\uff0c\u4f46\u6211\u672c\u8eab\u6ca1\u6709\u5c1d\u8bd5\u8fc7\uff1b\u4fee\u6539\u65b9\u6cd5\u4e3a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>\u5728\u8fd0\u884c\u7a0b\u5e8f\u540c\u7ea7\u76ee\u5f55\u4e0b\u5efa\u7acblocal.conf\u6587\u4ef6:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>{\n \u00a0 \u00a0\"settings\":\n\u00a0  \u00a0{\n\u00a0 \u00a0 \u00a0   \"primaryPort\":9994\n  \u00a0 }\n}<\/code><\/pre>\n\n\n\n<p>local.conf \u5b8c\u6574\u914d\u7f6e\u793a\u4f8b\u5982\u4e0b:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"physical\": { \/* Settings that apply to physical L2\/L3 network paths. *\/\n        \"NETWORK\/bits\": { \/* Network e.g. 10.0.0.0\/24 or fd00::\/32 *\/\n            \"blacklist\": true|false, \/* If true, blacklist this path for all ZeroTier traffic *\/\n            \"trustedPathId\": 0|!0 \/* If present and nonzero, define this as a trusted path (see below) *\/\n        } \/* ,... additional networks *\/\n    },\n    \"virtual\": { \/* Settings applied to ZeroTier virtual network devices (VL1) *\/\n        \"##########\": { \/* 10-digit ZeroTier address *\/\n            \"try\": [ \"IP\/port\"\/*,...*\/ ], \/* Hints on where to reach this peer if no upstreams\/roots are online *\/\n            \"blacklist\": [ \"NETWORK\/bits\"\/*,...*\/ ] \/* Blacklist a physical path for only this peer. *\/\n        }\n    },\n    \"settings\": { \/* Other global settings *\/\n        \"primaryPort\": 0-65535, \/* If set, override default port of 9993 and any command line port *\/\n        \"portMappingEnabled\": true|false, \/* If true (the default), try to use uPnP or NAT-PMP to map ports *\/\n        \"softwareUpdate\": \"apply\"|\"download\"|\"disable\", \/* Automatically apply updates, just download, or disable built-in software updates *\/\n        \"softwareUpdateChannel\": \"release\"|\"beta\", \/* Software update channel *\/\n        \"softwareUpdateDist\": true|false, \/* If true, distribute software updates (only really useful to ZeroTier, Inc. itself, default is false) *\/\n        \"interfacePrefixBlacklist\": [ \"XXX\",... ], \/* Array of interface name prefixes (e.g. eth for eth#) to blacklist for ZT traffic *\/\n        \"allowManagementFrom\": \"NETWORK\/bits\"|null, \/* If non-NULL, allow JSON\/HTTP management from this IP network. Default is 127.0.0.1 only. *\/\n        \"allowTcpFallbackRelay\": true|false \/* Allow or disallow establishment of TCP relay connections (true by default) *\/\n    }\n}<\/pre>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<p>\u4e4b\u540e\u751f\u6210moon\u6587\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>zerotier-idtool genmoon moon.json<\/code><\/pre>\n\n\n\n<p>\u4e4b\u540e\u4f1a\u5728\u5b89\u88c5\u8def\u5f84\u4e0b\u751f\u6210\u4e00\u4e2a\u7c7b\u4f3c000000xxxxx.moon\u7684\u6587\u4ef6<\/p>\n\n\n\n<p>\u7136\u540e\u5728\u914d\u7f6e\u8def\u5f84\u4e0b\uff0c\u65b0\u5efa\u4e00\u4e2amoons.d\u6587\u4ef6\u5939\uff0c\u5c06moon\u6587\u4ef6\u79fb\u52a8\u5230\u8fd9\u4e2a\u6587\u4ef6\u5939\u5185<\/p>\n\n\n\n<p><strong>\u91cd\u542fZeroTier\u670d\u52a1<\/strong><\/p>\n\n\n\n<p>\u8fd9\u662fWindows\u7684\u7b2c\u4e8c\u4e2a\u5751\uff0c\u4f60\u4f1a\u53d1\u73b0\u9000\u51faZeroTier One\u8f6f\u4ef6\uff0c\u5176\u5b9eZeroTier\u670d\u52a1\u8fd8\u662f\u6ca1\u6709\u9000\u51fa\uff0c\u4f9d\u7136\u5728\u540e\u53f0\u8fd0\u884c\uff0c\u7f51\u4e0a\u7684\u6559\u7a0b\u6709\u8bf4\u91cd\u542f\u7535\u8111\u7684\uff0c\u90a3\u662f\u4e00\u79cd\u89e3\u51b3\u65b9\u6cd5\uff0c\u4f46\u5176\u5b9e\u771f\u6b63\u7684\u91cd\u542f\u670d\u52a1\u7684\u65b9\u6cd5\u5e94\u8be5\u662f\uff0c\u6253\u5f00Windows\u5185\u90e8\u7684\u670d\u52a1\u63a7\u5236\u5668\uff0c\u8fd0\u884cservices.msc\uff0c\u5728\u91cc\u9762\u627e\u5230ZeroTier One\u670d\u52a1\uff0c\u624b\u52a8\u505c\u6b62\u5e76\u91cd\u65b0\u542f\u52a8\uff0c\u8fd9\u6837\u5c31\u5b8c\u6210\u4e86ZeroTier One\u7684\u91cd\u542f\u6d41\u7a0b\u3002<\/p>\n\n\n\n<p>\u5ba2\u6237\u7aef\u65b9\u9762\uff0c\u4e5f\u662f\u53ea\u9700\u8981\u5c06moon\u914d\u7f6e\u6587\u4ef6\u653e\u5230\u76f8\u540c\u7684\u4f4d\u7f6e\uff0c\u6309\u7167\u76f8\u540c\u7684\u65b9\u6cd5\u91cd\u542f\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56e0\u4e3a\u5f88\u591a\u5f88\u591a\u7684\u539f\u56e0\uff0c\u6211\u65f6\u5e38\u8981\u8fdc\u7a0b\u63a7\u5236\u4e00\u4e0b\u5728\u5bb6\u91cc\u548c\u5728&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/www.346pro.club\/?p=80\">Continue reading<span class=\"screen-reader-text\">\u5185\u7f51\u7a7f\u900f\u5927\u8bb0\u5f55<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-80","post","type-post","status-publish","format-standard","hentry","category-technology","entry"],"_links":{"self":[{"href":"https:\/\/www.346pro.club\/index.php?rest_route=\/wp\/v2\/posts\/80","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.346pro.club\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.346pro.club\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.346pro.club\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.346pro.club\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=80"}],"version-history":[{"count":0,"href":"https:\/\/www.346pro.club\/index.php?rest_route=\/wp\/v2\/posts\/80\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.346pro.club\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=80"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.346pro.club\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=80"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.346pro.club\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=80"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}