This commit is contained in:
parent
9a9a797986
commit
34253a4bf6
@ -10,7 +10,7 @@ jobs:
|
||||
Build:
|
||||
runs-on: [ubuntu-latest, ubuntu-24.04]
|
||||
container:
|
||||
image: registry.cn-shenzhen.aliyuncs.com/amass_toolset/ubuntu_dev:22.04
|
||||
image: registry.cn-shenzhen.aliyuncs.com/amass_toolset/ubuntu_dev:24.04
|
||||
credentials:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
@ -89,8 +89,7 @@ int main(int argc, char const *argv[]) {
|
||||
signals.add(SIGUSR1);
|
||||
signals.async_wait([&application](boost::system::error_code const &, int signal) {
|
||||
// Stop the io_context. This will cause run()
|
||||
// to return immediately, eventually destroying the
|
||||
// io_context and any remaining handlers in it.
|
||||
// to return immediately, eventually destroying the io_context and any remaining handlers in it.
|
||||
LOG(info) << "capture " << (signal == SIGINT ? "SIGINT" : "SIGTERM") << ",stop!";
|
||||
application->ioContext().stop();
|
||||
});
|
||||
|
@ -20,10 +20,12 @@ EOF
|
||||
function init() {
|
||||
echo "start deploy server"
|
||||
|
||||
scp -P $SERVER_PORT resources/openresty.service $USER@$SERVER_ADDRESS:/lib/systemd/system/openresty.service
|
||||
scp -P $SERVER_PORT resources/frps.service $USER@$SERVER_ADDRESS:/etc/systemd/system/frps.service
|
||||
scp -P $SERVER_PORT resources/openresty.service $USER@$SERVER_ADDRESS:/lib/systemd/system/
|
||||
scp -P $SERVER_PORT resources/frps.service $USER@$SERVER_ADDRESS:/etc/systemd/system/
|
||||
scp -P $SERVER_PORT resources/freedom.service $USER@$SERVER_ADDRESS:/etc/systemd/system/
|
||||
|
||||
ssh $USER@$SERVER_ADDRESS -p $SERVER_PORT <<EOF
|
||||
apt install unzip
|
||||
if [ ! -d /root/Server ]; then
|
||||
mkdir -p /root/Server /root/Server/logs
|
||||
fi
|
||||
@ -39,13 +41,24 @@ function init() {
|
||||
opm get bungle/lua-resty-session
|
||||
fi
|
||||
|
||||
if [ -f /root/Server/frp_0.60.0_linux_amd64/frps ]; then
|
||||
if [ -f /root/Server/frp_0.61.0_linux_amd64/frps ]; then
|
||||
echo "frps has installed."
|
||||
else
|
||||
pushd /root/Server
|
||||
# wget https://github.com/fatedier/frp/releases/download/v0.60.0/frp_0.60.0_linux_amd64.tar.gz
|
||||
wget https://frp-by1.wwvvww.cn:44048/s/frps/download -O frp_0.60.0_linux_amd64.tar.gz
|
||||
tar xvf ./frp_0.60.0_linux_amd64.tar.gz
|
||||
wget https://github.com/fatedier/frp/releases/download/v0.61.0/frp_0.61.0_linux_amd64.tar.gz
|
||||
tar xvf ./frp_0.61.0_linux_amd64.tar.gz
|
||||
rm frp_0.61.0_linux_amd64.tar.gz
|
||||
popd
|
||||
fi
|
||||
|
||||
if [ -f freedom_5.22.0_linux_amd64/freedom ]; then
|
||||
echo "v2ray has installed."
|
||||
else
|
||||
pushd /root/Server
|
||||
wget https://github.com/v2fly/v2ray-core/releases/download/v5.22.0/v2ray-linux-64.zip -O freedom_v5.22.0_linux_amd64.zip
|
||||
unzip freedom_v5.22.0_linux_amd64.zip -d freedom_v5.22.0_linux_amd64
|
||||
mv freedom_v5.22.0_linux_amd64/v2ray freedom_v5.22.0_linux_amd64/freedom
|
||||
rm freedom_v5.22.0_linux_amd64.zip
|
||||
popd
|
||||
fi
|
||||
|
||||
@ -58,16 +71,24 @@ function init() {
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
||||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||
tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
apt-get update
|
||||
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
apt update
|
||||
apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
fi
|
||||
|
||||
if [ "$(docker ps -q -f name=twikoo)" ]; then
|
||||
echo "twikoo has running."
|
||||
else
|
||||
pushd /root/Server
|
||||
docker run --name twikoo --restart=always -e TWIKOO_THROTTLE=1000 -p 8083:8080 -v /root/Server/twikoo:/app/data -d imaegoo/twikoo
|
||||
popd
|
||||
fi
|
||||
|
||||
if [ "$(docker ps -q -f name=librespeed)" ]; then
|
||||
echo "librespeed has running."
|
||||
else
|
||||
pushd /root/Server
|
||||
docker run -d --name=librespeed -e PASSWORD=88888888 -p 8087:80 \
|
||||
-v ${PWD}/librespeed:/config --restart unless-stopped lscr.io/linuxserver/librespeed:latest
|
||||
docker run -d --restart=unless-stopped --name=librespeed -e PASSWORD=88888888 -p 8087:80 \
|
||||
-v /root/Server/librespeed:/config --restart unless-stopped lscr.io/linuxserver/librespeed:latest
|
||||
popd
|
||||
fi
|
||||
EOF
|
||||
|
15
resources/freedom.service
Normal file
15
resources/freedom.service
Normal file
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Freedom Service
|
||||
Documentation=https://amass.fun/我的笔记/工作笔记/内网穿透
|
||||
After = network.target syslog.target
|
||||
Wants = network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/root/Server/freedom_v5.22.0_linux_amd64/freedom run -config /root/Server/freedom_v5.22.0_linux_amd64/config.json
|
||||
Restart=always
|
||||
RestartSec=2s
|
||||
LimitNOFILE=infinity
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -5,7 +5,7 @@ Wants = network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/root/Server/frp_0.60.0_linux_amd64/frps -c /root/Server/frp_0.60.0_linux_amd64/frps.toml
|
||||
ExecStart=/root/Server/frp_0.61.0_linux_amd64/frps -c /root/Server/frp_0.61.0_linux_amd64/frps.toml
|
||||
Restart=always
|
||||
RestartSec=2s
|
||||
LimitNOFILE=infinity
|
||||
|
Loading…
Reference in New Issue
Block a user