Apply inbounds on nodes via Xray with Reality settings and client sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
orohi
2026-07-29 05:11:45 +03:00
co-authored by Cursor
parent c41bae9852
commit 20a20168b6
15 changed files with 1081 additions and 63 deletions
+5 -2
View File
@@ -7,7 +7,7 @@ import (
"github.com/orohi/vpn-panel/internal/models"
)
const AgentVersion = "0.1.0"
const AgentVersion = "0.2.0"
func ComposeYAML(n *models.Node) string {
return fmt.Sprintf(`services:
@@ -21,10 +21,13 @@ func ComposeYAML(n *models.Node) string {
NODE_PORT: %q
SECRET_KEY: %q
AGENT_VERSION: %q
DATA_DIR: /var/lib/vpn-node
HOST_DATA_DIR: /opt/vpn-panel-node/data
volumes:
- ./vpn-node:/usr/local/bin/vpn-node:ro
- ./data:/var/lib/vpn-node
command: ["/usr/local/bin/vpn-node"]
- /var/run/docker.sock:/var/run/docker.sock
command: ["sh", "-c", "apk add --no-cache docker-cli >/dev/null && exec /usr/local/bin/vpn-node"]
`, n.Name, fmt.Sprintf("%d", n.NodePort), n.SecretKey, AgentVersion)
}