-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (43 loc) · 2.03 KB
/
Makefile
File metadata and controls
56 lines (43 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Makefile for Proxy Builder (Sing-box)
# Sing-box 原生模式代理服务管理
.PHONY: all uuid short-id password reality-key setup-wif setup-firewall check-scripts upload-env help
help:
@echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
@echo "Proxy Builder (Sing-box Native) - Available Commands"
@echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
@echo ""
@echo "🔐 Credential Generation:"
@echo " make uuid - Generate a random UUID"
@echo " make short-id - Generate a random 8-character hex ID"
@echo " make password - Generate a random secure password"
@echo " make reality-key - Generate REALITY key pair (uses Docker)"
@echo ""
@echo "🚀 Deployment Setup:"
@echo " make setup-wif - Setup WIF for an environment (interactive)"
@echo " make upload-env - Upload .env to GitHub Environment Secrets"
@echo " make setup-firewall - Configure firewall rules for service ports"
@echo " make check-scripts - Check all shell scripts syntax"
# ============================================================
# Credential Generation
# ============================================================
uuid:
@uuidgen | tr '[:upper:]' '[:lower:]'
short-id:
@openssl rand -hex 4
password:
@openssl rand -base64 32
reality-key:
@echo "Generating REALITY key pair using sing-box docker image..."
@docker run --rm ghcr.io/sagernet/sing-box generate reality-keypair
# ============================================================
# Deployment Setup
# ============================================================
setup-wif:
@chmod +x scripts/setup-wif.sh
@./scripts/setup-wif.sh
upload-env:
@chmod +x scripts/upload-env.sh
@./scripts/upload-env.sh
setup-firewall:
@chmod +x scripts/setup-firewall.sh
@./scripts/setup-firewall.sh