{"id":78,"date":"2022-04-19T20:34:22","date_gmt":"2022-04-19T12:34:22","guid":{"rendered":"https:\/\/www.laning.cc\/?p=78"},"modified":"2022-06-16T09:04:55","modified_gmt":"2022-06-16T01:04:55","slug":"wireguard%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/","title":{"rendered":"WireGuard\u914d\u7f6e"},"content":{"rendered":"<h1>\u4ec0\u4e48\u662fWireGuard\uff1f<\/h1>\n<p>WireGuard\u662f\u7531Jason Donenfeld\u7b49\u4eba\u7528C\u8bed\u8a00\u7f16\u5199\u7684\u5f00\u6e90VPN\u89e3\u51b3\u65b9\u6848\uff0c\u4ee3\u7801\u53ea\u67094000\u591a\u884c\uff0cLinux\u4e4b\u7236Linus Torvalds\u8bc4\u4ef7\u5b83\u662fWork of art\u3002\u622a\u6b622020\u5e741\u6708\uff0cWireGuard\u5df2\u7ecf\u5408\u5e76\u5230Linux5.6\u5185\u6838\u4e2d\uff0c\u5927\u591a\u6570Linux\u7248\u672c\u53ef\u4ee5\u505a\u5230\u5f00\u7bb1\u5373\u7528\u3002<\/p>\n<h1>\u4e3a\u4ec0\u4e48\u662fWireGuard\uff1f<\/h1>\n<p>\u5c31\u4e2a\u4eba\u4f7f\u7528\u4f53\u9a8c\u6765\u8bf4\uff0cWireguard\u5177\u6709<strong>\u4f4e\u5ef6\u8fdf<\/strong>\u3001<strong>\u5f3a\u52a0\u5bc6<\/strong>\u3001<strong>\u4f4e\u7cfb\u7edf\u5360\u7528<\/strong>\u7684\u7279\u70b9\u3002<\/p>\n<h1>\u9700\u6c42\u5206\u6790\uff1f<\/h1>\n<p>\u5bb6\u5ead\u7535\u4fe1\u5bbd\u5e26\u7533\u8bf7\u5230\u4e86\u516c\u7f51IP\u5730\u5740\uff0c\u4f46\u5982\u679c\u5728\u5916\u5730\u60f3\u8bbf\u95ee\u5bb6\u5ead\u7f51\u7edc\uff0c\u6216\u8005\u591a\u4e2a\u65e0\u516c\u7f51\u7684\u8ba1\u7b97\u673a\u9700\u8981\u4e92\u76f8\u8bbf\u95ee\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528WireGuard\u7ec4\u7f51\u3002<\/p>\n<h1>\u9700\u8981\u4ec0\u4e48\uff1f<\/h1>\n<p>\u4e00\u53f0\u6709\u516c\u7f51IP\u7684\u670d\u52a1\u5668<\/p>\n<p>\u5176\u4ed6\u9700\u8981\u7ec4\u7f51\uff08\u4e92\u76f8\u8bbf\u95ee\uff0c\u4f46\u6ca1\u6709\u516c\u7f51\uff09\u7684\u673a\u5668<\/p>\n<h1>\u5982\u4f55\u5f00\u59cb\uff1f<\/h1>\n<p>\u5173\u4e8eWireGuard\u7684\u914d\u7f6e\u4e00\u822c\u7684\u5ba3\u4f20\u90fd\u58f0\u79f0WireGuard\u5177\u6709\u914d\u7f6e\u7b80\u5355\uff0c\u4f46\u5c31\u4e2a\u4eba\u4f53\u9a8c\u6765\u8bf4\uff0cWireGuard\u7684\u914d\u7f6e\u8fc7\u7a0b\uff0c\u5bf9\u65b0\u624b\u6765\u8bf4\u5e76\u4e0d\u53cb\u597d\uff0c\u5176\u4e2d\u6d89\u53ca\u5230Linux\u57fa\u672c\u64cd\u4f5c\u3001iptables\u9632\u706b\u5899\u89c4\u5219\u3001\u8ba1\u7b97\u673a\u7f51\u7edc\u76f8\u5173\u7b49\u77e5\u8bc6\uff0c\u8fd9\u5bf9\u4e8e\u4e00\u4e9b\u5c0f\u767d\u6765\u8bf4\u5e76\u4e0d\u53cb\u597d\u3002<\/p>\n<p>\u6240\u4ee5\u6211\u63a8\u8350\u5728<strong>\u516c\u7f51\u670d\u52a1\u5668\u7aef<\/strong>\u7528Github\u4e0a\u7684\u4e00\u952e\u5b89\u88c5\u811a\u672c\uff1a<\/p>\n<p><a href=\"https:\/\/github.com\/angristan\/wireguard-install\">https:\/\/github.com\/angristan\/wireguard-install<\/a><\/p>\n<p>\u811a\u672c\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\uff08root\u6743\u9650\uff09\u9996\u6b21\u6267\u884c\u9700\u8981\u81ea\u5df1\u914d\u7f6e\u516c\u7f51\u7684\u7f51\u7edc\u63a5\u53e3\uff08\u4e00\u822c\u4e3aeth0\uff09\u3001\u516c\u7f51IP\u5730\u5740\uff08\u6216\u57df\u540d\uff09\u3001VPN\u7f51\u6bb5\uff08\u9ed8\u8ba4\u4e3a\uff1a10.66.66.0\/24\uff09\u7b49\u914d\u7f6e\uff0c\u5176\u4ed6\u914d\u7f6e\u53ef\u4ee5\u4fdd\u6301\u9ed8\u8ba4\u5373\u53ef\uff0c\u670d\u52a1\u7aef\u7684\u914d\u7f6e\u6587\u4ef6\u5728\/etc\/wireguard\/wg0.conf<\/p>\n<p>\u518d\u6b21\u6267\u884c\u811a\u672c\u53ef\u4ee5\u8fdb\u884c\u6dfb\u52a0\u7528\u6237\u3001\u79fb\u9664\u7528\u6237\u3001\u79fb\u9664WireGuard\u7b49\u64cd\u4f5c\u3002\u6dfb\u52a0\u7528\u6237\u64cd\u4f5c\uff0c\u6307\u5b9a\u7528\u6237\u540d\u548cIP\u5730\u5740\uff08VPN\u7f51\u6bb5\u5730\u5740\uff09\u540e\uff0c\u4f1a\u5728\u811a\u672c\u76ee\u5f55\u751f\u6210\u5bf9\u5e94\u7aef\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u547d\u4ee4\u884c\u6267\u884cls\uff0c\u4f1a\u6709\u540d\u4e3awg0-client-username.conf\u914d\u7f6e\u6587\u4ef6\uff0c\u5728\u4e0b\u4e00\u6b65\u6211\u4eec\u9700\u8981\u7528\u5230\u8fd9\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9\u3002<\/p>\n<p>\u5728<strong>\u975e\u516c\u7f51\u7aef<\/strong>\uff0c\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u7684\u4e0d\u540c\uff0c\u53ef\u80fd\u9700\u8981\u5b89\u88c5\u7684\u5305\u4e0d\u540c\uff0c\u4f8b\u5982Debian\u7cfb\u53ef\u80fd\u9700\u8981\u68c0\u67e5\u662f\u5426\u6709\u8fd9\u51e0\u4e2a\u5305\uff1a<strong>wireguard-tools<\/strong>\u00a0 \u5bf9\u4e8e\u5185\u6838\u7248\u672c\u4f4e\u4e8e5.6\u7684Linux\u53ef\u80fd\u8fd8\u9700\u8981<strong>wireguard-dkms<\/strong>\u8fd9\u4e2a\u5305\uff0c\u5305\u4f9d\u8d56\u5b89\u88c5\u597d\u540e\uff0c\u4f7f\u7528root\u6743\u9650\u5728\/etc\/wireguard\u4e0b\u521b\u5efawg0.conf\u6587\u4ef6\uff0c\u5c06\u516c\u7f51\u7aef\u811a\u672c\u76ee\u5f55\u4e0b\u7684\u914d\u7f6e\u6587\u4ef6\u5185\u5bb9\uff08wg0-client-username.conf\uff09\u5199\u5165\u6b64\u6587\u4ef6\u3002<\/p>\n<h1>\u5982\u4f55\u8fdb\u4e00\u6b65\u914d\u7f6e\uff1f<\/h1>\n<p>\u5047\u8bbe\u6709PeerA\uff0cPeerB\u3001PeerC\u4e09\u53f0\u670d\u52a1\u5668\uff0c\u5176\u4e2dPeerA\u4e3a\u516c\u7f51\uff0cB\u3001C\u65e0\u516c\u7f51<\/p>\n<p><strong>PeerA\u7684\/etc\/wireguard\/wg0.conf\u914d\u7f6e\u5185\u5bb9\u4e00\u822c\u5982\u4e0b\uff1a<\/strong>\uff08\u4e0a\u9762\u7684\u811a\u672c\u4f1a\u81ea\u52a8\u751f\u6210\uff0c\u4e00\u822c\u4e0d\u9700\u8981\u4fee\u6539\uff01\uff01\uff01\uff09<\/p>\n<pre><code>[Interface]\r\nAddress = 10.66.66.1\/24,fd42:42:42::1\/64\r\nListenPort = 10086\r\nPrivateKey = PeerA\u79c1\u94a5\uff0c\u811a\u672c\u4f1a\u81ea\u52a8\u751f\u6210\r\nPostUp = iptables -A FORWARD -i eth0 -o wg0 -j ACCEPT; iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\u00a0 \u00a0###\u542f\u52a8wg0\uff0c\u9632\u706b\u5899\u64cd\u4f5c\uff0c\u7531\u811a\u672c\u81ea\u52a8\u751f\u6210\r\nPostDown = iptables -D FORWARD -i eth0 -o wg0 -j ACCEPT; iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE\u00a0 \u00a0 ###\u5173\u95edwg0\u65f6\uff0c\u9632\u706b\u5899\u7684\u64cd\u4f5c\uff0c\u7531\u811a\u672c\u81ea\u52a8\u751f\u6210\r\n\r\n### Client PeerB\r\n[Peer]\r\nPublicKey = PeerB\u516c\u94a5\uff0c\u811a\u672c\u81ea\u52a8\u751f\u6210\r\nPresharedKey = PeerB\u9884\u5171\u4eab\u5bc6\u94a5\uff0c\u811a\u672c\u81ea\u52a8\u751f\u6210\r\nAllowedIPs = 10.66.66.2\/32,fd42:42:42::2\/128\r\n\r\n### Client PeerC\r\n[Peer]\r\nPublicKey =PeerC\u516c\u94a5\uff0c\u811a\u672c\u81ea\u52a8\u751f\u6210\r\nPresharedKey = PeerC\u9884\u5171\u4eab\u5bc6\u94a5\uff0c\u811a\u672c\u81ea\u52a8\u751f\u6210\r\nAllowedIPs = 10.66.66.3\/32,fd42:42:42::3\/128<\/code><\/pre>\n<p><strong>PeerB\u7684\/etc\/wireguard\/wg0.conf\u914d\u7f6e\u5185\u5bb9\u4e00\u822c\u5982\u4e0b\uff1a<\/strong>\uff08\u53ef\u4ee5\u5728PeerA\u811a\u672c\u7684\u76ee\u5f55\u4e0bwg0-client-PeerBname.conf\u590d\u5236\u8fc7\u6765\uff09<\/p>\n<pre><code>[Interface]\r\nPrivateKey = PeerB\u79c1\u94a5\uff0c\u811a\u672c\u81ea\u52a8\u5728\u516c\u7f51\u7aef\u751f\u6210\r\nAddress = 10.66.66.2\/32,fd42:42:42::2\/128\r\nDNS = 114.114.114.114,94.140.15.15\r\n\r\n[Peer]\r\nPublicKey = PeerA\u516c\u94a5\uff0c\u811a\u672c\u81ea\u52a8\u751f\u6210\r\nPresharedKey = \u9884\u5171\u4eab\u5bc6\u94a5\uff0c\u811a\u672c\u81ea\u52a8\u751f\u6210\r\nEndpoint = Peer\u516c\u7f51IP\u6216\u57df\u540d:10086\r\nAllowedIPs = 0.0.0.0\/0,::\/0<\/code><\/pre>\n<p><strong>PeerC\u7684\/etc\/wireguard\/wg0.conf\u914d\u7f6e\u5185\u5bb9\u4e00\u822c\u5982\u4e0b\uff1a<\/strong>\uff08\u53ef\u4ee5\u5728PeerA\u811a\u672c\u7684\u76ee\u5f55\u4e0bwg0-client-PeerCname.conf\u590d\u5236\u8fc7\u6765\uff09<\/p>\n<pre><code>[Interface]\r\nPrivateKey = PeerC\u516c\u94a5\uff0c\u811a\u672c\u81ea\u52a8\u5728\u516c\u7f51\u7aef\u751f\u6210\r\nAddress = 10.66.66.2\/32,fd42:42:42::2\/128\r\nDNS = 114.114.114.114,94.140.15.15\r\n\r\n[Peer]\r\nPublicKey = PeerA\u79c1\u94a5\uff0c\u811a\u672c\u81ea\u52a8\u751f\u6210\r\nPresharedKey = \u9884\u5171\u4eab\u5bc6\u94a5\uff0c\u811a\u672c\u81ea\u52a8\u751f\u6210\r\nEndpoint = Peer\u516c\u7f51IP\u6216\u57df\u540d:10086\r\nAllowedIPs = 0.0.0.0\/0,::\/0<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>\u4e0b\u9762\u6211\u4eec\u4ece\u4e0b\u9762\u8fd9\u4e2a\u4f8b\u5b50\u6765\u7406\u89e3AllowedIPs\u9009\u9879\uff1a<\/p>\n<p>\u5047\u8bbeB\u73b0\u5728\u5728\u8bf7\u6c42112.154.12.141\u8fd9\u4e2aIP\uff0c\u56e0\u4e3aB\u7684Peer\u914d\u7f6e\u4e2dAllowIPs\u4e3a0.0.0.0\/0\uff0c\u6240\u4ee5\u8fd9\u4e2a\u6d41\u91cf\u4f1a\u88ab\u8f6c\u53d1\u7ed9A,\u800cA\u4e2dPeer\u914d\u7f6e\u6ca1\u6709\u5339\u914d\u7684AllowedIPs,\u6240\u4ee5\u8fd9\u4e2a\u8bf7\u6c42\u4f1a\u88abA\u5904\u7406\uff0cA\u5c06\u5904\u7406\u7ed3\u679c\u8fd4\u56de\u7ed9B\uff1b\u5982\u679cB\u8bbf\u95ee\u7684IP\u4e3a10.66.66.3\uff0cB\u5c06\u6d41\u91cf\u53d1\u7ed9A,A\u7684Peer\u914d\u7f6e\u4e2d\u6709\u5339\u914d\u7684AllowIPs,\u5373C\u7684\u914d\u7f6e\uff0c\u6240\u4ee5A\u4f1a\u628a\u5904\u7406\u4e22\u7ed9C,\u8fd9\u6837\u5c31\u5b9e\u73b0\u4e86B\u5230C\u7684\u8bbf\u95ee\uff0c\u5230\u8fd9\u91cc\uff0c\u4f60\u5e94\u8be5\u5bf9AllowedIPs\u8fd9\u4e2a\u914d\u7f6e\u9009\u9879\u6709\u4e86\u4e00\u5b9a\u7684\u8ba4\u8bc6\u3002\u6211\u4eec\u4e0d\u96be\u53d1\u73b0\u5982\u679c\u53ea\u662f\u60f3\u5b9e\u73b0B\u5230C\u6216\u8005C\u5230B\u7684\u8bbf\u95ee\uff0c\u6ca1\u6709\u5fc5\u8981\u5c06AllowedIPs\u914d\u7f6e\u4e3a0.0.0.0\/0,\u53ea\u9700\u8981\u914d\u7f6e\u4e3a\u5bf9\u65b9\u7684IP\u5730\u5740\u5c31\u53ef\u4ee5\u5b9e\u73b0\u3002<\/p>\n<p>\u5982\u679c\u6211\u4eec\u60f3\u5728B\u7684\u5c40\u57df\u7f51\u7f51\u6bb5192.168.22.0\/24\u8bbf\u95eeC\u7684\u5c40\u57df\u7f51\u7f51\u6bb5192.168.33.0\/24\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n<p>\u5728B\u7684Peer\u4e2dAllowedIPs\u6dfb\u52a0192.168.33.0\/24\uff0c\u5728A\u7684Peer\u7684C\u914d\u7f6eAllowIPs\u5904\u6dfb\u52a0192.168.33.0\/24,\u8fd9\u6837\u5c31\u80fd\u5b9e\u73b0B\u8bbf\u95eeC\u7684\u5c40\u57df\u7f51\u7f51\u6bb5<\/p>\n<p>\u53e6\u5916\u8fd8\u6709\u4e00\u4e2a<strong>\u5f88\u91cd\u8981<\/strong>\u7684\u914d\u7f6e\uff0c\u867d\u7136\u8fd9\u4e2a\u914d\u7f6e\u9009\u9879\u8fdd\u80cc\u4e86WireGuard\u4f4e\u8d44\u6e90\u6d88\u8017\u7684\u521d\u8877\uff0c\u4f46\u662f\u5bf9\u4e8eNAT\u540e\u9762\u7684\u7f51\u7edc\uff08\u6ca1\u6709\u516c\u7f51IP\uff09\u662f\u975e\u5e38\u91cd\u8981\u7684\uff0c\u5373\u5728PeerB\u548cPeerC\u73b0\u6709\/etc\/wireguard\/wg0.conf\u914d\u7f6e\u540e\u9762\u6dfb\u52a0<\/p>\n<p><strong>PersistentKeepalive = 25<\/strong><\/p>\n<p>\u8fd9\u4e2a\u914d\u7f6e\u662f\u4e3a\u4e86\u4fdd\u6d3b\u914d\u7f6e\uff0c\u5426\u5219\u4f60\u4f1a\u9047\u5230\u5728\u521a\u914d\u7f6e\u7684\u4e00\u6bb5\u65f6\u95f4\u4e92\u76f8\u8bbf\u95ee\u6ca1\u6709\u95ee\u9898\uff0c\u800c\u4e00\u6bb5\u65f6\u95f4\u540e\uff0cPeerB\u548cPeerC\u80fdping\u901aPeerA\uff0c\u4f46\u662fPeerA\u4e0d\u80fdping\u901aPeerB\u548cPeerC,\u4ee5\u53caPeerB\u3001PeerC\u4e4b\u95f4\u4e0d\u80fd\u4e92\u76f8\u8bbf\u95ee\u7684\u5c34\u5c2c\u5c40\u9762\u3002<\/p>\n<p>\u4e0a\u8ff0\u914d\u7f6e\u5b8c\u6210\u540e\u53ef\u4ee5\u5728PeerB\u548cPeerC\u6267\u884c\u00a0 sudo wg-quick up wg0\u00a0 \u00a0\u542f\u52a8WireGuard<\/p>\n<p>\u4ee5\u53ca\u53ef\u4ee5\u901a\u8fc7\u00a0 sudo\u00a0 systemctl enable wg-quick@wg0\u00a0 \u00a0\u6dfb\u52a0\u5f00\u673a\u81ea\u542f\u52a8<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ec0\u4e48\u662fWireGuard\uff1f WireGuard\u662f\u7531Jason Donenfeld\u7b49\u4eba\u7528C\u8bed\u8a00\u7f16\u5199\u7684\u5f00\u6e90VPN\u89e3 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,2],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WireGuard\u914d\u7f6e &ndash; Laning &#039;s Blog<\/title>\n<meta name=\"description\" content=\"WireGuard\u914d\u7f6e\u7684\u4e00\u4e9b\u793a\u4f8b\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WireGuard\u914d\u7f6e &ndash; Laning &#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"WireGuard\u914d\u7f6e\u7684\u4e00\u4e9b\u793a\u4f8b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/\" \/>\n<meta property=\"og:site_name\" content=\"Laning &#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-19T12:34:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-16T01:04:55+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"laning\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.laning.org\/#website\",\"url\":\"https:\/\/blog.laning.org\/\",\"name\":\"\\u8fa3\\u5b81\\u7684\\u535a\\u5ba2\",\"description\":\"Learning on the go\",\"publisher\":{\"@id\":\"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.laning.org\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-CN\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/#webpage\",\"url\":\"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/\",\"name\":\"WireGuard\\u914d\\u7f6e &ndash; Laning &#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.laning.org\/#website\"},\"datePublished\":\"2022-04-19T12:34:22+00:00\",\"dateModified\":\"2022-06-16T01:04:55+00:00\",\"description\":\"WireGuard\\u914d\\u7f6e\\u7684\\u4e00\\u4e9b\\u793a\\u4f8b\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\\u9996\\u9875\",\"item\":\"https:\/\/blog.laning.org\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WireGuard\\u914d\\u7f6e\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/#webpage\"},\"author\":{\"@id\":\"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93\"},\"headline\":\"WireGuard\\u914d\\u7f6e\",\"datePublished\":\"2022-04-19T12:34:22+00:00\",\"dateModified\":\"2022-06-16T01:04:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/#webpage\"},\"wordCount\":164,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93\"},\"articleSection\":[\"Github\",\"RaspberryPI\"],\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/#respond\"]}]},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93\",\"name\":\"laning\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/blog.laning.org\/#personlogo\",\"inLanguage\":\"zh-CN\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/17215f328425d53537532588320693a1?s=96&d=retro&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/17215f328425d53537532588320693a1?s=96&d=retro&r=g\",\"caption\":\"laning\"},\"logo\":{\"@id\":\"https:\/\/blog.laning.org\/#personlogo\"},\"sameAs\":[\"https:\/\/blog.laning.org\"],\"url\":\"https:\/\/blog.laning.org\/index.php\/author\/laning\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WireGuard\u914d\u7f6e &ndash; Laning &#039;s Blog","description":"WireGuard\u914d\u7f6e\u7684\u4e00\u4e9b\u793a\u4f8b","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/","og_locale":"zh_CN","og_type":"article","og_title":"WireGuard\u914d\u7f6e &ndash; Laning &#039;s Blog","og_description":"WireGuard\u914d\u7f6e\u7684\u4e00\u4e9b\u793a\u4f8b","og_url":"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/","og_site_name":"Laning &#039;s Blog","article_published_time":"2022-04-19T12:34:22+00:00","article_modified_time":"2022-06-16T01:04:55+00:00","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"laning","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/blog.laning.org\/#website","url":"https:\/\/blog.laning.org\/","name":"\u8fa3\u5b81\u7684\u535a\u5ba2","description":"Learning on the go","publisher":{"@id":"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.laning.org\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-CN"},{"@type":"WebPage","@id":"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/#webpage","url":"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/","name":"WireGuard\u914d\u7f6e &ndash; Laning &#039;s Blog","isPartOf":{"@id":"https:\/\/blog.laning.org\/#website"},"datePublished":"2022-04-19T12:34:22+00:00","dateModified":"2022-06-16T01:04:55+00:00","description":"WireGuard\u914d\u7f6e\u7684\u4e00\u4e9b\u793a\u4f8b","breadcrumb":{"@id":"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/#breadcrumb"},"inLanguage":"zh-CN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/blog.laning.org\/"},{"@type":"ListItem","position":2,"name":"WireGuard\u914d\u7f6e"}]},{"@type":"Article","@id":"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/#article","isPartOf":{"@id":"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/#webpage"},"author":{"@id":"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93"},"headline":"WireGuard\u914d\u7f6e","datePublished":"2022-04-19T12:34:22+00:00","dateModified":"2022-06-16T01:04:55+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/#webpage"},"wordCount":164,"commentCount":0,"publisher":{"@id":"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93"},"articleSection":["Github","RaspberryPI"],"inLanguage":"zh-CN","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.laning.org\/index.php\/2022\/04\/19\/78\/#respond"]}]},{"@type":["Person","Organization"],"@id":"https:\/\/blog.laning.org\/#\/schema\/person\/040331b403ed00370f2fc1e8eb6e6b93","name":"laning","image":{"@type":"ImageObject","@id":"https:\/\/blog.laning.org\/#personlogo","inLanguage":"zh-CN","url":"https:\/\/secure.gravatar.com\/avatar\/17215f328425d53537532588320693a1?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/17215f328425d53537532588320693a1?s=96&d=retro&r=g","caption":"laning"},"logo":{"@id":"https:\/\/blog.laning.org\/#personlogo"},"sameAs":["https:\/\/blog.laning.org"],"url":"https:\/\/blog.laning.org\/index.php\/author\/laning\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/posts\/78"}],"collection":[{"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/comments?post=78"}],"version-history":[{"count":0,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/posts\/78\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/media?parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/categories?post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.laning.org\/index.php\/wp-json\/wp\/v2\/tags?post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}