PasarGuard-Node README

The project's README from github.com/x4gpanell/PasarGuard-Node. As one markdown file: README.md.

PasarGuard Node – Railway Deploy (No VPS needed)

Deploys PasarGuard Node (https://github.com/PasarGuard/node) as a second Railway service, with a self-signed certificate baked into the image at build time so no external server is required to obtain the "Server CA" for the panel.

Setup

  1. Push this folder to its own GitHub repo.
  2. In your Railway project, click + New → GitHub Repo → select this repo. (Use the same Railway project as your PasarGuard panel, as a second service.)
  3. In this new service's Variables tab, add:
    • API_KEY = a UUID you generate yourself (e.g. uuidgen or any UUID generator). Example: 6d183b56-361e-4f9b-be2d-c571cdebae23
  4. In this service's Settings → Networking, enable TCP Proxy and set the target port to 62050. Railway will give you a public host:port pair.
  5. Deploy. Once it's running, open this service's Console/Shell and run:
    cat /app/certs/ssl_cert.pem
    
    Copy the whole output (including the BEGIN/END lines).
  6. Go to your PasarGuard panel dashboard → Nodes → Add Node:
    • Address: the TCP proxy host (without the port)
    • Port: the TCP proxy port
    • API Key: the same UUID you set in step 3
    • Server CA: paste the certificate from step 5

PasarGuard-Node (x4gpanell/PasarGuard-Node)

Searching Database…

这是什么?这个仓库把 “PasarGuard Node”(PasarGuard 代理面板的节点)部署为 Railway 上的第二个服务,并在构建时把自签名 TLS 证书直接打进 Docker 镜像,这样你不必为了给面板拿一个 Server CA 而专门租一台 VPS。
这是一个库,还是只是部署模板?它是一套部署模板:一个 Docker 镜像加若干 Shell 脚本,你把它推送到自己的 GitHub 仓库并作为 Railway 服务部署,而不是安装进代码里的软件包。
怎么让这个节点跑起来?把这个文件夹推送到独立的 GitHub 仓库,在 PasarGuard 面板所在的同一个 Railway 项目里从该仓库新建一个服务,把 APIKEY 变量设为你生成的 UUID,在该服务的 Networking 设置中开启针对 62050 端口的 TCP Proxy,然后部署。
我需要 VPS 还是只要 Railway 就够?你需要一个 Railway 账户和一个已在运行的 PasarGuard 面板(作为同一 Railway 项目中的第一个服务部署);TLS 方面不需要外部 VPS。
哪些步骤不能省略?你必须在 Railway 的 Networking 设置中手动启用 TCP Proxy 并把目标端口指向 62050,然后把生成的证书从服务控制台复制到面板的 “Server CA” 字段——漏掉任何一步,节点都无法连接。
这个节点连接的 PasarGuard 面板是什么?它是另一个代理面板服务(部署为第一个 Railway 服务),本节点使用它提供的 Address、Port、API Key 和 Server CA 向它注册。
为什么把自签名证书打进镜像,而不用真正的证书?这样节点无需租用或配置一台带公网域名和 TLS 设置的外部服务器,就能为面板取得可用的 Server CA。
APIKEY 变量是干什么用的?它是你自己生成的 UUID,充当面板与这个节点之间的共享密钥,既要填作 Railway 变量,也要在面板中添加节点时作为 API Key 填入。
Creator
x4gpanell
Size
<0.1 MB
Stars
407
Updated
CommitSep 19
Age
2mo
Commits · 90 Days