{"id":975526,"date":"2024-12-27T06:13:58","date_gmt":"2024-12-26T22:13:58","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/975526.html"},"modified":"2024-12-27T06:14:00","modified_gmt":"2024-12-26T22:14:00","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e8%bf%9c%e7%a8%8b%e5%bc%80%e6%9c%ba","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/975526.html","title":{"rendered":"\u5982\u4f55\u7528python\u8fdc\u7a0b\u5f00\u673a"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24200719\/3cb1c3c2-ef0c-4fe9-bd16-71828a223860.webp\" alt=\"\u5982\u4f55\u7528python\u8fdc\u7a0b\u5f00\u673a\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528Python\u8fdc\u7a0b\u5f00\u673a\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u901a\u8fc7Wake-on-LAN\u534f\u8bae\u5524\u9192\u8fdc\u7a0b\u8ba1\u7b97\u673a\u3001\u8bbe\u7f6e\u8fdc\u7a0b\u670d\u52a1\u5668\u5e76\u4f7f\u7528Python\u811a\u672c\u6267\u884c\u5f00\u673a\u547d\u4ee4\u3001\u501f\u52a9\u667a\u80fd\u63d2\u5ea7\u7b49\u786c\u4ef6\u8bbe\u5907\u5b9e\u73b0\u8fdc\u7a0b\u63a7\u5236\u3002<\/strong>\u5176\u4e2d\uff0c<strong>\u901a\u8fc7Wake-on-LAN\u534f\u8bae\u5524\u9192\u8fdc\u7a0b\u8ba1\u7b97\u673a<\/strong>\u662f\u6700\u5e38\u7528\u4e14\u6613\u4e8e\u5b9e\u73b0\u7684\u65b9\u6cd5\u3002Wake-on-LAN\uff08WoL\uff09\u662f\u4e00\u79cd\u7f51\u7edc\u6807\u51c6\u534f\u8bae\uff0c\u5b83\u5141\u8bb8\u901a\u8fc7\u7f51\u7edc\u6d88\u606f\u5524\u9192\u8ba1\u7b97\u673a\u3002\u8981\u4f7f\u7528WoL\uff0c\u9700\u8981\u786e\u4fdd\u76ee\u6807\u8ba1\u7b97\u673a\u7684\u4e3b\u677f\u548c\u7f51\u7edc\u9002\u914d\u5668\u652f\u6301\u8be5\u534f\u8bae\uff0c\u5e76\u4e14\u5df2\u7ecf\u5728BIOS\u548c\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u542f\u7528\u3002<\/p>\n<\/p>\n<p><p>\u5728\u8be6\u7ec6\u63cf\u8ff0\u8fd9\u4e00\u70b9\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u786e\u4fdd\u8ba1\u7b97\u673a\u786c\u4ef6\u652f\u6301Wake-on-LAN\u3002\u7136\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528Python\u7684\u7b2c\u4e09\u65b9\u5e93\u5982<code>wakeonlan<\/code>\uff0c\u901a\u8fc7\u53d1\u9001\u7279\u5b9a\u683c\u5f0f\u7684\u9b54\u672f\u5305\uff08Magic Packet\uff09\u6765\u5b9e\u73b0\u8fdc\u7a0b\u5524\u9192\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u7684\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u901a\u8fc7WAKE-ON-LAN\u534f\u8bae\u5b9e\u73b0\u8fdc\u7a0b\u5f00\u673a<\/p>\n<\/p>\n<p><p>Wake-on-LAN\u662f\u8fdc\u7a0b\u5f00\u673a\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u5b83\u57fa\u4e8e\u7f51\u7edc\u6570\u636e\u5305\u7684\u4f20\u8f93\u6765\u5524\u9192\u8ba1\u7b97\u673a\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u7684\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u68c0\u67e5\u786c\u4ef6\u652f\u6301<\/strong><br \/>\u786e\u4fdd\u76ee\u6807\u8ba1\u7b97\u673a\u7684\u7f51\u7edc\u9002\u914d\u5668\u548c\u4e3b\u677f\u90fd\u652f\u6301Wake-on-LAN\u529f\u80fd\u3002\u901a\u5e38\u5728\u8ba1\u7b97\u673a\u7684BIOS\u6216UEFI\u8bbe\u7f6e\u4e2d\u53ef\u4ee5\u542f\u7528\u6b64\u529f\u80fd\u3002\u8fdb\u5165BIOS\u8bbe\u7f6e\u540e\uff0c\u5bfb\u627e\u7c7b\u4f3c\u201cWake-on-LAN\u201d\u6216\u201cPower Management\u201d\u7684\u9009\u9879\u5e76\u542f\u7528\u5b83\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f51\u7edc\u914d\u7f6e<\/strong><br \/>\u8ba1\u7b97\u673a\u7684\u7f51\u7edc\u9002\u914d\u5668\u4e5f\u9700\u8981\u652f\u6301WoL\uff0c\u5e76\u4e14\u9700\u8981\u5728\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u8fdb\u884c\u914d\u7f6e\u3002\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u5907\u7ba1\u7406\u5668\u627e\u5230\u7f51\u7edc\u9002\u914d\u5668\uff0c\u53f3\u952e\u5c5e\u6027\u4e2d\u6709\u4e00\u9879\u201c\u7535\u6e90\u7ba1\u7406\u201d\u6216\u8005\u201c\u9ad8\u7ea7\u201d\u8bbe\u7f6e\uff0c\u5176\u4e2d\u53ef\u4ee5\u542f\u7528Wake-on-LAN\u529f\u80fd\u3002\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>ethtool<\/code>\u547d\u4ee4\u6765\u67e5\u770b\u548c\u8bbe\u7f6e\u7f51\u7edc\u9002\u914d\u5668\u7684WoL\u529f\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u83b7\u53d6MAC\u5730\u5740<\/strong><br \/>\u83b7\u53d6\u76ee\u6807\u8ba1\u7b97\u673a\u7684MAC\u5730\u5740\uff0c\u8fd9\u662f\u53d1\u9001\u9b54\u672f\u5305\u6240\u5fc5\u9700\u7684\u4fe1\u606f\u3002\u5728Windows\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u8f93\u5165<code>ipconfig \/all<\/code>\u6765\u67e5\u770b\u3002\u5728Linux\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>ifconfig<\/code>\u6216<code>ip addr<\/code>\u547d\u4ee4\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528Python\u53d1\u9001\u9b54\u672f\u5305<\/strong><br \/>Python\u6709\u4e00\u4e2a\u540d\u4e3a<code>wakeonlan<\/code>\u7684\u7b2c\u4e09\u65b9\u5e93\uff0c\u53ef\u4ee5\u7528\u6765\u53d1\u9001WoL\u9b54\u672f\u5305\u3002\u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5\u8be5\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install wakeonlan<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u53ef\u4ee5\u7f16\u5199Python\u811a\u672c\u6765\u53d1\u9001\u9b54\u672f\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from wakeonlan import send_magic_packet<\/p>\n<p>mac_address = &#39;XX:XX:XX:XX:XX:XX&#39;  # \u76ee\u6807\u8ba1\u7b97\u673a\u7684MAC\u5730\u5740<\/p>\n<p>send_magic_packet(mac_address)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6b64\u811a\u672c\u4f7f\u7528<code>send_magic_packet<\/code>\u51fd\u6570\u53d1\u9001\u4e00\u4e2a\u9b54\u672f\u5305\u5230\u6307\u5b9a\u7684MAC\u5730\u5740\uff0c\u4ece\u800c\u5524\u9192\u8fdc\u7a0b\u8ba1\u7b97\u673a\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u8bbe\u7f6e\u8fdc\u7a0b\u670d\u52a1\u5668\u5e76\u4f7f\u7528Python\u811a\u672c\u6267\u884c\u5f00\u673a\u547d\u4ee4<\/p>\n<\/p>\n<p><p>\u9664\u4e86\u4f7f\u7528WoL\u4e4b\u5916\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7\u8fdc\u7a0b\u670d\u52a1\u5668\u6765\u5b9e\u73b0\u8fdc\u7a0b\u5f00\u673a\u3002\u4ee5\u4e0b\u662f\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u642d\u5efa\u8fdc\u7a0b\u670d\u52a1\u5668<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528\u4e91\u670d\u52a1\u63d0\u4f9b\u5546\u63d0\u4f9b\u7684\u865a\u62df\u673a\u4f5c\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u3002\u9009\u62e9\u9002\u5408\u7684\u64cd\u4f5c\u7cfb\u7edf\u5e76\u8fdb\u884c\u57fa\u7840\u914d\u7f6e\uff0c\u5305\u62ec\u9632\u706b\u5899\u8bbe\u7f6e\u3001SSH\u8bbf\u95ee\u7b49\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6eSSH\u8bbf\u95ee<\/strong><br \/>\u786e\u4fdd\u53ef\u4ee5\u901a\u8fc7SSH\u8bbf\u95ee\u76ee\u6807\u8ba1\u7b97\u673a\u3002\u5728\u670d\u52a1\u5668\u548c\u76ee\u6807\u8ba1\u7b97\u673a\u4e4b\u95f4\u5efa\u7acbSSH\u4fe1\u4efb\u5173\u7cfb\uff0c\u901a\u5e38\u9700\u8981\u5728\u670d\u52a1\u5668\u4e0a\u5b58\u50a8\u76ee\u6807\u8ba1\u7b97\u673a\u7684\u516c\u94a5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u5199Python\u811a\u672c<\/strong><br \/>\u5229\u7528Python\u7684<code>paramiko<\/code>\u5e93\uff0c\u53ef\u4ee5\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884cSSH\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install paramiko<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\u7f16\u5199\u811a\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import paramiko<\/p>\n<p>def remote_boot(host, user, key_file):<\/p>\n<p>    ssh = paramiko.SSHClient()<\/p>\n<p>    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())<\/p>\n<p>    ssh.connect(host, username=user, key_filename=key_file)<\/p>\n<p>    # \u6267\u884c\u5f00\u673a\u547d\u4ee4\uff0c\u4f8b\u5982\u901a\u8fc7IPMI\u6216\u8005\u5176\u4ed6\u5de5\u5177<\/p>\n<p>    stdin, stdout, stderr = ssh.exec_command(&#39;ipmitool chassis power on&#39;)<\/p>\n<p>    print(stdout.read().decode())<\/p>\n<p>    ssh.close()<\/p>\n<p>remote_boot(&#39;remote_host_ip&#39;, &#39;username&#39;, &#39;\/path\/to\/private\/key&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u811a\u672c\u901a\u8fc7SSH\u8fde\u63a5\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u5e76\u6267\u884c\u7279\u5b9a\u7684\u5f00\u673a\u547d\u4ee4\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u501f\u52a9\u667a\u80fd\u63d2\u5ea7\u7b49\u786c\u4ef6\u8bbe\u5907\u5b9e\u73b0\u8fdc\u7a0b\u63a7\u5236<\/p>\n<\/p>\n<p><p>\u667a\u80fd\u63d2\u5ea7\u7b49\u786c\u4ef6\u8bbe\u5907\u4e5f\u662f\u4e00\u79cd\u8fdc\u7a0b\u5f00\u673a\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u5c24\u5176\u5bf9\u4e8e\u4e0d\u80fd\u901a\u8fc7\u7f51\u7edc\u5524\u9192\u7684\u8bbe\u5907\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u9009\u62e9\u5408\u9002\u7684\u667a\u80fd\u786c\u4ef6<\/strong><br \/>\u9009\u62e9\u652f\u6301\u8fdc\u7a0b\u63a7\u5236\u7684\u667a\u80fd\u63d2\u5ea7\u6216\u7535\u6e90\u7ba1\u7406\u8bbe\u5907\uff0c\u8fd9\u4e9b\u8bbe\u5907\u901a\u5e38\u901a\u8fc7Wi-Fi\u8fde\u63a5\u5e76\u63d0\u4f9b\u79fb\u52a8\u5e94\u7528\u6216API\u63a5\u53e3\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6e\u667a\u80fd\u786c\u4ef6<\/strong><br \/>\u6839\u636e\u8bbe\u5907\u63d0\u4f9b\u7684\u8bf4\u660e\u4e66\u8fdb\u884c\u914d\u7f6e\uff0c\u5305\u62ec\u7f51\u7edc\u8fde\u63a5\u3001\u8bbe\u5907\u6ce8\u518c\u7b49\u6b65\u9aa4\u3002\u786e\u4fdd\u8bbe\u5907\u80fd\u591f\u901a\u8fc7\u8fdc\u7a0b\u6307\u4ee4\u8fdb\u884c\u7535\u6e90\u63a7\u5236\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u5199Python\u811a\u672c<\/strong><br \/>\u4f7f\u7528Python\u6765\u8c03\u7528\u667a\u80fd\u786c\u4ef6\u7684API\u63a5\u53e3\u3002\u5927\u591a\u6570\u667a\u80fd\u786c\u4ef6\u63d0\u4f9bRESTful API\uff0c\u53ef\u4ee5\u901a\u8fc7Python\u7684<code>requests<\/code>\u5e93\u8fdb\u884c\u8c03\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install requests<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7f16\u5199\u811a\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>def control_smart_plug(api_url, action):<\/p>\n<p>    headers = {&#39;Authorization&#39;: &#39;Bearer YOUR_API_TOKEN&#39;}<\/p>\n<p>    response = requests.post(api_url, json={&#39;action&#39;: action}, headers=headers)<\/p>\n<p>    print(response.json())<\/p>\n<p>control_smart_plug(&#39;https:\/\/smartplug.api\/control&#39;, &#39;turn_on&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6b64\u811a\u672c\u901a\u8fc7POST\u8bf7\u6c42\u63a7\u5236\u667a\u80fd\u63d2\u5ea7\u7684\u5f00\u5173\u72b6\u6001\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u603b\u7ed3\u4e0e\u5efa\u8bae<\/p>\n<\/p>\n<p><p>\u8fdc\u7a0b\u5f00\u673a\u7684\u5b9e\u73b0\u9700\u8981\u8003\u8651\u591a\u65b9\u9762\u7684\u56e0\u7d20\uff0c\u5305\u62ec\u7f51\u7edc\u6761\u4ef6\u3001\u786c\u4ef6\u652f\u6301\u3001\u64cd\u4f5c\u7cfb\u7edf\u914d\u7f6e\u7b49\u3002<strong>Wake-on-LAN\u662f\u4e00\u79cd\u7b80\u5355\u4e14\u6709\u6548\u7684\u89e3\u51b3\u65b9\u6848<\/strong>\uff0c\u9002\u7528\u4e8e\u5927\u591a\u6570\u652f\u6301\u8be5\u534f\u8bae\u7684\u8ba1\u7b97\u673a\u3002\u8bbe\u7f6e\u8fdc\u7a0b\u670d\u52a1\u5668\u5219\u63d0\u4f9b\u4e86\u66f4\u7075\u6d3b\u7684\u7ba1\u7406\u65b9\u5f0f\uff0c\u9002\u5408\u9700\u8981\u96c6\u4e2d\u7ba1\u7406\u548c\u591a\u8bbe\u5907\u63a7\u5236\u7684\u573a\u666f\u3002\u4f7f\u7528\u667a\u80fd\u63d2\u5ea7\u7b49\u786c\u4ef6\u8bbe\u5907\u5219\u4e3a\u4e0d\u652f\u6301\u7f51\u7edc\u5524\u9192\u7684\u8bbe\u5907\u63d0\u4f9b\u4e86\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<\/p>\n<p><p>\u5728\u5177\u4f53\u5b9e\u65bd\u4e2d\uff0c\u5efa\u8bae\u6839\u636e\u5b9e\u9645\u9700\u6c42\u548c\u6280\u672f\u6761\u4ef6\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u5e76\u6ce8\u610f\u7f51\u7edc\u5b89\u5168\u548c\u6743\u9650\u7ba1\u7406\u3002\u5408\u7406\u914d\u7f6e\u9632\u706b\u5899\u3001\u4f7f\u7528\u5b89\u5168\u7684SSH\u5bc6\u94a5\u7ba1\u7406\u3001\u5b9a\u671f\u66f4\u65b0\u667a\u80fd\u786c\u4ef6\u7684\u56fa\u4ef6\u7248\u672c\uff0c\u90fd\u662f\u786e\u4fdd\u8fdc\u7a0b\u5f00\u673a\u5b89\u5168\u6027\u7684\u91cd\u8981\u63aa\u65bd\u3002\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\uff0cPython\u53ef\u4ee5\u6210\u4e3a\u5b9e\u73b0\u8fdc\u7a0b\u5f00\u673a\u7684\u5f3a\u5927\u5de5\u5177\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u7528Python\u5b9e\u73b0\u8fdc\u7a0b\u5f00\u673a\u529f\u80fd\uff1f<\/strong><br \/>\u8981\u5b9e\u73b0\u8fdc\u7a0b\u5f00\u673a\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528Python\u7ed3\u5408WOL\uff08Wake-on-LAN\uff09\u534f\u8bae\u3002\u901a\u8fc7\u53d1\u9001\u7279\u5b9a\u7684\u9b54\u672f\u6570\u636e\u5305\u7ed9\u76ee\u6807\u8ba1\u7b97\u673a\u7684MAC\u5730\u5740\uff0c\u60a8\u53ef\u4ee5\u5524\u9192\u5904\u4e8e\u5f85\u673a\u6216\u5173\u673a\u72b6\u6001\u7684\u8bbe\u5907\u3002\u53ef\u4ee5\u4f7f\u7528Python\u7684<code>wakeonlan<\/code>\u5e93\u6765\u7b80\u5316\u8fd9\u4e2a\u8fc7\u7a0b\u3002\u5b89\u88c5\u5e93\u540e\uff0c\u53ea\u9700\u8c03\u7528\u76f8\u5e94\u7684\u51fd\u6570\u5e76\u63d0\u4f9bMAC\u5730\u5740\u5373\u53ef\u3002<\/p>\n<p><strong>\u5728\u4f7f\u7528Python\u8fdc\u7a0b\u5f00\u673a\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u7f51\u7edc\u8bbe\u7f6e\uff1f<\/strong><br \/>\u786e\u4fdd\u76ee\u6807\u8ba1\u7b97\u673a\u7684BIOS\u8bbe\u7f6e\u4e2d\u542f\u7528\u4e86WOL\u529f\u80fd\uff0c\u5e76\u4e14\u7f51\u7edc\u9002\u914d\u5668\u7684\u7535\u6e90\u7ba1\u7406\u9009\u9879\u4e5f\u8bbe\u7f6e\u4e3a\u5141\u8bb8\u5524\u9192\u3002\u6b64\u5916\uff0c\u8def\u7531\u5668\u548c\u9632\u706b\u5899\u9700\u8981\u5141\u8bb8UDP\u534f\u8bae\u7684\u7279\u5b9a\u7aef\u53e3\u6d41\u91cf\uff0c\u4ee5\u786e\u4fdd\u9b54\u672f\u6570\u636e\u5305\u80fd\u591f\u6210\u529f\u5230\u8fbe\u76ee\u6807\u8ba1\u7b97\u673a\u3002<\/p>\n<p><strong>\u53ef\u4ee5\u901a\u8fc7Python\u8fdc\u7a0b\u5f00\u673a\u63a7\u5236\u591a\u4e2a\u8bbe\u5907\u5417\uff1f<\/strong><br \/>\u662f\u7684\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7Python\u63a7\u5236\u591a\u4e2a\u8bbe\u5907\u3002\u53ea\u9700\u4e3a\u6bcf\u4e2a\u8bbe\u5907\u63d0\u4f9b\u76f8\u5e94\u7684MAC\u5730\u5740\uff0c\u5e76\u5728\u4ee3\u7801\u4e2d\u5faa\u73af\u53d1\u9001WOL\u6570\u636e\u5305\u3002\u786e\u4fdd\u6bcf\u4e2a\u8bbe\u5907\u7684\u7f51\u7edc\u914d\u7f6e\u6b63\u786e\uff0c\u5e76\u4e14\u5728\u540c\u4e00\u7f51\u7edc\u6216\u901a\u8fc7VPN\u80fd\u591f\u8bbf\u95ee\u5230\u8fd9\u4e9b\u8bbe\u5907\u3002\u8fd9\u6837\uff0c\u60a8\u5c31\u53ef\u4ee5\u8f7b\u677e\u5730\u7ba1\u7406\u591a\u53f0\u8ba1\u7b97\u673a\u7684\u8fdc\u7a0b\u5f00\u673a\u529f\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u8fdc\u7a0b\u5f00\u673a\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u901a\u8fc7Wake-on-LAN\u534f\u8bae\u5524\u9192\u8fdc\u7a0b\u8ba1\u7b97\u673a\u3001\u8bbe\u7f6e\u8fdc\u7a0b\u670d\u52a1\u5668\u5e76\u4f7f\u7528Pyth [&hellip;]","protected":false},"author":3,"featured_media":975539,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/975526"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=975526"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/975526\/revisions"}],"predecessor-version":[{"id":975540,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/975526\/revisions\/975540"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/975539"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=975526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=975526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=975526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}