{"id":89943,"date":"2026-08-04T09:00:47","date_gmt":"2026-08-04T01:00:47","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/89943.html"},"modified":"2026-08-04T09:00:47","modified_gmt":"2026-08-04T01:00:47","slug":"synapse%e5%ae%8c%e6%95%b4%e5%ae%89%e8%a3%85%e6%95%99%e7%a8%8b%ef%bc%9a%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e9%85%8d%e7%bd%aepython-twisted%e5%ae%b6%e5%ba%ad%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/89943.html","title":{"rendered":"Synapse\u5b8c\u6574\u5b89\u88c5\u6559\u7a0b\uff1a\u4ece\u96f6\u5f00\u59cb\u914d\u7f6ePython\/Twisted\u5bb6\u5ead\u670d\u52a1\u5668"},"content":{"rendered":"<h2>Synapse\u5b8c\u6574\u5b89\u88c5\u6559\u7a0b&#xff1a;\u4ece\u96f6\u5f00\u59cb\u914d\u7f6ePython\/Twisted\u5bb6\u5ead\u670d\u52a1\u5668<\/h2>\n<p>&#x1f680; \u7ec8\u6781\u6307\u5357&#xff1a;10\u6b65\u5feb\u901f\u642d\u5efaMatrix Synapse\u5bb6\u5ead\u670d\u52a1\u5668 &#x1f680;<\/p>\n<p>Synapse\u662f\u4e00\u4e2a\u7528Python\/Twisted\u7f16\u5199\u7684\u5f00\u6e90Matrix\u5bb6\u5ead\u670d\u52a1\u5668\u5b9e\u73b0&#xff0c;\u5b83\u5141\u8bb8\u60a8\u8fd0\u884c\u81ea\u5df1\u7684\u5b89\u5168\u3001\u53bb\u4e2d\u5fc3\u5316\u901a\u4fe1\u5e73\u53f0\u3002\u4f5c\u4e3aMatrix\u534f\u8bae\u7684\u6838\u5fc3\u7ec4\u4ef6&#xff0c;Synapse\u5bb6\u5ead\u670d\u52a1\u5668\u63d0\u4f9b\u4e86\u5b8c\u6574\u7684\u5373\u65f6\u901a\u8baf\u529f\u80fd&#xff0c;\u652f\u6301\u7aef\u5230\u7aef\u52a0\u5bc6\u3001\u7fa4\u7ec4\u804a\u5929\u548c\u8de8\u670d\u52a1\u5668\u8054\u90a6\u901a\u4fe1\u3002\u672c\u6559\u7a0b\u5c06\u5e26\u60a8\u4ece\u96f6\u5f00\u59cb&#xff0c;\u901a\u8fc710\u4e2a\u7b80\u5355\u6b65\u9aa4\u5b8c\u6210Synapse\u5bb6\u5ead\u670d\u52a1\u5668\u7684\u5b8c\u6574\u5b89\u88c5\u548c\u914d\u7f6e\u3002<\/p>\n<h3>&#x1f4cb; \u51c6\u5907\u5de5\u4f5c\u4e0e\u73af\u5883\u8981\u6c42<\/h3>\n<p>\u5728\u5f00\u59cb\u5b89\u88c5Synapse\u5bb6\u5ead\u670d\u52a1\u5668\u4e4b\u524d&#xff0c;\u60a8\u9700\u8981\u51c6\u5907\u4ee5\u4e0b\u73af\u5883&#xff1a;<\/p>\n<p>\u7cfb\u7edf\u8981\u6c42&#xff1a;<\/p>\n<ul>\n<li>\u64cd\u4f5c\u7cfb\u7edf&#xff1a;Linux&#xff08;\u63a8\u8350Ubuntu\/Debian&#xff09;\u3001macOS\u6216Windows Subsystem for Linux<\/li>\n<li>Python\u7248\u672c&#xff1a;Python 3.10\u6216\u66f4\u9ad8\u7248\u672c<\/li>\n<li>\u5185\u5b58&#xff1a;\u81f3\u5c111GB RAM&#xff08;\u5efa\u8bae2GB\u4ee5\u4e0a&#xff09;<\/li>\n<li>\u5b58\u50a8\u7a7a\u95f4&#xff1a;\u81f3\u5c115GB\u53ef\u7528\u7a7a\u95f4<\/li>\n<li>\u57df\u540d&#xff1a;\u7528\u4e8e\u670d\u52a1\u5668\u6807\u8bc6\u548c\u8054\u90a6\u901a\u4fe1<\/li>\n<\/ul>\n<p>\u5fc5\u5907\u8f6f\u4ef6\u5305&#xff1a;<\/p>\n<p># Ubuntu\/Debian\u7cfb\u7edf<br \/>\nsudo apt update<br \/>\nsudo apt install build-essential python3-dev libffi-dev python3-pip python3-setuptools sqlite3 libssl-dev virtualenv libjpeg-dev libxslt1-dev<\/p>\n<h3>&#x1f6e0;\ufe0f \u7b2c1\u6b65&#xff1a;\u9009\u62e9\u5b89\u88c5\u65b9\u6cd5<\/h3>\n<p>Synapse\u63d0\u4f9b\u4e86\u591a\u79cd\u5b89\u88c5\u65b9\u5f0f&#xff0c;\u60a8\u53ef\u4ee5\u6839\u636e\u9700\u6c42\u9009\u62e9\u6700\u9002\u5408\u7684\u65b9\u6cd5&#xff1a;<\/p>\n<h4>\u65b9\u6cd5\u4e00&#xff1a;\u4f7f\u7528Docker&#xff08;\u63a8\u8350\u65b0\u624b&#xff09;<\/h4>\n<p># \u62c9\u53d6\u5b98\u65b9Docker\u955c\u50cf<br \/>\ndocker pull matrixdotorg\/synapse<\/p>\n<p># \u521b\u5efa\u914d\u7f6e\u76ee\u5f55<br \/>\nmkdir -p ~\/synapse-data<\/p>\n<p># \u751f\u6210\u914d\u7f6e\u6587\u4ef6<br \/>\ndocker run -it &#8211;rm \\\\<br \/>\n  -v ~\/synapse-data:\/data \\\\<br \/>\n  -e SYNAPSE_SERVER_NAME&#061;your-domain.com \\\\<br \/>\n  -e SYNAPSE_REPORT_STATS&#061;yes \\\\<br \/>\n  matrixdotorg\/synapse:latest generate<\/p>\n<h4>\u65b9\u6cd5\u4e8c&#xff1a;\u4ecePyPI\u5b89\u88c5&#xff08;\u6807\u51c6\u65b9\u6cd5&#xff09;<\/h4>\n<p># \u521b\u5efa\u865a\u62df\u73af\u5883<br \/>\nmkdir -p ~\/synapse<br \/>\npython3 -m venv ~\/synapse\/env<br \/>\nsource ~\/synapse\/env\/bin\/activate<\/p>\n<p># \u5b89\u88c5Synapse<br \/>\npip install &#8211;upgrade pip setuptools<br \/>\npip install matrix-synapse<\/p>\n<h4>\u65b9\u6cd5\u4e09&#xff1a;\u4f7f\u7528\u7cfb\u7edf\u5305\u7ba1\u7406\u5668<\/h4>\n<p># Debian\/Ubuntu&#xff08;\u4f7f\u7528Matrix.org\u4ed3\u5e93&#xff09;<br \/>\nsudo apt install -y lsb-release wget apt-transport-https<br \/>\nsudo wget -O \/usr\/share\/keyrings\/matrix-org-archive-keyring.gpg \\\\<br \/>\n  https:\/\/packages.matrix.org\/debian\/matrix-org-archive-keyring.gpg<br \/>\necho &#034;deb [signed-by&#061;\/usr\/share\/keyrings\/matrix-org-archive-keyring.gpg] \\\\<br \/>\n  https:\/\/packages.matrix.org\/debian\/ $(lsb_release -cs) main&#034; | \\\\<br \/>\n  sudo tee \/etc\/apt\/sources.list.d\/matrix-org.list<br \/>\nsudo apt update<br \/>\nsudo apt install matrix-synapse-py3<\/p>\n<h3>&#x1f527; \u7b2c2\u6b65&#xff1a;\u751f\u6210\u914d\u7f6e\u6587\u4ef6<\/h3>\n<p>\u65e0\u8bba\u9009\u62e9\u54ea\u79cd\u5b89\u88c5\u65b9\u6cd5&#xff0c;\u90fd\u9700\u8981\u751f\u6210\u57fa\u672c\u7684\u914d\u7f6e\u6587\u4ef6&#xff1a;<\/p>\n<p># \u5207\u6362\u5230Synapse\u76ee\u5f55<br \/>\ncd ~\/synapse<\/p>\n<p># \u751f\u6210\u914d\u7f6e\u6587\u4ef6<br \/>\npython -m synapse.app.homeserver \\\\<br \/>\n  &#8211;server-name your-domain.com \\\\<br \/>\n  &#8211;config-path homeserver.yaml \\\\<br \/>\n  &#8211;generate-config \\\\<br \/>\n  &#8211;report-stats&#061;yes<\/p>\n<p>\u91cd\u8981\u63d0\u793a&#xff1a;&#8211;server-name\u53c2\u6570\u975e\u5e38\u91cd\u8981&#xff0c;\u5b83\u51b3\u5b9a\u4e86\u7528\u6237\u7684ID\u683c\u5f0f&#xff08;\u5982&#064;user:your-domain.com&#xff09;&#xff0c;\u5e76\u4e14\u4e00\u65e6\u8bbe\u7f6e\u5c31\u4e0d\u80fd\u66f4\u6539&#xff01;<\/p>\n<h3>\u2699\ufe0f \u7b2c3\u6b65&#xff1a;\u914d\u7f6e\u6570\u636e\u5e93<\/h3>\n<p>Synapse\u9ed8\u8ba4\u4f7f\u7528SQLite\u6570\u636e\u5e93&#xff0c;\u4f46\u751f\u4ea7\u73af\u5883\u5f3a\u70c8\u63a8\u8350\u4f7f\u7528PostgreSQL\u4ee5\u83b7\u5f97\u66f4\u597d\u7684\u6027\u80fd&#xff1a;<\/p>\n<h4>\u4f7f\u7528PostgreSQL&#xff08;\u63a8\u8350&#xff09;<\/h4>\n<p># \u5b89\u88c5PostgreSQL<br \/>\nsudo apt install postgresql postgresql-contrib<\/p>\n<p># \u521b\u5efa\u6570\u636e\u5e93\u548c\u7528\u6237<br \/>\nsudo -u postgres psql<br \/>\nCREATE DATABASE synapse;<br \/>\nCREATE USER synapse WITH ENCRYPTED PASSWORD &#039;your-password&#039;;<br \/>\nGRANT ALL PRIVILEGES ON DATABASE synapse TO synapse;<br \/>\n\\\\q<\/p>\n<p>\u7136\u540e\u7f16\u8f91homeserver.yaml\u6587\u4ef6&#xff1a;<\/p>\n<p>database:<br \/>\n  name: psycopg2<br \/>\n  args:<br \/>\n    user: synapse<br \/>\n    password: your-password<br \/>\n    database: synapse<br \/>\n    host: localhost<br \/>\n    cp_min: 5<br \/>\n    cp_max: 10<\/p>\n<h4>\u4f7f\u7528SQLite&#xff08;\u4ec5\u6d4b\u8bd5&#xff09;<\/h4>\n<p>\u5982\u679c\u60a8\u53ea\u662f\u6d4b\u8bd5&#xff0c;\u53ef\u4ee5\u4fdd\u6301\u9ed8\u8ba4\u7684SQLite\u914d\u7f6e&#xff1a;<\/p>\n<p>database:<br \/>\n  name: sqlite3<br \/>\n  args:<br \/>\n    database: \/path\/to\/homeserver.db<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/raw.gitcode.com\/gh_mirrors\/syna\/synapse\/raw\/0549307198cc515e5bb292a56b9d0b5edd616e7c\/contrib\/datagrip\/datagrip-aware-of-schema.png?utm_source=gitcode_repo_files\" alt=\"\u6570\u636e\u5e93\u67b6\u6784\u56fe\" \/> DataGrip\u4e2d\u663e\u793a\u7684Synapse\u6570\u636e\u5e93\u67b6\u6784&#xff0c;\u5c55\u793a\u4e86\u8868\u7ed3\u6784\u548c\u5173\u7cfb<\/p>\n<h3>&#x1f510; \u7b2c4\u6b65&#xff1a;\u914d\u7f6eTLS\/SSL\u8bc1\u4e66<\/h3>\n<p>\u4e3a\u4e86\u5b89\u5168\u901a\u4fe1&#xff0c;\u60a8\u9700\u8981\u914d\u7f6eHTTPS&#xff1a;<\/p>\n<h4>\u4f7f\u7528\u53cd\u5411\u4ee3\u7406&#xff08;\u63a8\u8350&#xff09;<\/h4>\n<p># Nginx\u914d\u7f6e\u793a\u4f8b<br \/>\nserver {<br \/>\n    listen 443 ssl http2;<br \/>\n    server_name your-domain.com;<\/p>\n<p>    ssl_certificate \/etc\/letsencrypt\/live\/your-domain.com\/fullchain.pem;<br \/>\n    ssl_certificate_key \/etc\/letsencrypt\/live\/your-domain.com\/privkey.pem;<\/p>\n<p>    location \/_matrix {<br \/>\n        proxy_pass http:\/\/localhost:8008;<br \/>\n        proxy_set_header X-Forwarded-For $remote_addr;<br \/>\n        proxy_set_header X-Forwarded-Proto $scheme;<br \/>\n        proxy_set_header Host $host;<br \/>\n    }<\/p>\n<p>    location \/.well-known\/matrix {<br \/>\n        root \/var\/www\/html;<br \/>\n        default_type application\/json;<br \/>\n        add_header Access-Control-Allow-Origin *;<br \/>\n    }<br \/>\n}<\/p>\n<h4>\u76f4\u63a5\u914d\u7f6eTLS<\/h4>\n<p>\u5728homeserver.yaml\u4e2d\u914d\u7f6e&#xff1a;<\/p>\n<p>listeners:<br \/>\n  &#8211; port: 8448<br \/>\n    type: http<br \/>\n    tls: true<br \/>\n    bind_addresses: [&#039;::&#039;]<br \/>\n    resources:<br \/>\n      &#8211; names: [client, federation]<br \/>\n    tls_certificate_path: \/path\/to\/cert.pem<br \/>\n    tls_private_key_path: \/path\/to\/key.pem<\/p>\n<h3>&#x1f4e7; \u7b2c5\u6b65&#xff1a;\u914d\u7f6e\u7535\u5b50\u90ae\u4ef6\u670d\u52a1<\/h3>\n<p>\u542f\u7528\u7535\u5b50\u90ae\u4ef6\u529f\u80fd\u53ef\u4ee5\u652f\u6301\u5bc6\u7801\u91cd\u7f6e\u548c\u901a\u77e5&#xff1a;<\/p>\n<p>email:<br \/>\n  enable_notifs: true<br \/>\n  smtp_host: smtp.gmail.com<br \/>\n  smtp_port: 587<br \/>\n  smtp_user: &#034;your-email&#064;gmail.com&#034;<br \/>\n  smtp_pass: &#034;your-app-password&#034;<br \/>\n  require_transport_security: true<br \/>\n  notif_from: &#034;Your Synapse Server &lt;noreply&#064;your-domain.com&gt;&#034;<br \/>\n  app_name: &#034;My Synapse Server&#034;<br \/>\n  notif_template_html: notif_mail.html<br \/>\n  notif_template_text: notif_mail.txt<\/p>\n<h3>&#x1f680; \u7b2c6\u6b65&#xff1a;\u542f\u52a8Synapse\u670d\u52a1\u5668<\/h3>\n<h4>\u4f7f\u7528systemd&#xff08;\u751f\u4ea7\u73af\u5883&#xff09;<\/h4>\n<p># \u521b\u5efasystemd\u670d\u52a1\u6587\u4ef6<br \/>\nsudo nano \/etc\/systemd\/system\/matrix-synapse.service<\/p>\n<p>\u670d\u52a1\u6587\u4ef6\u5185\u5bb9&#xff1a;<\/p>\n<p>[Unit]<br \/>\nDescription&#061;Matrix Synapse Homeserver<br \/>\nAfter&#061;network.target postgresql.service<\/p>\n<p>[Service]<br \/>\nType&#061;simple<br \/>\nUser&#061;synapse<br \/>\nGroup&#061;synapse<br \/>\nWorkingDirectory&#061;\/var\/lib\/matrix-synapse<br \/>\nExecStart&#061;\/usr\/bin\/python3 -m synapse.app.homeserver \\\\<br \/>\n  &#8211;config-path \/etc\/matrix-synapse\/homeserver.yaml<br \/>\nRestart&#061;on-failure<br \/>\nRestartSec&#061;5s<\/p>\n<p>[Install]<br \/>\nWantedBy&#061;multi-user.target<\/p>\n<h4>\u4f7f\u7528synctl\u811a\u672c<\/h4>\n<p># \u542f\u52a8\u670d\u52a1<br \/>\nsource ~\/synapse\/env\/bin\/activate<br \/>\nsynctl start<\/p>\n<p># \u67e5\u770b\u72b6\u6001<br \/>\nsynctl status<\/p>\n<p># \u505c\u6b62\u670d\u52a1<br \/>\nsynctl stop<\/p>\n<h3>&#x1f464; \u7b2c7\u6b65&#xff1a;\u521b\u5efa\u7ba1\u7406\u5458\u7528\u6237<\/h3>\n<p>\u521b\u5efa\u7b2c\u4e00\u4e2a\u7528\u6237&#xff08;\u5efa\u8bae\u8bbe\u7f6e\u4e3a\u7ba1\u7406\u5458&#xff09;&#xff1a;<\/p>\n<p># \u786e\u4fdd\u670d\u52a1\u6b63\u5728\u8fd0\u884c<br \/>\nsynctl start<\/p>\n<p># \u521b\u5efa\u7528\u6237<br \/>\nregister_new_matrix_user -c homeserver.yaml<\/p>\n<p>\u4ea4\u4e92\u5f0f\u63d0\u793a&#xff1a;<\/p>\n<p>New user localpart: admin<br \/>\nPassword:<br \/>\nConfirm password:<br \/>\nMake admin [no]: yes<br \/>\nSuccess!<\/p>\n<h3>&#x1f310; \u7b2c8\u6b65&#xff1a;\u914d\u7f6e\u8054\u90a6\u901a\u4fe1<\/h3>\n<p>\u8981\u4f7f\u60a8\u7684\u670d\u52a1\u5668\u80fd\u591f\u4e0e\u5176\u4ed6Matrix\u670d\u52a1\u5668\u901a\u4fe1&#xff0c;\u9700\u8981\u6b63\u786e\u914d\u7f6eDNS\u8bb0\u5f55&#xff1a;<\/p>\n<h4>DNS\u8bb0\u5f55\u914d\u7f6e<\/h4>\n<p># SRV\u8bb0\u5f55&#xff08;\u63a8\u8350&#xff09;<br \/>\n_matrix._tcp.your-domain.com. 3600 IN SRV 10 5 443 your-domain.com.<\/p>\n<p># \u6216CNAME\u8bb0\u5f55&#xff08;\u5907\u9009&#xff09;<br \/>\n_matrix._tcp.your-domain.com. 3600 IN CNAME your-domain.com.<\/p>\n<h4>\u9632\u706b\u5899\u914d\u7f6e<\/h4>\n<p>\u786e\u4fdd\u7aef\u53e3443&#xff08;HTTPS&#xff09;\u548c8448&#xff08;\u8054\u90a6&#xff09;\u5bf9\u5916\u5f00\u653e&#xff1a;<\/p>\n<p># \u5982\u679c\u4f7f\u7528UFW<br \/>\nsudo ufw allow 443\/tcp<br \/>\nsudo ufw allow 8448\/tcp<br \/>\nsudo ufw reload<\/p>\n<h3>&#x1f4ca; \u7b2c9\u6b65&#xff1a;\u76d1\u63a7\u548c\u7ef4\u62a4<\/h3>\n<h4>\u542f\u7528\u6307\u6807\u6536\u96c6<\/h4>\n<p># \u5728homeserver.yaml\u4e2d\u6dfb\u52a0<br \/>\nmetrics:<br \/>\n  enabled: true<br \/>\n  report_stats: true<\/p>\n<h4>\u914d\u7f6e\u65e5\u5fd7\u8bb0\u5f55<\/h4>\n<p>log_config: &#034;\/etc\/matrix-synapse\/your-domain.com.log.config&#034;<\/p>\n<p>\u4f7f\u7528\u63d0\u4f9b\u7684\u65e5\u5fd7\u914d\u7f6e\u6587\u4ef6\u793a\u4f8b&#xff1a;contrib\/example_log_config.yaml<\/p>\n<h4>\u5b9a\u671f\u5907\u4efd<\/h4>\n<p># \u5907\u4efdPostgreSQL\u6570\u636e\u5e93<br \/>\npg_dump -U synapse synapse &gt; synapse_backup_$(date &#043;%Y%m%d).sql<\/p>\n<p># \u5907\u4efd\u5a92\u4f53\u6587\u4ef6<br \/>\ntar -czf media_store_backup_$(date &#043;%Y%m%d).tar.gz \/path\/to\/media_store<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/raw.gitcode.com\/gh_mirrors\/syna\/synapse\/raw\/0549307198cc515e5bb292a56b9d0b5edd616e7c\/docs\/development\/img\/git\/branches.jpg?utm_source=gitcode_repo_files\" alt=\"Git\u5206\u652f\u7ba1\u7406\" \/> Synapse\u5f00\u53d1\u4e2d\u7684Git\u5206\u652f\u7ba1\u7406\u7b56\u7565&#xff0c;\u5c55\u793a\u4e86\u7a33\u5b9a\u5206\u652f\u548c\u5f00\u53d1\u5206\u652f\u7684\u5de5\u4f5c\u6d41\u7a0b<\/p>\n<h3>&#x1f6e1;\ufe0f \u7b2c10\u6b65&#xff1a;\u5b89\u5168\u52a0\u56fa<\/h3>\n<h4>1. \u66f4\u65b0\u548c\u5347\u7ea7<\/h4>\n<p># \u5b9a\u671f\u66f4\u65b0Synapse<br \/>\nsource ~\/synapse\/env\/bin\/activate<br \/>\npip install -U matrix-synapse<\/p>\n<h4>2. \u914d\u7f6e\u9632\u706b\u5899<\/h4>\n<p># \u53ea\u5f00\u653e\u5fc5\u8981\u7aef\u53e3<br \/>\nsudo ufw default deny incoming<br \/>\nsudo ufw default allow outgoing<br \/>\nsudo ufw allow ssh<br \/>\nsudo ufw allow 443\/tcp<br \/>\nsudo ufw allow 8448\/tcp<br \/>\nsudo ufw enable<\/p>\n<h4>3. \u542f\u7528\u81ea\u52a8\u5b89\u5168\u66f4\u65b0<\/h4>\n<p># Ubuntu\/Debian<br \/>\nsudo apt install unattended-upgrades<br \/>\nsudo dpkg-reconfigure &#8211;priority&#061;low unattended-upgrades<\/p>\n<h4>4. \u914d\u7f6efail2ban<\/h4>\n<p># \u5b89\u88c5fail2ban<br \/>\nsudo apt install fail2ban<\/p>\n<p># \u521b\u5efaSynapse jail\u914d\u7f6e<br \/>\nsudo nano \/etc\/fail2ban\/jail.d\/synapse.conf<\/p>\n<h3>&#x1f527; \u6545\u969c\u6392\u9664<\/h3>\n<h4>\u5e38\u89c1\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6848<\/h4>\n<p>\u95ee\u98981&#xff1a;\u7aef\u53e3\u88ab\u5360\u7528<\/p>\n<p># \u68c0\u67e5\u7aef\u53e3\u5360\u7528<br \/>\nsudo netstat -tulpn | grep :8008<br \/>\nsudo lsof -i :8008<\/p>\n<p>\u95ee\u98982&#xff1a;\u6570\u636e\u5e93\u8fde\u63a5\u5931\u8d25<\/p>\n<p># \u68c0\u67e5PostgreSQL\u670d\u52a1\u72b6\u6001<br \/>\nsudo systemctl status postgresql<\/p>\n<p># \u6d4b\u8bd5\u6570\u636e\u5e93\u8fde\u63a5<br \/>\npsql -U synapse -d synapse -h localhost<\/p>\n<p>\u95ee\u98983&#xff1a;\u8bc1\u4e66\u95ee\u9898<\/p>\n<p># \u6d4b\u8bd5SSL\u8bc1\u4e66<br \/>\nopenssl s_client -connect your-domain.com:443 -servername your-domain.com<\/p>\n<p>\u95ee\u98984&#xff1a;\u5185\u5b58\u4e0d\u8db3<\/p>\n<p># \u76d1\u63a7\u5185\u5b58\u4f7f\u7528<br \/>\nfree -h<br \/>\ntop -u synapse<\/p>\n<p># \u8c03\u6574\u6570\u636e\u5e93\u8fde\u63a5\u6c60<br \/>\n# \u5728homeserver.yaml\u4e2d\u51cf\u5c11cp_min\u548ccp_max<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/raw.gitcode.com\/gh_mirrors\/syna\/synapse\/raw\/0549307198cc515e5bb292a56b9d0b5edd616e7c\/docs\/auth_chain_diff.dot.png?utm_source=gitcode_repo_files\" alt=\"\u6743\u9650\u94fe\u6d41\u7a0b\u56fe\" \/> Synapse\u4e2d\u7684\u6743\u9650\u9a8c\u8bc1\u6d41\u7a0b&#xff0c;\u5c55\u793a\u4e86\u4e8b\u4ef6\u94fe\u548c\u6743\u9650\u68c0\u67e5\u673a\u5236<\/p>\n<h3>&#x1f4c8; \u6027\u80fd\u4f18\u5316\u5efa\u8bae<\/h3>\n<h4>1. \u6570\u636e\u5e93\u4f18\u5316<\/h4>\n<p># \u8c03\u6574PostgreSQL\u914d\u7f6e<br \/>\ndatabase:<br \/>\n  name: psycopg2<br \/>\n  args:<br \/>\n    user: synapse<br \/>\n    password: your-password<br \/>\n    database: synapse<br \/>\n    host: localhost<br \/>\n    cp_min: 5<br \/>\n    cp_max: 20<br \/>\n    keepalives_idle: 10<br \/>\n    keepalives_interval: 10<\/p>\n<h4>2. \u7f13\u5b58\u914d\u7f6e<\/h4>\n<p># \u589e\u52a0\u7f13\u5b58\u5927\u5c0f<br \/>\ncaches:<br \/>\n  per_cache_factors:<br \/>\n    get_users_who_share_room: 10<br \/>\n    get_rooms_for_user: 10<\/p>\n<h4>3. \u5de5\u4f5c\u8fdb\u7a0b\u914d\u7f6e<\/h4>\n<p>\u5bf9\u4e8e\u9ad8\u8d1f\u8f7d\u73af\u5883&#xff0c;\u8003\u8651\u4f7f\u7528\u5de5\u4f5c\u8fdb\u7a0b&#xff1a;<\/p>\n<p># \u5728homeserver.yaml\u4e2d\u542f\u7528\u5de5\u4f5c\u8fdb\u7a0b<br \/>\nworker_app: synapse.app.generic_worker<br \/>\nworker_name: worker1<br \/>\nworker_listeners:<br \/>\n  &#8211; type: http<br \/>\n    port: 8034<br \/>\n    bind_addresses: [&#039;::1&#039;]<br \/>\n    resources:<br \/>\n      &#8211; names: [client]<\/p>\n<h3>&#x1f3af; \u4e0b\u4e00\u6b65\u64cd\u4f5c<\/h3>\n<h4>1. \u6d4b\u8bd5\u670d\u52a1\u5668\u72b6\u6001<\/h4>\n<p># \u68c0\u67e5\u670d\u52a1\u5668\u5065\u5eb7\u72b6\u6001<br \/>\ncurl https:\/\/your-domain.com\/_matrix\/client\/versions<\/p>\n<p># \u6d4b\u8bd5\u8054\u90a6\u8fde\u63a5<br \/>\ncurl https:\/\/your-domain.com\/.well-known\/matrix\/server<\/p>\n<h4>2. \u8fde\u63a5\u5ba2\u6237\u7aef<\/h4>\n<ul>\n<li>\u4e0b\u8f7d\u5e76\u5b89\u88c5Element\u5ba2\u6237\u7aef<\/li>\n<li>\u4f7f\u7528\u60a8\u7684\u670d\u52a1\u5668\u5730\u5740&#xff1a;https:\/\/your-domain.com<\/li>\n<li>\u4f7f\u7528\u521b\u5efa\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\u767b\u5f55<\/li>\n<\/ul>\n<h4>3. \u52a0\u5165Matrix\u793e\u533a<\/h4>\n<ul>\n<li>\u52a0\u5165\u5b98\u65b9\u652f\u6301\u623f\u95f4&#xff1a;#synapse:matrix.org<\/li>\n<li>\u53c2\u4e0e\u5f00\u53d1\u8ba8\u8bba&#xff1a;#synapse-dev:matrix.org<\/li>\n<\/ul>\n<h4>4. \u63a2\u7d22\u9ad8\u7ea7\u529f\u80fd<\/h4>\n<ul>\n<li>\u914d\u7f6e\u5e94\u7528\u670d\u52a1<\/li>\n<li>\u8bbe\u7f6e\u63a8\u9001\u901a\u77e5<\/li>\n<li>\u96c6\u6210\u5355\u70b9\u767b\u5f55<\/li>\n<li>\u914d\u7f6e\u5a92\u4f53\u5b58\u50a8<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/raw.gitcode.com\/gh_mirrors\/syna\/synapse\/raw\/0549307198cc515e5bb292a56b9d0b5edd616e7c\/docs\/development\/img\/git\/clean.png?utm_source=gitcode_repo_files\" alt=\"Git\u63d0\u4ea4\u5386\u53f2\" \/> Synapse\u9879\u76ee\u7684Git\u63d0\u4ea4\u5386\u53f2&#xff0c;\u5c55\u793a\u4e86\u4ee3\u7801\u53d8\u66f4\u548c\u7248\u672c\u7ba1\u7406<\/p>\n<h3>&#x1f4da; \u8d44\u6e90\u4e0e\u6587\u6863<\/h3>\n<h4>\u5b98\u65b9\u6587\u6863\u8def\u5f84<\/h4>\n<ul>\n<li>\u5b89\u88c5\u6307\u5357&#xff1a;docs\/setup\/installation.md<\/li>\n<li>\u914d\u7f6e\u6587\u6863&#xff1a;docs\/usage\/configuration\/config_documentation.md<\/li>\n<li>\u7ba1\u7406\u6307\u5357&#xff1a;docs\/usage\/administration\/<\/li>\n<li>\u5f00\u53d1\u6307\u5357&#xff1a;docs\/development\/<\/li>\n<\/ul>\n<h4>\u914d\u7f6e\u6587\u4ef6\u793a\u4f8b<\/h4>\n<ul>\n<li>\u4e3b\u914d\u7f6e\u6587\u4ef6&#xff1a;docs\/sample_config.yaml<\/li>\n<li>\u65e5\u5fd7\u914d\u7f6e&#xff1a;contrib\/example_log_config.yaml<\/li>\n<li>Docker\u914d\u7f6e&#xff1a;contrib\/docker\/docker-compose.yml<\/li>\n<\/ul>\n<h4>\u811a\u672c\u5de5\u5177<\/h4>\n<ul>\n<li>\u914d\u7f6e\u751f\u6210&#xff1a;synapse\/_scripts\/generate_config.py<\/li>\n<li>\u7528\u6237\u7ba1\u7406&#xff1a;synapse\/_scripts\/register_new_matrix_user.py<\/li>\n<li>\u670d\u52a1\u63a7\u5236&#xff1a;synapse\/_scripts\/synctl.py<\/li>\n<\/ul>\n<h3>&#x1f389; \u606d\u559c&#xff01;\u60a8\u7684Synapse\u670d\u52a1\u5668\u5df2\u5c31\u7eea<\/h3>\n<p>\u901a\u8fc7\u8fd910\u4e2a\u6b65\u9aa4&#xff0c;\u60a8\u5df2\u7ecf\u6210\u529f\u642d\u5efa\u4e86\u4e00\u4e2a\u529f\u80fd\u5b8c\u6574\u7684Matrix Synapse\u5bb6\u5ead\u670d\u52a1\u5668\u3002\u73b0\u5728\u60a8\u53ef\u4ee5&#xff1a;<\/p>\n<li>\u9080\u8bf7\u670b\u53cb\u52a0\u5165\u60a8\u7684\u79c1\u6709\u804a\u5929\u670d\u52a1\u5668<\/li>\n<li>\u521b\u5efa\u7fa4\u7ec4\u623f\u95f4\u8fdb\u884c\u56e2\u961f\u534f\u4f5c<\/li>\n<li>\u542f\u7528\u7aef\u5230\u7aef\u52a0\u5bc6\u4fdd\u62a4\u901a\u4fe1\u5b89\u5168<\/li>\n<li>\u8fde\u63a5\u5176\u4ed6Matrix\u670d\u52a1\u5668\u52a0\u5165\u8054\u90a6\u7f51\u7edc<\/li>\n<li>\u5f00\u53d1\u81ea\u5b9a\u4e49\u5e94\u7528\u6269\u5c55\u670d\u52a1\u5668\u529f\u80fd<\/li>\n<p>\u8bb0\u4f4f\u5b9a\u671f\u68c0\u67e5\u66f4\u65b0\u65e5\u5fd7\u548c\u5b89\u5168\u516c\u544a&#xff0c;\u4fdd\u6301\u670d\u52a1\u5668\u7684\u6700\u65b0\u72b6\u6001\u3002\u5982\u679c\u60a8\u9047\u5230\u4efb\u4f55\u95ee\u9898&#xff0c;Matrix\u793e\u533a\u603b\u662f\u4e50\u4e8e\u63d0\u4f9b\u5e2e\u52a9&#xff01;<\/p>\n<p>&#x1f4a1; \u63d0\u793a&#xff1a;\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u524d&#xff0c;\u8bf7\u52a1\u5fc5\u9605\u8bfb\u5b89\u5168\u6307\u5357\u5e76\u5b8c\u6210\u6240\u6709\u5b89\u5168\u914d\u7f6e\u3002<\/p>\n<p>\u73b0\u5728\u5f00\u59cb\u4eab\u53d7\u60a8\u81ea\u5df1\u638c\u63a7\u7684\u3001\u53bb\u4e2d\u5fc3\u5316\u7684\u5373\u65f6\u901a\u8baf\u4f53\u9a8c\u5427&#xff01; &#x1f680;<\/p>\n<p>\u521b\u4f5c\u58f0\u660e\uff1a\u672c\u6587\u90e8\u5206\u5185\u5bb9\u7531AI\u8f85\u52a9\u751f\u6210\uff08AIGC\uff09\uff0c\u4ec5\u4f9b\u53c2\u8003<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Synapse\u5b8c\u6574\u5b89\u88c5\u6559\u7a0b&#xff1a;\u4ece\u96f6\u5f00\u59cb\u914d\u7f6ePython\/Twisted\u5bb6\u5ead\u670d\u52a1\u5668<br \/>\n&#x1f680; \u7ec8\u6781\u6307\u5357&#xff1a;10\u6b65\u5feb\u901f\u642d\u5efaMatrix Synapse\u5bb6\u5ead\u670d\u52a1\u5668 &#x1f680;<br \/>\nSynapse\u662f\u4e00\u4e2a\u7528Python\/Twisted\u7f16\u5199\u7684\u5f00\u6e90Matrix\u5bb6\u5ead\u670d\u52a1\u5668\u5b9e\u73b0&#xff0c;\u5b83\u5141\u8bb8\u60a8\u8fd0\u884c\u81ea\u5df1\u7684\u5b89\u5168\u3001\u53bb\u4e2d\u5fc3\u5316\u901a\u4fe1\u5e73\u53f0\u3002\u4f5c\u4e3aMatrix\u534f\u8bae\u7684\u6838\u5fc3\u7ec4\u4ef6&#xff0c;Synapse\u5bb6\u5ead\u670d\u52a1\u5668\u63d0\u4f9b\u4e86\u5b8c\u6574\u7684\u5373\u65f6\u901a\u8baf\u529f\u80fd&#xff0c;\u652f\u6301\u7aef\u5230\u7aef<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-89943","post","type-post","status-publish","format-standard","hentry","category-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Synapse\u5b8c\u6574\u5b89\u88c5\u6559\u7a0b\uff1a\u4ece\u96f6\u5f00\u59cb\u914d\u7f6ePython\/Twisted\u5bb6\u5ead\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/89943.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Synapse\u5b8c\u6574\u5b89\u88c5\u6559\u7a0b\uff1a\u4ece\u96f6\u5f00\u59cb\u914d\u7f6ePython\/Twisted\u5bb6\u5ead\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Synapse\u5b8c\u6574\u5b89\u88c5\u6559\u7a0b&#xff1a;\u4ece\u96f6\u5f00\u59cb\u914d\u7f6ePython\/Twisted\u5bb6\u5ead\u670d\u52a1\u5668 &#x1f680; \u7ec8\u6781\u6307\u5357&#xff1a;10\u6b65\u5feb\u901f\u642d\u5efaMatrix Synapse\u5bb6\u5ead\u670d\u52a1\u5668 &#x1f680; Synapse\u662f\u4e00\u4e2a\u7528Python\/Twisted\u7f16\u5199\u7684\u5f00\u6e90Matrix\u5bb6\u5ead\u670d\u52a1\u5668\u5b9e\u73b0&#xff0c;\u5b83\u5141\u8bb8\u60a8\u8fd0\u884c\u81ea\u5df1\u7684\u5b89\u5168\u3001\u53bb\u4e2d\u5fc3\u5316\u901a\u4fe1\u5e73\u53f0\u3002\u4f5c\u4e3aMatrix\u534f\u8bae\u7684\u6838\u5fc3\u7ec4\u4ef6&#xff0c;Synapse\u5bb6\u5ead\u670d\u52a1\u5668\u63d0\u4f9b\u4e86\u5b8c\u6574\u7684\u5373\u65f6\u901a\u8baf\u529f\u80fd&#xff0c;\u652f\u6301\u7aef\u5230\u7aef\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/89943.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-04T01:00:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/raw.gitcode.com\/gh_mirrors\/syna\/synapse\/raw\/0549307198cc515e5bb292a56b9d0b5edd616e7c\/contrib\/datagrip\/datagrip-aware-of-schema.png?utm_source=gitcode_repo_files\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/89943.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/89943.html\",\"name\":\"Synapse\u5b8c\u6574\u5b89\u88c5\u6559\u7a0b\uff1a\u4ece\u96f6\u5f00\u59cb\u914d\u7f6ePython\/Twisted\u5bb6\u5ead\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-04T01:00:47+00:00\",\"dateModified\":\"2026-08-04T01:00:47+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/89943.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/89943.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/89943.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Synapse\u5b8c\u6574\u5b89\u88c5\u6559\u7a0b\uff1a\u4ece\u96f6\u5f00\u59cb\u914d\u7f6ePython\/Twisted\u5bb6\u5ead\u670d\u52a1\u5668\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Synapse\u5b8c\u6574\u5b89\u88c5\u6559\u7a0b\uff1a\u4ece\u96f6\u5f00\u59cb\u914d\u7f6ePython\/Twisted\u5bb6\u5ead\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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:\/\/www.wsisp.com\/helps\/89943.html","og_locale":"zh_CN","og_type":"article","og_title":"Synapse\u5b8c\u6574\u5b89\u88c5\u6559\u7a0b\uff1a\u4ece\u96f6\u5f00\u59cb\u914d\u7f6ePython\/Twisted\u5bb6\u5ead\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Synapse\u5b8c\u6574\u5b89\u88c5\u6559\u7a0b&#xff1a;\u4ece\u96f6\u5f00\u59cb\u914d\u7f6ePython\/Twisted\u5bb6\u5ead\u670d\u52a1\u5668 &#x1f680; \u7ec8\u6781\u6307\u5357&#xff1a;10\u6b65\u5feb\u901f\u642d\u5efaMatrix Synapse\u5bb6\u5ead\u670d\u52a1\u5668 &#x1f680; Synapse\u662f\u4e00\u4e2a\u7528Python\/Twisted\u7f16\u5199\u7684\u5f00\u6e90Matrix\u5bb6\u5ead\u670d\u52a1\u5668\u5b9e\u73b0&#xff0c;\u5b83\u5141\u8bb8\u60a8\u8fd0\u884c\u81ea\u5df1\u7684\u5b89\u5168\u3001\u53bb\u4e2d\u5fc3\u5316\u901a\u4fe1\u5e73\u53f0\u3002\u4f5c\u4e3aMatrix\u534f\u8bae\u7684\u6838\u5fc3\u7ec4\u4ef6&#xff0c;Synapse\u5bb6\u5ead\u670d\u52a1\u5668\u63d0\u4f9b\u4e86\u5b8c\u6574\u7684\u5373\u65f6\u901a\u8baf\u529f\u80fd&#xff0c;\u652f\u6301\u7aef\u5230\u7aef","og_url":"https:\/\/www.wsisp.com\/helps\/89943.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-04T01:00:47+00:00","og_image":[{"url":"https:\/\/raw.gitcode.com\/gh_mirrors\/syna\/synapse\/raw\/0549307198cc515e5bb292a56b9d0b5edd616e7c\/contrib\/datagrip\/datagrip-aware-of-schema.png?utm_source=gitcode_repo_files"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/89943.html","url":"https:\/\/www.wsisp.com\/helps\/89943.html","name":"Synapse\u5b8c\u6574\u5b89\u88c5\u6559\u7a0b\uff1a\u4ece\u96f6\u5f00\u59cb\u914d\u7f6ePython\/Twisted\u5bb6\u5ead\u670d\u52a1\u5668 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-04T01:00:47+00:00","dateModified":"2026-08-04T01:00:47+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/89943.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/89943.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/89943.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Synapse\u5b8c\u6574\u5b89\u88c5\u6559\u7a0b\uff1a\u4ece\u96f6\u5f00\u59cb\u914d\u7f6ePython\/Twisted\u5bb6\u5ead\u670d\u52a1\u5668"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/89943","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=89943"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/89943\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=89943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=89943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=89943"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=89943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}