new package

This commit is contained in:
paltovkone
2026-03-15 12:51:46 +04:00
parent ac213d9843
commit 2bde911af2
4 changed files with 75 additions and 0 deletions

3
vpn_node/Makefile Normal file
View File

@ -0,0 +1,3 @@
VERSION = 0.2.0
IMAGE = debian:bookworm-slim
STEPS = env download

47
vpn_node/nfpm.yaml Normal file
View File

@ -0,0 +1,47 @@
name: "vpn-node"
arch: "amd64"
platform: "linux"
version: "${VERSION}"
section: "net"
priority: "optional"
maintainer: "Your Name <your.email@example.com>"
description: |
VPN Daemon for managing VPN connections on FreeBSD nodes.
Supports L2TP/IPSec, IKEv2, WireGuard, and Amnezia VPN types.
vendor: "Your Organization"
homepage: "https://github.com/yourusername/vpn-node"
license: "MIT"
contents:
- src: ./vpn-node-src/
dst: /opt/vpn-node
type: dir
- src: ./systemd/vpn-node.service
dst: /etc/systemd/system/vpn-node.service
- src: ./debian/postinst
dst: /var/lib/dpkg/info/vpn-node.postinst
file_info:
mode: 0755
scripts:
postinstall: /var/lib/dpkg/info/vpn-node.postinst
overrides:
deb:
depends:
- python3
- python3-fastapi
- python3-uvicorn
- python3-websockets
- python3-httptools
- python3-uvloop
- python3-h11
- python3-h2
- python3-python-dotenv
- python3-pydantic
- python3-sqlalchemy
- python3-aiosqlite
- python3-greenlet
- systemd

12
vpn_node/scripts/download.sh Executable file
View File

@ -0,0 +1,12 @@
# #!/bin/bash
# VERSION=$1
set -euo pipefail
echo "download: $PACKAGE v$VERSION"
wget -q "https://github.com/karamelichkin/nakolenke_vpn_node/archive/refs/tags/v${VERSION}.zip" -O dist.zip
mkdir -p dist
unzip -q dist.zip -d dist/
echo "✓ downloaded v2ray v${VERSION}"
ls -lh dist/

13
vpn_node/scripts/env.sh Normal file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
apt-get update -qq
apt-get install -y --no-install-recommends curl ca-certificates gnupg unzip wget
# Получаем последнюю версию автоматически
NFPM_VERSION=$(curl -fsSL https://api.github.com/repos/goreleaser/nfpm/releases/latest \
| grep '"tag_name"' | sed 's/.*"v\([^"]*\)".*/\1/')
curl -fsSL "https://github.com/goreleaser/nfpm/releases/download/v${NFPM_VERSION}/nfpm_${NFPM_VERSION}_Linux_x86_64.tar.gz" \
| tar -xz -C /usr/local/bin nfpm
echo "✓ nfpm $(nfpm --version)"