1
0

feat:添加wireguard到列表

This commit is contained in:
okxlin
2024-11-20 00:34:12 +08:00
parent 8181135794
commit c235aaeb4f
9 changed files with 306 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
ALLOWEDIPS="10.0.8.0/24"
CONFIG_PATH="./config"
CONTAINER_NAME="wireguard"
INTERNAL_SUBNET="10.0.8.0"
LOG_CONFS="true"
PEERDNS="119.29.29.29,1.1.1.1"
PEERS=1
PERSISTENTKEEPALIVE_PEERS=25
PGID=1000
PUID=1000
SERVERPORT=51820
SERVERURL="172.17.0.1"
TIME_ZONE="Asia/Shanghai"

View File

@@ -0,0 +1,92 @@
additionalProperties:
formFields:
- default: "1000"
edit: true
envKey: PUID
labelEn: User ID
labelZh: 用户 ID
required: true
type: number
- default: "1000"
edit: true
envKey: PGID
labelEn: Group ID
labelZh: 组 ID
required: true
type: number
- default: "Asia/Shanghai"
edit: true
envKey: TIME_ZONE
labelEn: Time Zone
labelZh: 时区
required: true
type: text
- default: "51820"
edit: true
envKey: SERVERPORT
labelEn: Wireguard port
labelZh: Wireguard 端口
required: true
rule: paramPort
type: number
- default: "172.17.0.1"
edit: true
envKey: SERVERURL
labelEn: Host address (must change item)
labelZh: 本机地址 (必改项)
required: true
type: text
- default: "1"
edit: true
envKey: PEERS
labelEn: Number of Peers
labelZh: 客户端数量
required: true
type: number
- default: "119.29.29.29,1.1.1.1"
edit: true
envKey: PEERDNS
labelEn: Peer DNS
labelZh: 客户端 DNS
required: true
type: text
- default: "10.0.8.0"
edit: true
envKey: INTERNAL_SUBNET
labelEn: Default Wireguard Segment Subnet
labelZh: 默认 Wireguard 网段子网
required: true
type: text
- default: "10.0.8.0/24"
edit: true
envKey: ALLOWEDIPS
labelEn: Wireguard Allowed IPs
labelZh: Wireguard 允许的 IP 段
required: true
type: text
- default: "25"
edit: true
envKey: PERSISTENTKEEPALIVE_PEERS
labelEn: Wireguard Persistent Keepalive
labelZh: Wireguard 保活间隔
required: true
type: number
- default: "true"
edit: true
envKey: LOG_CONFS
labelEn: Log Configurations
labelZh: 日志配置
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "./config"
disabled: true
envKey: CONFIG_PATH
labelEn: Config Path
labelZh: 配置路径
required: true
type: text

View File

@@ -0,0 +1,35 @@
services:
wireguard:
image: "linuxserver/wireguard:latest"
container_name: ${CONTAINER_NAME}
restart: always
networks:
- 1panel-network
ports:
- "${SERVERPORT}:${SERVERPORT}/udp"
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TIME_ZONE}
- SERVERURL=${SERVERURL}
- SERVERPORT=${SERVERPORT}
- PEERS=${PEERS}
- PEERDNS=${PEERDNS}
- INTERNAL_SUBNET=${INTERNAL_SUBNET}
- ALLOWEDIPS=${ALLOWEDIPS}
- PERSISTENTKEEPALIVE_PEERS=${PERSISTENTKEEPALIVE_PEERS}
- LOG_CONFS=${LOG_CONFS}
volumes:
- ${CONFIG_PATH}:/config
- /lib/modules:/lib/modules
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
net.ipv4.conf.all.src_valid_mark: "1"
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true