{"id":1005865,"date":"2024-12-27T10:39:25","date_gmt":"2024-12-27T02:39:25","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1005865.html"},"modified":"2024-12-27T10:39:28","modified_gmt":"2024-12-27T02:39:28","slug":"python-%e5%a6%82%e4%bd%95%e5%81%9anat","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1005865.html","title":{"rendered":"python \u5982\u4f55\u505anat"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25082220\/2c13c2f2-d648-442c-b249-953387cf42b8.webp\" alt=\"python \u5982\u4f55\u505anat\" \/><\/p>\n<p><p> <strong>Python\u505aNAT\uff08Network Address Translation\uff09\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528socket\u7f16\u7a0b\u3001\u914d\u7f6eiptables\u3001\u5229\u7528\u7b2c\u4e09\u65b9\u5e93\u5982Scapy\u7b49\u5de5\u5177\u5b9e\u73b0<\/strong>\u3002\u4e3a\u4e86\u8be6\u7ec6\u8bf4\u660e\u5176\u4e2d\u7684\u4e00\u4e2a\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7Python\u7ed3\u5408iptables\u8fdb\u884cNAT\u8bbe\u7f6e\u3002\u8fd9\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u5728Linux\u73af\u5883\u4e0b\u8fdb\u884cNAT\u914d\u7f6e\uff0c\u4ece\u800c\u5b9e\u73b0\u7f51\u7edc\u6570\u636e\u5305\u7684\u8f6c\u53d1\u548c\u5730\u5740\u8f6c\u6362\u3002<\/p>\n<\/p>\n<hr>\n<h2><strong>\u4e00\u3001NAT\u6982\u8ff0<\/strong><\/h2>\n<p><p>NAT\uff08Network Address Translation\uff09\u662f\u4e00\u79cd\u7f51\u7edc\u6280\u672f\uff0c\u7528\u4e8e\u6539\u53d8\u6570\u636e\u5305\u5934\u90e8\u7684IP\u5730\u5740\u4fe1\u606f\uff0c\u4ece\u800c\u5b9e\u73b0\u5185\u90e8\u7f51\u7edc\u548c\u5916\u90e8\u7f51\u7edc\u4e4b\u95f4\u7684\u901a\u4fe1\u3002NAT\u901a\u5e38\u7528\u4e8e\u89e3\u51b3IPv4\u5730\u5740\u77ed\u7f3a\u95ee\u9898\uff0c\u4fdd\u62a4\u5185\u90e8\u7f51\u7edc\u5b89\u5168\uff0c\u4ee5\u53ca\u7b80\u5316IP\u5730\u5740\u7ba1\u7406\u3002<\/p>\n<\/p>\n<p><h3>1\u3001NAT\u7684\u5de5\u4f5c\u539f\u7406<\/h3>\n<\/p>\n<p><p>NAT\u7684\u57fa\u672c\u5de5\u4f5c\u539f\u7406\u662f\u4fee\u6539IP\u6570\u636e\u5305\u7684\u6e90\u5730\u5740\u6216\u76ee\u6807\u5730\u5740\uff0c\u4f7f\u5176\u80fd\u591f\u5728\u4e0d\u540c\u7f51\u7edc\u4e4b\u95f4\u4f20\u9012\u3002\u901a\u5e38\u6709\u4e09\u79cd\u7c7b\u578b\u7684NAT\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u9759\u6001NAT<\/strong>\uff1a\u4e00\u5bf9\u4e00\u7684\u5730\u5740\u6620\u5c04\uff0c\u5c06\u5185\u90e8IP\u5730\u5740\u6620\u5c04\u5230\u5916\u90e8IP\u5730\u5740\u3002<\/li>\n<li><strong>\u52a8\u6001NAT<\/strong>\uff1a\u4ece\u4e00\u7ec4\u516c\u7f51IP\u5730\u5740\u4e2d\u9009\u62e9\u4e00\u4e2a\u7a7a\u95f2\u5730\u5740\u8fdb\u884c\u6620\u5c04\u3002<\/li>\n<li><strong>\u7aef\u53e3\u5730\u5740\u8f6c\u6362\uff08PAT\uff09\u6216NAT Overload<\/strong>\uff1a\u901a\u8fc7\u7aef\u53e3\u53f7\u8bc6\u522b\u591a\u4e2a\u4e3b\u673a\u4f7f\u7528\u4e00\u4e2a\u516c\u7f51IP\u5730\u5740\u3002<\/li>\n<\/ul>\n<p><h3>2\u3001NAT\u7684\u5e94\u7528\u573a\u666f<\/h3>\n<\/p>\n<p><p>NAT\u5e7f\u6cdb\u5e94\u7528\u4e8e\u5bb6\u5ead\u8def\u7531\u5668\u3001\u4f01\u4e1a\u9632\u706b\u5899\u4ee5\u53ca\u6570\u636e\u4e2d\u5fc3\u7f51\u7edc\u4e2d\uff0c\u4e3b\u8981\u7528\u4e8e\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u5730\u5740\u590d\u7528<\/strong>\uff1a\u591a\u4e2a\u5185\u90e8\u8bbe\u5907\u5171\u4eab\u4e00\u4e2a\u516c\u7f51IP\u5730\u5740\u3002<\/li>\n<li><strong>\u7f51\u7edc\u9694\u79bb\u4e0e\u5b89\u5168<\/strong>\uff1a\u9690\u85cf\u5185\u90e8\u7f51\u7edc\u7ed3\u6784\uff0c\u4fdd\u62a4\u5185\u90e8\u7f51\u7edc\u3002<\/li>\n<li><strong>\u8d1f\u8f7d\u5747\u8861<\/strong>\uff1a\u5c06\u8bf7\u6c42\u5206\u53d1\u5230\u591a\u4e2a\u670d\u52a1\u5668\u4e0a\u3002<\/li>\n<\/ul>\n<h2><strong>\u4e8c\u3001Python\u7ed3\u5408iptables\u5b9e\u73b0NAT<\/strong><\/h2>\n<p><p>\u5728Linux\u73af\u5883\u4e2d\uff0ciptables\u662f\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u4e8e\u914d\u7f6eNAT\u89c4\u5219\u3002\u800cPython\u53ef\u4ee5\u901a\u8fc7\u8c03\u7528\u7cfb\u7edf\u547d\u4ee4\u7684\u65b9\u5f0f\u6765\u914d\u7f6eiptables\uff0c\u4ece\u800c\u5b9e\u73b0NAT\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><h3>1\u3001\u5b89\u88c5\u5fc5\u8981\u7684\u8f6f\u4ef6<\/h3>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u9700\u8981\u786e\u4fdd\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86iptables\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5\u548c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt-get update<\/p>\n<p>sudo apt-get install iptables<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u4f7f\u7528Python\u8c03\u7528iptables\u547d\u4ee4<\/h3>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86<code>subprocess<\/code>\u6a21\u5757\uff0c\u53ef\u4ee5\u7528\u6765\u6267\u884c\u7cfb\u7edf\u547d\u4ee4\u3002\u901a\u8fc7<code>subprocess<\/code>\u6a21\u5757\uff0c\u6211\u4eec\u53ef\u4ee5\u5728Python\u811a\u672c\u4e2d\u8c03\u7528iptables\u547d\u4ee4\u6765\u914d\u7f6eNAT\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import subprocess<\/p>\n<p>def execute_command(command):<\/p>\n<p>    try:<\/p>\n<p>        result = subprocess.run(command, shell=True, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)<\/p>\n<p>        print(result.stdout.decode())<\/p>\n<p>    except subprocess.CalledProcessError as e:<\/p>\n<p>        print(f&quot;Error executing command: {e.stderr.decode()}&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\uff1a\u914d\u7f6eiptables\u8fdb\u884cNAT<\/strong><\/h2>\n<p>def setup_nat():<\/p>\n<p>    # \u5141\u8bb8\u8f6c\u53d1\u6d41\u91cf<\/p>\n<p>    execute_command(&quot;echo 1 &gt; \/proc\/sys\/net\/ipv4\/ip_forward&quot;)<\/p>\n<p>    # \u914d\u7f6eNAT\u89c4\u5219<\/p>\n<p>    execute_command(&quot;iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE&quot;)<\/p>\n<p>setup_nat()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3\u3001\u89e3\u91ca\u4ee3\u7801<\/h3>\n<\/p>\n<ul>\n<li><strong>\u5f00\u542fIP\u8f6c\u53d1<\/strong>\uff1a\u901a\u8fc7\u5199\u5165<code>\/proc\/sys\/net\/ipv4\/ip_forward<\/code>\u6587\u4ef6\uff0c\u5f00\u542fLinux\u5185\u6838\u7684IP\u8f6c\u53d1\u529f\u80fd\u3002<\/li>\n<li><strong>\u914d\u7f6eNAT\u89c4\u5219<\/strong>\uff1a\u4f7f\u7528<code>iptables<\/code>\u547d\u4ee4\u5728<code>POSTROUTING<\/code>\u94fe\u4e0a\u6dfb\u52a0\u4e00\u6761\u89c4\u5219\uff0c\u4f7f\u7528<code>MASQUERADE<\/code>\u76ee\u6807\u4f2a\u88c5\u51fa\u63a5\u53e3\u7684\u6d41\u91cf\u3002<\/li>\n<\/ul>\n<h2><strong>\u4e09\u3001\u5229\u7528\u7b2c\u4e09\u65b9\u5e93\u5b9e\u73b0NAT<\/strong><\/h2>\n<p><p>\u9664\u4e86\u76f4\u63a5\u8c03\u7528\u7cfb\u7edf\u547d\u4ee4\u5916\uff0cPython\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u7b2c\u4e09\u65b9\u5e93\u6765\u5b9e\u73b0NAT\u529f\u80fd\uff0c\u5982Scapy\u3002<\/p>\n<\/p>\n<p><h3>1\u3001\u5b89\u88c5Scapy<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5Scapy\u5e93\uff0c\u53ef\u4ee5\u901a\u8fc7pip\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install scapy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u4f7f\u7528Scapy\u5b9e\u73b0\u7b80\u5355\u7684NAT\u529f\u80fd<\/h3>\n<\/p>\n<p><p>Scapy\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u7f51\u7edc\u6570\u636e\u5305\u5904\u7406\u5e93\uff0c\u53ef\u4ee5\u7528\u6765\u53d1\u9001\u3001\u6355\u83b7\u548c\u4fee\u6539\u6570\u636e\u5305\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from scapy.all import *<\/p>\n<p>def packet_callback(packet):<\/p>\n<p>    # \u4ec5\u5904\u7406IP\u6570\u636e\u5305<\/p>\n<p>    if packet.haslayer(IP):<\/p>\n<p>        ip_layer = packet.getlayer(IP)<\/p>\n<p>        # \u6253\u5370\u6e90IP\u548c\u76ee\u6807IP<\/p>\n<p>        print(f&quot;Original Source: {ip_layer.src}, Original Destination: {ip_layer.dst}&quot;)<\/p>\n<p>        # \u4fee\u6539\u6e90IP\u5730\u5740<\/p>\n<p>        ip_layer.src = &quot;192.168.1.1&quot;<\/p>\n<p>        # \u6253\u5370\u4fee\u6539\u540e\u7684IP\u5730\u5740<\/p>\n<p>        print(f&quot;Modified Source: {ip_layer.src}, Modified Destination: {ip_layer.dst}&quot;)<\/p>\n<p>        # \u53d1\u9001\u4fee\u6539\u540e\u7684\u6570\u636e\u5305<\/p>\n<p>        send(packet)<\/p>\n<h2><strong>\u6355\u83b7\u6570\u636e\u5305\u5e76\u5e94\u7528NAT<\/strong><\/h2>\n<p>sniff(prn=packet_callback, filter=&quot;ip&quot;, store=0)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>3\u3001\u89e3\u91ca\u4ee3\u7801<\/h3>\n<\/p>\n<ul>\n<li><strong>\u6570\u636e\u5305\u6355\u83b7\u4e0e\u5904\u7406<\/strong>\uff1a\u4f7f\u7528<code>sniff<\/code>\u51fd\u6570\u6355\u83b7\u6570\u636e\u5305\uff0c\u5e76\u4e3a\u6bcf\u4e2a\u6570\u636e\u5305\u8c03\u7528<code>packet_callback<\/code>\u51fd\u6570\u3002<\/li>\n<li><strong>IP\u5730\u5740\u4fee\u6539<\/strong>\uff1a\u5728\u56de\u8c03\u51fd\u6570\u4e2d\uff0c\u901a\u8fc7<code>getlayer(IP)<\/code>\u83b7\u53d6IP\u5c42\uff0c\u5e76\u4fee\u6539\u5176\u6e90IP\u5730\u5740\u3002<\/li>\n<li><strong>\u6570\u636e\u5305\u53d1\u9001<\/strong>\uff1a\u4f7f\u7528<code>send<\/code>\u51fd\u6570\u53d1\u9001\u4fee\u6539\u540e\u7684\u6570\u636e\u5305\u3002<\/li>\n<\/ul>\n<h2><strong>\u56db\u3001NAT\u914d\u7f6e\u4e2d\u7684\u6ce8\u610f\u4e8b\u9879<\/strong><\/h2>\n<p><p>\u5728\u914d\u7f6eNAT\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<\/p>\n<p><h3>1\u3001\u7f51\u7edc\u63a5\u53e3\u7684\u9009\u62e9<\/h3>\n<\/p>\n<p><p>\u5728\u914d\u7f6eiptables\u89c4\u5219\u65f6\uff0c\u9700\u8981\u6307\u5b9a\u6b63\u786e\u7684\u7f51\u7edc\u63a5\u53e3\u3002\u901a\u5e38\uff0c<code>-o<\/code>\u9009\u9879\u7528\u4e8e\u6307\u5b9a\u51fa\u63a5\u53e3\uff0c\u800c<code>-i<\/code>\u9009\u9879\u7528\u4e8e\u6307\u5b9a\u5165\u63a5\u53e3\u3002\u786e\u4fdd\u9009\u62e9\u6b63\u786e\u7684\u63a5\u53e3\uff0c\u4ee5\u4fdd\u8bc1NAT\u89c4\u5219\u7684\u6709\u6548\u6027\u3002<\/p>\n<\/p>\n<p><h3>2\u3001\u5b89\u5168\u6027\u8003\u8651<\/h3>\n<\/p>\n<p><p>NAT\u5728\u63d0\u4f9b\u5730\u5740\u590d\u7528\u7684\u540c\u65f6\uff0c\u4e5f\u589e\u52a0\u4e86\u4e00\u5c42\u5b89\u5168\u4fdd\u62a4\u3002\u7136\u800c\uff0c\u9700\u8981\u6ce8\u610fNAT\u5e76\u4e0d\u80fd\u66ff\u4ee3\u9632\u706b\u5899\u3002\u5728\u914d\u7f6eNAT\u7684\u540c\u65f6\uff0c\u4ecd\u9700\u914d\u7f6e\u9632\u706b\u5899\u89c4\u5219\u4ee5\u9632\u6b62\u672a\u6388\u6743\u7684\u8bbf\u95ee\u3002<\/p>\n<\/p>\n<p><h3>3\u3001\u6027\u80fd\u5f71\u54cd<\/h3>\n<\/p>\n<p><p>NAT\u4f1a\u5bf9\u8def\u7531\u5668\u6216\u9632\u706b\u5899\u8bbe\u5907\u7684\u6027\u80fd\u4ea7\u751f\u4e00\u5b9a\u7684\u5f71\u54cd\uff0c\u5c24\u5176\u662f\u5728\u9ad8\u6d41\u91cf\u73af\u5883\u4e0b\u3002\u9700\u8981\u6839\u636e\u5b9e\u9645\u9700\u6c42\u548c\u8bbe\u5907\u6027\u80fd\u8fdb\u884c\u5408\u7406\u7684\u914d\u7f6e\u3002<\/p>\n<\/p>\n<h2><strong>\u4e94\u3001\u603b\u7ed3<\/strong><\/h2>\n<p><p>Python\u7ed3\u5408iptables\u548cScapy\u7b49\u5de5\u5177\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5f3a\u5927\u7684NAT\u529f\u80fd\u3002\u901a\u8fc7\u7406\u89e3NAT\u7684\u57fa\u672c\u539f\u7406\u548c\u5e94\u7528\u573a\u666f\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5229\u7528Python\u811a\u672c\u7075\u6d3b\u5730\u914d\u7f6e\u548c\u7ba1\u7406\u7f51\u7edc\u6d41\u91cf\u3002\u65e0\u8bba\u662f\u5bb6\u5ead\u7f51\u7edc\u7684\u7b80\u5355\u914d\u7f6e\uff0c\u8fd8\u662f\u4f01\u4e1a\u7ea7\u7f51\u7edc\u7684\u590d\u6742\u7ba1\u7406\uff0cNAT\u90fd\u662f\u4e00\u4e2a\u4e0d\u53ef\u6216\u7f3a\u7684\u6280\u672f\u624b\u6bb5\u3002\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u8bfb\u8005\u53ef\u4ee5\u5c1d\u8bd5\u5728\u81ea\u5df1\u7684\u7f51\u7edc\u73af\u5883\u4e2d\u5b9e\u73b0NAT\u914d\u7f6e\uff0c\u4ee5\u63d0\u5347\u7f51\u7edc\u7ba1\u7406\u7684\u6548\u7387\u548c\u5b89\u5168\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5b9e\u73b0NAT\u529f\u80fd\uff1f<\/strong><br \/>\u5728Python\u4e2d\u5b9e\u73b0NAT\u529f\u80fd\u901a\u5e38\u6d89\u53ca\u4f7f\u7528\u7f51\u7edc\u7f16\u7a0b\u5e93\uff0c\u5982<code>socket<\/code>\u548c<code>scapy<\/code>\u3002NAT\uff08\u7f51\u7edc\u5730\u5740\u8f6c\u6362\uff09\u5141\u8bb8\u5c06\u79c1\u6709IP\u5730\u5740\u6620\u5c04\u5230\u516c\u5171IP\u5730\u5740\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u4ee3\u7406\u670d\u52a1\u5668\u6216\u4f7f\u7528\u73b0\u6709\u7684\u5e93\u6765\u5b9e\u73b0\u3002\u53ef\u4ee5\u8003\u8651\u4f7f\u7528<code>iptables<\/code>\u7ed3\u5408Python\u811a\u672c\u8fdb\u884c\u66f4\u590d\u6742\u7684\u914d\u7f6e\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u4f7f\u7528NAT\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u5b89\u5168\u6027\u95ee\u9898\uff1f<\/strong><br \/>\u4f7f\u7528NAT\u65f6\uff0c\u786e\u4fdd\u7f51\u7edc\u5b89\u5168\u662f\u81f3\u5173\u91cd\u8981\u7684\u3002\u5e38\u89c1\u7684\u5b89\u5168\u95ee\u9898\u5305\u62ecIP\u6b3a\u9a97\u3001\u6d41\u91cf\u52ab\u6301\u7b49\u3002\u5efa\u8bae\u5728\u5b9e\u73b0NAT\u529f\u80fd\u65f6\uff0c\u8bbe\u7f6e\u4e25\u683c\u7684\u8bbf\u95ee\u63a7\u5236\u5217\u8868\uff08ACL\uff09\uff0c\u5e76\u76d1\u6d4b\u6d41\u91cf\u4ee5\u9632\u6b62\u6f5c\u5728\u7684\u653b\u51fb\u3002\u6b64\u5916\uff0c\u52a0\u5bc6\u654f\u611f\u6570\u636e\u4f20\u8f93\u4e5f\u53ef\u4ee5\u589e\u5f3a\u5b89\u5168\u6027\u3002<\/p>\n<p><strong>\u6709\u6ca1\u6709\u73b0\u6210\u7684Python\u5e93\u53ef\u4ee5\u5e2e\u52a9\u5b9e\u73b0NAT\u529f\u80fd\uff1f<\/strong><br \/>\u662f\u7684\uff0cPython\u6709\u4e00\u4e9b\u5e93\u53ef\u4ee5\u7b80\u5316NAT\u7684\u5b9e\u73b0\uff0c\u4f8b\u5982<code>Twisted<\/code>\u3001<code>asyncio<\/code>\u7b49\u3002\u8fd9\u4e9b\u5e93\u63d0\u4f9b\u4e86\u5f02\u6b65\u7f51\u7edc\u7f16\u7a0b\u7684\u6846\u67b6\uff0c\u80fd\u591f\u66f4\u65b9\u4fbf\u5730\u5904\u7406\u7f51\u7edc\u8bf7\u6c42\u548c\u6570\u636e\u8f6c\u53d1\u3002\u4f7f\u7528\u8fd9\u4e9b\u5e93\u53ef\u4ee5\u52a0\u901f\u5f00\u53d1\u8fc7\u7a0b\uff0c\u51cf\u5c11\u624b\u52a8\u5904\u7406\u4f4e\u7ea7\u7f51\u7edc\u7ec6\u8282\u7684\u9700\u8981\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u505aNAT\uff08Network Address Translation\uff09\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528socket\u7f16\u7a0b\u3001\u914d [&hellip;]","protected":false},"author":3,"featured_media":1005874,"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\/1005865"}],"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=1005865"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1005865\/revisions"}],"predecessor-version":[{"id":1005879,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1005865\/revisions\/1005879"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1005874"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1005865"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1005865"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1005865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}