├── Dockerfile
├── README.md
├── install.sh
└── sign.sh
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM alpine:latest
2 |
3 | WORKDIR /aurora
4 | RUN cd /aurora \
5 | && wget https://github.com/tokumeikoi/aurora/releases/latest/download/aurora \
6 | && wget https://github.com/v2fly/v2ray-core/releases/latest/download/v2ray-linux-64.zip \
7 | && unzip v2ray-linux-64.zip \
8 | && rm -rf v2ray-linux-64.zip \
9 | && chmod +x /aurora/*
10 |
11 | ENTRYPOINT /aurora/aurora -api="$API" -token="$TOKEN" -node="$NODE" -license="$LICENSE" -syncInterval="$SYNCINTERVAL"
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## 快速使用
4 |
5 | 1.在系统中运行
6 | ```bash
7 | # 使用必读
8 | # 使用前请在V2Board添加好节点
9 | # 请将命令中的API替换成V2board面板地址如:https://v2board.com
10 | # 请将命令中的TOKEN替换成V2Board后台系统配置->服务端->通讯密钥
11 | # 请将命令中的NODEID替换成V2Board后台V2ray中添加的节点ID
12 | # 请将命令中的LICENSE替换成授权字符
13 |
14 | curl -fsSL https://github.com/tokumeikoi/aurora/raw/master/install.sh | bash -s API TOKEN NODEID LICENSE 60
15 | ```
16 |
17 | 2.在Docker运行
18 | ```bash
19 | # 使用必读
20 | # 使用前请在V2Board添加好节点
21 | # 请将命令中的API替换成V2board面板地址如:https://v2board.com
22 | # 请将命令中的TOKEN替换成V2Board后台系统配置->服务端->通讯密钥
23 | # 请将命令中的NODEID替换成V2Board后台V2ray中添加的节点ID
24 | # 请将命令中的LICENSE替换成授权字符
25 |
26 | docker run -d --name=aurora \
27 | -v /root/.cert:/root/.cert \
28 | -e API=API \
29 | -e TOKEN=TOKEN \
30 | -e NODE=NODEID \
31 | -e LICENSE=LICENSE \
32 | -e SYNCINTERVAL=60 \
33 | --restart=always \
34 | --network=host \
35 | tokumeikoi/aurora
36 | ```
37 |
38 | ## 申请TLS证书
39 |
40 | 1.首先将节点域名解析到节点服务器,并且可以ping通
41 |
42 | ```bash
43 | # 使用必读
44 | # 使用前请将节点域名解析到节点,并且可以ping通
45 | # 请将命令中的domain.com替换成节点域名
46 | curl -fsSL https://github.com/tokumeikoi/aurora/raw/master/sign.sh | bash -s domain.com
47 | ```
48 |
49 | 2.申请完成后证书将会保存至/root/.cert/server.crt /root/.cert/server.key
--------------------------------------------------------------------------------
/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | echo '正在安装依赖'
3 | if cat /etc/os-release | grep "centos" > /dev/null
4 | then
5 | yum install unzip wget -y > /dev/null
6 | yum update curl -y
7 | else
8 | apt-get install unzip wget -y > /dev/null
9 | apt-get update curl -y
10 | echo '环境优化'
11 | ulimit -n 51200
12 | echo "soft nofile 51200" >> /etc/security/limits.conf
13 | echo "hard nofile 51200" >> /etc/security/limits.conf
14 | (cat < /etc/sysctl.conf
32 | fi
33 |
34 | api=$1
35 | key=$2
36 | nodeId=$3
37 | license=$4
38 | folder=$key-v2ray
39 | if [[ "$6" -ne "" ]]
40 | then
41 | syncInterval=$6
42 | else
43 | syncInterval=60
44 | fi
45 |
46 | kill -9 $(ps -ef | grep ${folder} | grep -v grep | grep -v bash | awk '{print $2}') 1 > /dev/null
47 | kill -9 $(ps -ef | grep defunct | grep -v grep | awk '{print $2}') 1 > /dev/null
48 | echo '结束进程'
49 | rm -rf $folder
50 | mkdir $folder
51 | cd $folder
52 | wget https://github.com/tokumeikoi/aurora/releases/latest/download/aurora
53 | wget https://github.com/v2fly/v2ray-core/releases/latest/download/v2ray-linux-64.zip
54 |
55 | unzip v2ray-linux-64.zip
56 | chmod 755 *
57 | nohup `pwd`/aurora -api=$api -token=$key -node=$nodeId -license=$license -syncInterval=$syncInterval > aurora.log 2>&1 &
58 | echo '部署完成'
59 | sleep 3
60 | cat aurora.log
61 | if ls | grep "service.log"
62 | then
63 | cat service.log
64 | else
65 | echo '启动失败'
66 | fi
67 |
--------------------------------------------------------------------------------
/sign.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo '正在安装依赖'
4 |
5 | if cat /etc/os-release | grep "centos" > /dev/null
6 | then
7 | yum install tar wget -y > /dev/null
8 | else
9 | apt update > /dev/null
10 | apt-get install tar wget -y > /dev/null
11 | fi
12 |
13 | domain=$1
14 |
15 | cd /tmp
16 | wget https://github.com/go-acme/lego/releases/download/v3.7.0/lego_v3.7.0_linux_amd64.tar.gz
17 |
18 | tar zxvf lego_v3.7.0_linux_amd64.tar.gz
19 | chmod 755 *
20 | ./lego --email="admin@$domain" --domains="$domain" --http -a run
21 |
22 | if ls ./.lego/certificates | grep "$domain"
23 | then
24 | echo '证书签发成功'
25 | mkdir /root/.cert
26 | cp ./.lego/certificates/$domain.crt /root/.cert/server.crt
27 | cp ./.lego/certificates/$domain.key /root/.cert/server.key
28 | else
29 | echo '证书签发失败'
30 | fi
--------------------------------------------------------------------------------