mirror of
https://github.com/azukaar/Cosmos-Server.git
synced 2026-01-07 20:59:32 -06:00
[release] v0.17.3
This commit is contained in:
38
build-dev.sh
Normal file
38
build-dev.sh
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo " ---- Build Cosmos ----"
|
||||
|
||||
rm -rf build
|
||||
|
||||
cp src/update.go src/launcher/update.go
|
||||
|
||||
go build -o build/cosmos src/*.go
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
go build -o build/cosmos-launcher ./src/launcher/launcher.go ./src/launcher/update.go
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo " ---- Build complete, copy assets ----"
|
||||
|
||||
cp start.sh build/start.sh
|
||||
chmod +x build/start.sh
|
||||
chmod +x build/cosmos
|
||||
chmod +x build/cosmos-launcher
|
||||
|
||||
cp -r static build/
|
||||
cp -r GeoLite2-Country.mmdb build/
|
||||
cp nebula-arm-cert nebula-cert nebula-arm nebula build/
|
||||
cp -r Logo.png build/
|
||||
mkdir build/images
|
||||
cp client/src/assets/images/icons/cosmos_gray.png build/cosmos_gray.png
|
||||
cp client/src/assets/images/icons/cosmos_gray.png cosmos_gray.png
|
||||
echo '{' > build/meta.json
|
||||
cat package.json | grep -E '"version"' >> build/meta.json
|
||||
echo ' "buildDate": "'`date`'",' >> build/meta.json
|
||||
echo ' "built from": "'`hostname`'"' >> build/meta.json
|
||||
echo '}' >> build/meta.json
|
||||
|
||||
echo " ---- copy complete ----"
|
||||
@@ -1,3 +1,6 @@
|
||||
## Version 0.17.3
|
||||
- fix race condition with the monitoring
|
||||
|
||||
## Version 0.17.2
|
||||
- Fix RClone false error
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cosmos-server",
|
||||
"version": "0.17.2",
|
||||
"version": "0.17.3",
|
||||
"description": "",
|
||||
"main": "test-server.js",
|
||||
"bugs": {
|
||||
@@ -90,7 +90,7 @@
|
||||
"client": "vite",
|
||||
"client-build": "vite build --base=/cosmos-ui/",
|
||||
"start": "build/cosmos-launcher && env COSMOS_CONFIG_FOLDER=./zz_test_config/ CONFIG_FILE=./config_dev.json EZ=UTC ACME_STAGING=true build/cosmos",
|
||||
"build": "sh build.sh",
|
||||
"build": "sh build-dev.sh",
|
||||
"dev": "npm run build && npm run start",
|
||||
"dockerdevbuild": "docker build -f dockerfile.local --tag cosmos-dev .",
|
||||
"dockerdevrun": "docker stop cosmos-dev; docker rm cosmos-dev; docker run --cap-add NET_ADMIN -d -p 7200:443 -p 80:80 -p 53:53 -p 443:443 -p 4242:4242/udp -e DOCKER_HOST=tcp://host.docker.internal:2375 -e COSMOS_MONGODB=$MONGODB -e COSMOS_LOG_LEVEL=DEBUG -v /:/mnt/host --restart=unless-stopped -h cosmos-dev --name cosmos-dev cosmos-dev",
|
||||
|
||||
@@ -134,6 +134,7 @@ func startProxy(listenAddr string, target string, proxyInfo *ProxyInfo, isHTTPPr
|
||||
utils.Log("[SocketProxy] Proxy listening on "+listenAddr+", forwarding to "+listenProtocol+"://"+target)
|
||||
|
||||
if listenProtocol == "tcp" {
|
||||
utils.Debug("[SocketProxy] Starting TCP proxy on " + listenAddr + " -> " + target)
|
||||
handleTCPProxy(listener, target, proxyInfo, isHTTPProxy, route, listenAddr)
|
||||
} else {
|
||||
handleUDPProxy(packetConn, target, proxyInfo, route, listenAddr)
|
||||
|
||||
@@ -740,7 +740,7 @@ type RcloneStatsObj struct {
|
||||
func RCloneStats() (RcloneStatsObj, error) {
|
||||
utils.Debug("[RemoteStorage] Getting rclone stats")
|
||||
|
||||
if !utils.FBL.LValid {
|
||||
if utils.FBL == nil || !utils.FBL.LValid {
|
||||
return RcloneStatsObj{0, 0}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user