发布应用 Zerotier 组合套装
Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
parent
cd1c4277bd
commit
45e6c857cb
|
|
@ -0,0 +1,63 @@
|
|||
additionalProperties:
|
||||
formFields:
|
||||
- default: "/home/zerotier-planet"
|
||||
edit: true
|
||||
envKey: ZEROTIER_PLANET_ROOT_PATH
|
||||
labelZh: 数据持久化路径
|
||||
labelEn: Data persistence path
|
||||
required: true
|
||||
type: text
|
||||
- default: "host"
|
||||
edit: true
|
||||
envKey: NETWORK_MODE
|
||||
labelEn: Drive path
|
||||
labelZh: 网络模式
|
||||
required: true
|
||||
type: select
|
||||
values:
|
||||
- label: 主机网络模式
|
||||
value: "host"
|
||||
- label: 桥接网络模式
|
||||
value: "bridge"
|
||||
- label: 无网络模式
|
||||
value: "none"
|
||||
- label: 1panel-network
|
||||
value: "1panel-network"
|
||||
- default: 3443
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelZh: WebUI 端口
|
||||
labelEn: WebUI port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 9994
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_API
|
||||
labelZh: API 端口
|
||||
labelEn: API Port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 3000
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_FILE
|
||||
labelZh: 文件传输端口
|
||||
labelEn: File transfer port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: IP_ADDR4
|
||||
labelZh: 公网 IPV4/IPV6
|
||||
labelEn: Public IPV4/IPV6
|
||||
required: false
|
||||
type: text
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: IP_ADDR6
|
||||
labelZh: 公网 IPV4/IPV6
|
||||
labelEn: Public IPV6/IPV6
|
||||
required: false
|
||||
type: text
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
|
||||
services:
|
||||
zerotier-planet:
|
||||
image: xubiaolin/zerotier-planet:1.14.1
|
||||
container_name: ${CONTAINER_NAME}
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
restart: always
|
||||
network_mode: ${NETWORK_MODE}
|
||||
ports:
|
||||
- ${PANEL_APP_PORT_ZT}:${PANEL_APP_PORT_ZT}/tcp
|
||||
- ${PANEL_APP_PORT_ZT}:${PANEL_APP_PORT_ZT}/udp
|
||||
- ${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}
|
||||
- ${PANEL_APP_PORT_FILE}:${PANEL_APP_PORT_FILE}
|
||||
env_file:
|
||||
- /etc/1panel/envs/global.env
|
||||
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||
volumes:
|
||||
- ${ZEROTIER_PLANET_ROOT_PATH}/file:/app/dist
|
||||
- ${ZEROTIER_PLANET_ROOT_PATH}/ztncui:/app/ztncui
|
||||
- ${ZEROTIER_PLANET_ROOT_PATH}/zerotier-one:/var/lib/zerotier-one
|
||||
- ${ZEROTIER_PLANET_ROOT_PATH}/config:/app/config
|
||||
environment:
|
||||
- ZT_PORT=${PANEL_APP_PORT_ZT}
|
||||
- API_PORT=${PANEL_APP_PORT_HTTP}
|
||||
- FILE_SERVER_PORT=${PANEL_APP_PORT_FILE}
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
# Zerotier Planet 服务端
|
||||
|
||||
包含 ZeroTier One 和 ztncui 的 Docker 映像,用于在容器中设置具有 Web 用户界面的独立 ZeroTier 网络控制器。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 简介
|
||||
|
||||
ZeroTier 这一类 P2P VPN 是在互联网的基础上将自己的所有设备组成一个私有的网络,可以理解为互联网连接的局域网。最常见的场景就是在公司可以用手机直接访问家里的
|
||||
NAS,而且是点对点直连,数据传输并不经由第三方服务器中转。
|
||||
|
||||
ZeroTier 在多设备之间建立了一个 Peer to Peer VPN(P2PVPN) 连接,如:在笔记本电脑、台式机、嵌入式设备、云资源和应用。这些设备只需要通过
|
||||
ZeroTier One ( ZeroTier 的客户端) 在不同设备之间建立直接连接,即使它们位于 NAT 之后。连接到虚拟 LAN 的任何计算机和设备通常通过
|
||||
NAT 或路由器设备与 Internet 连接,ZeroTier One 使用 STUN 和隧道来建立 NAT 后设备之间的 VPN 直连。
|
||||
|
||||
简单一点说,ZeroTier 就是通过 P2P 等方式实现形如交换机或路由器上 LAN 设备的内网互联。
|
||||
|
||||
### 专有名词
|
||||
|
||||
PLANET :行星服务器,Zerotier 根服务器
|
||||
|
||||
MOON :卫星服务器,用户自建的私有根服务器,起到代理加速的作用
|
||||
|
||||
LEAF :网络客户端,就是每台连接到网络节点。
|
||||
|
||||
## 安装说明
|
||||
|
||||
> 默认用户名:`admin`
|
||||
>
|
||||
> 默认密码:`password`
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
|
@ -0,0 +1,15 @@
|
|||
additionalProperties:
|
||||
key: zerotier-planet
|
||||
name: Zerotier Planet
|
||||
tags:
|
||||
- WebSite
|
||||
- Tool
|
||||
- Local
|
||||
shortDescZh: 创建和管理虚拟软件定义网络
|
||||
shortDescEn: Create and manage virtual software-defined networks
|
||||
type: website
|
||||
crossVersionUpdate: true
|
||||
limit: 0
|
||||
website: https://www.zerotier.com/
|
||||
github: https://github.com/zerotier/ZeroTierOne/
|
||||
document: https://docs.zerotier.com/
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.7 KiB |
|
|
@ -7,6 +7,22 @@ additionalProperties:
|
|||
labelEn: Data persistence path
|
||||
required: true
|
||||
type: text
|
||||
- default: "host"
|
||||
edit: true
|
||||
envKey: NETWORK_MODE
|
||||
labelEn: Drive path
|
||||
labelZh: 网络模式
|
||||
required: true
|
||||
type: select
|
||||
values:
|
||||
- label: 主机网络模式
|
||||
value: "host"
|
||||
- label: 桥接网络模式
|
||||
value: "bridge"
|
||||
- label: 无网络模式
|
||||
value: "none"
|
||||
- label: 1panel-network
|
||||
value: "1panel-network"
|
||||
- default: 3000
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
|
|
@ -15,14 +31,6 @@ additionalProperties:
|
|||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 3443
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTPS
|
||||
labelZh: HTTPS 端口
|
||||
labelEn: HTTPS Port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 9993
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_API
|
||||
|
|
@ -31,17 +39,25 @@ additionalProperties:
|
|||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 3180
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_FILE
|
||||
labelZh: 文件传输端口
|
||||
labelEn: File transfer port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: ZTNCUI_PASSWD
|
||||
labelZh: 管理员 密码
|
||||
labelZh: 面板管理员 密码
|
||||
labelEn: Admin Password
|
||||
required: true
|
||||
type: password
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: MYADDR
|
||||
labelZh: 服务器IP
|
||||
labelEn: Server IP
|
||||
labelZh: 服务器域名(IP)
|
||||
labelEn: Server Domain(IP)
|
||||
required: true
|
||||
type: text
|
||||
|
|
|
|||
|
|
@ -11,17 +11,18 @@ services:
|
|||
restart: always
|
||||
network_mode: ${NETWORK_MODE}
|
||||
ports:
|
||||
- ${PANEL_APP_PORT_HTTP}:3000
|
||||
- ${PANEL_APP_PORT_HTTPS}:3443
|
||||
- ${PANEL_APP_PORT_API}:9993/udp
|
||||
- ${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}
|
||||
- ${PANEL_APP_PORT_API}:${PANEL_APP_PORT_API}/tcp
|
||||
- ${PANEL_APP_PORT_API}:${PANEL_APP_PORT_API}/udp
|
||||
- ${PANEL_APP_PORT_FILE}:3180
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- HTTP_PORT=3000
|
||||
- HTTPS_PORT=3443
|
||||
- ZT_ADDR=localhost:9993
|
||||
- HTTP_ALL_INTERFACES=yes
|
||||
- /etc/1panel/envs/global.env
|
||||
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||
volumes:
|
||||
- ${ZTNCUI_ROOT_PATH}/ztncui:/opt/key-networks/ztncui/etc
|
||||
- ${ZTNCUI_ROOT_PATH}/zerotier-one:/var/lib/zerotier-one
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- HTTP_PORT=${PANEL_APP_PORT_HTTP}
|
||||
- ZT_ADDR=localhost:${PANEL_APP_PORT_API}
|
||||
- HTTP_ALL_INTERFACES=yes
|
||||
|
|
|
|||
|
|
@ -3,6 +3,11 @@
|
|||
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
|
||||
|
|
|
|||
|
|
@ -3,6 +3,11 @@
|
|||
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
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# ztncui
|
||||
# ztncui 服务端
|
||||
|
||||
包含 ZeroTier One 和 ztncui 的 Docker 映像,用于在容器中设置具有 Web 用户界面的独立 ZeroTier 网络控制器。
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
|
|
@ -28,6 +28,8 @@ LEAF :网络客户端,就是每台连接到网络节点。
|
|||
## 安装说明
|
||||
|
||||
> 默认用户名:`admin`
|
||||
>
|
||||
> 默认密码:`password`
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue