diff --git a/.github/README.md b/.github/README.md index 0564e9823..9b3ae8531 100644 --- a/.github/README.md +++ b/.github/README.md @@ -153,6 +153,7 @@ | 🟢 | | Stream-Rec | https://github.com/hua0512/stream-rec/ | Stream-rec是一个用于各种流媒体服务的自动流媒体录制工具 | | | 🟢 | | Stream-Rec Web版 | https://github.com/hua0512/stream-rec/ | 【前端版】Stream-rec是一个用于各种流媒体服务的自动流媒体录制工具 | | | 🟢 | | Stream-Rec 服务版 | https://github.com/hua0512/stream-rec/ | 【服务版】Stream-rec是一个用于各种流媒体服务的自动流媒体录制工具 | | +| 🟢 | | Synapse | https://matrix.org/ | 用于安全、分散通信的开放网络 | | | 🟢 | | 唐僧叨叨 | https://tsdaodao.com/ | 让企业轻松拥有自己的即时通讯 | | | 🟢 | | Teemii | https://www.teemii.io/ | 漫画阅读器和管理器 | | | 🟢 | | Telegram Bot Api | https://telegram.org/ | 自建 Telegram Bot API 服务器 | | diff --git a/README.md b/README.md index f94e58a83..ae16965af 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ | 🟢 | | Stream-Rec | https://github.com/hua0512/stream-rec/ | Stream-rec是一个用于各种流媒体服务的自动流媒体录制工具 | | | 🟢 | | Stream-Rec Web版 | https://github.com/hua0512/stream-rec/ | 【前端版】Stream-rec是一个用于各种流媒体服务的自动流媒体录制工具 | | | 🟢 | | Stream-Rec 服务版 | https://github.com/hua0512/stream-rec/ | 【服务版】Stream-rec是一个用于各种流媒体服务的自动流媒体录制工具 | | +| 🟢 | | Synapse | https://matrix.org/ | 用于安全、分散通信的开放网络 | | | 🟢 | | 唐僧叨叨 | https://tsdaodao.com/ | 让企业轻松拥有自己的即时通讯 | | | 🟢 | | Teemii | https://www.teemii.io/ | 漫画阅读器和管理器 | | | 🟢 | | Telegram Bot Api | https://telegram.org/ | 自建 Telegram Bot API 服务器 | | diff --git a/apps/synapse/1.118.0/data.yml b/apps/synapse/1.118.0/data.yml new file mode 100644 index 000000000..02b600d34 --- /dev/null +++ b/apps/synapse/1.118.0/data.yml @@ -0,0 +1,10 @@ +additionalProperties: + formFields: + - default: 8008 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelZh: 访问端口 + labelEn: Port + required: true + rule: paramPort + type: number diff --git a/apps/synapse/1.118.0/docker-compose.yml b/apps/synapse/1.118.0/docker-compose.yml new file mode 100644 index 000000000..ccb44cc22 --- /dev/null +++ b/apps/synapse/1.118.0/docker-compose.yml @@ -0,0 +1,20 @@ +networks: + 1panel-network: + external: true + +services: + synapse: + image: matrixdotorg/synapse:v1.118.0 + container_name: ${CONTAINER_NAME} + labels: + createdBy: "Apps" + restart: always + networks: + - 1panel-network + ports: + - ${PANEL_APP_PORT_HTTP}:8008 + env_file: + - /etc/1panel/envs/global.env + - ${ENV_FILE:-/etc/1panel/envs/default.env} + volumes: + - ./data:/data diff --git a/apps/synapse/1.118.0/scripts/init.sh b/apps/synapse/1.118.0/scripts/init.sh new file mode 100644 index 000000000..541fc8375 --- /dev/null +++ b/apps/synapse/1.118.0/scripts/init.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + + # setup-2 generate key + mkdir -p "${CURRENT_DIR}/data" + docker run -it --rm \ + --mount type=bind,src="${CURRENT_DIR}/data",dst=/data \ + -e SYNAPSE_SERVER_NAME="$DOMAIN_NAME" \ + -e SYNAPSE_REPORT_STATS=no \ + matrixdotorg/synapse:latest generate + + # setup-3 check permission + chmod -R 777 "${CURRENT_DIR}/data" + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/synapse/1.118.0/scripts/uninstall.sh b/apps/synapse/1.118.0/scripts/uninstall.sh new file mode 100644 index 000000000..c86c4fbca --- /dev/null +++ b/apps/synapse/1.118.0/scripts/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/synapse/1.118.0/scripts/upgrade.sh b/apps/synapse/1.118.0/scripts/upgrade.sh new file mode 100644 index 000000000..77b849120 --- /dev/null +++ b/apps/synapse/1.118.0/scripts/upgrade.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/synapse/README.md b/apps/synapse/README.md new file mode 100644 index 000000000..c6873653c --- /dev/null +++ b/apps/synapse/README.md @@ -0,0 +1,68 @@ +# Synapse + +Synapse 是一个开源的 Matrix 家庭服务器实现,由 Element 开发和维护。Matrix 是安全且可互操作实时通信的开放标准。 + +![Synapse](https://file.lifebus.top/imgs/synapse_cover.png) + +![](https://img.shields.io/badge/%E6%96%B0%E7%96%86%E8%90%8C%E6%A3%AE%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E5%B7%A5%E4%BD%9C%E5%AE%A4-%E6%8F%90%E4%BE%9B%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81-blue) + +## 安装说明 + +### 快捷命令 + +#### 查看帮助 + +```sh +register_new_matrix_user http://localhost:8008 -c /data/homeserver.yaml --help +``` + +#### 生成管理员用户 + +> 请替换以下参数 +> +> adminName: 管理员用户名 +> +> password: 管理员密码 + +```sh +register_new_matrix_user http://localhost:8008 -c /data/homeserver.yaml -u adminName -p password -a +``` + +#### 生成普通用户 + +> 请替换以下参数 +> +> userName: 用户名 +> +> password: 密码 + +```sh +register_new_matrix_user http://localhost:8008 -c /data/homeserver.yaml -u userName -p password +``` + +## 反向代理 + +> Nginx + +```nginx + location ~ ^(/_matrix|/_synapse/client) { + # note: do not add a path (even a single /) after the port in `proxy_pass`, + # otherwise nginx will canonicalise the URI and cause signature verification + # errors. + proxy_pass http://localhost:8008; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Host $host; + + # Nginx by default only allows file uploads up to 1M in size + # Increase client_max_body_size to match max_upload_size defined in homeserver.yaml + client_max_body_size 50M; + + # Synapse responses may be chunked, which is an HTTP/1.1 feature. + proxy_http_version 1.1; + } +``` + +--- + +![Ms Studio](https://file.lifebus.top/imgs/ms_blank_001.png) diff --git a/apps/synapse/data.yml b/apps/synapse/data.yml new file mode 100644 index 000000000..33254f557 --- /dev/null +++ b/apps/synapse/data.yml @@ -0,0 +1,15 @@ +additionalProperties: + key: synapse + name: Synapse + tags: + - WebSite + - Middleware + - Local + shortDescZh: 用于安全、分散通信的开放网络 + shortDescEn: An open network for secure, decentralised communication + type: website + crossVersionUpdate: true + limit: 0 + website: https://matrix.org/ + github: https://github.com/matrix-org/synapse/ + document: https://matrix.org/ diff --git a/apps/synapse/logo.png b/apps/synapse/logo.png new file mode 100644 index 000000000..3cebddfa2 Binary files /dev/null and b/apps/synapse/logo.png differ