throne: 1.0.8-unstable-2025-10-29 -> 1.0.13

This commit is contained in:
PRESFIL
2026-01-25 18:38:58 +01:00
committed by TomaSajt
parent 52ab78dd08
commit d380eba631
4 changed files with 29 additions and 35 deletions
@@ -3,13 +3,13 @@ index e2f2ab3..f81812f 100644
--- a/server.go
+++ b/server.go
@@ -16,6 +16,7 @@ import (
"github.com/sagernet/sing-box/experimental/clashapi"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/metadata"
"github.com/sagernet/sing/service"
+ "golang.org/x/sys/unix"
"log"
"os"
"runtime"
"github.com/sagernet/sing/service"
"github.com/throneproj/clash2singbox/convert"
"github.com/throneproj/clash2singbox/model"
"github.com/throneproj/clash2singbox/model/clash"
@@ -349,12 +350,25 @@ func (s *server) CompileGeoSiteToSrs(in *gen.CompileGeoSiteToSrsRequest, out *ge
}
@@ -1,25 +1,25 @@
diff --git a/src/global/Configs.cpp b/src/global/Configs.cpp
index 7943d7a..5bb20cc 100644
index e7bec9c..f0dfe53 100644
--- a/src/global/Configs.cpp
+++ b/src/global/Configs.cpp
@@ -355,6 +355,12 @@ namespace Configs {
@@ -404,6 +404,12 @@ namespace Configs {
// System Utils
QString FindCoreRealPath() {
+ // find in PATH first
+ QString path = QStandardPaths::findExecutable("throne-core");
+ if (!path.isEmpty()) {
+ return path;
+ QString path_for_nixos = QStandardPaths::findExecutable("throne-core");
+ if (!path_for_nixos.isEmpty()) {
+ return path_for_nixos;
+ }
+
auto fn = QApplication::applicationDirPath() + "/Core";
auto fi = QFileInfo(fn);
if (fi.isSymLink()) return fi.symLinkTarget();
#ifdef Q_OS_WIN
fn += ".exe";
diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
index 9aa46b2..ba7137a 100644
index d31c311..ce4c357 100644
--- a/src/ui/mainwindow.cpp
+++ b/src/ui/mainwindow.cpp
@@ -125,8 +125,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
@@ -151,8 +151,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
Configs::dataStore->core_port = MkPort();
if (Configs::dataStore->core_port <= 0) Configs::dataStore->core_port = 19810;
@@ -29,7 +29,7 @@ index 9aa46b2..ba7137a 100644
QStringList args;
args.push_back("-port");
@@ -844,6 +843,15 @@ bool MainWindow::get_elevated_permissions(int reason) {
@@ -1045,6 +1044,15 @@ bool MainWindow::get_elevated_permissions(int reason) {
return true;
}
if (Configs::IsAdmin()) return true;
+14 -7
View File
@@ -19,20 +19,23 @@
# override if you want to have more up-to-date rulesets
throne-srslist ? fetchurl {
url = "https://raw.githubusercontent.com/throneproj/routeprofiles/60eb41122de3aa53c701ec948cd52d7a26adafea/srslist.h";
hash = "sha256-k9vPtcusML4GR81UVeJ7jhuDHGk5Qh0eKw/cSOxBd5g=";
url = "https://raw.githubusercontent.com/throneproj/routeprofiles/0fca735ff2759422c407ac04fac819aef2fc88f9/srslist.h";
hash = "sha256-G2WUStxFtN0fbZm/KoD9ldUvkMWf9cDA+9fvYt8dcqo=";
},
}:
stdenv.mkDerivation (finalAttrs: {
pname = "throne";
version = "1.0.8-unstable-2025-10-29";
version = "1.0.13";
src = fetchFromGitHub {
owner = "throneproj";
repo = "Throne";
rev = "54af50fc414ffaf98b3ff88e3dd8aa041c65e041";
hash = "sha256-kfvsGw0RUYHkOUSeSA4egLl+gQqN4KkZKXX3CQQzYks=";
# the release CI job was triggered on the xhttp branch (https://github.com/throneproj/Throne/actions/runs/20588046213),
# but the 1.0.13 tag was wrongly created on the dev branch
# we'll use the revision that was used for the job as well
rev = "3b737ec8cf29e03e4b7d5a09b1f502bdb8ef52e2";
hash = "sha256-OVgmhiKL4BaFYBeUqIX3LRNa54zq5oYyNMUYwKNvo1A=";
};
strictDeps = true;
@@ -49,6 +52,8 @@ stdenv.mkDerivation (finalAttrs: {
qt6Packages.qttools
];
env.INPUT_VERSION = finalAttrs.version;
cmakeFlags = [
# makes sure the app uses the user's config directory to store it's non-static content
# it's essentially the same as always setting the -appdata flag when running the program
@@ -103,7 +108,7 @@ stdenv.mkDerivation (finalAttrs: {
];
proxyVendor = true;
vendorHash = "sha256-thMRkbs5fS7KsUSRSeUaB2xkTjs7kJ9AKXW0+OXN3io=";
vendorHash = "sha256-cPo/2bUXEF9jomr0Pnty7ZutAaC0TFG397FSIqefrjw=";
nativeBuildInputs = [
protobuf
@@ -116,13 +121,15 @@ stdenv.mkDerivation (finalAttrs: {
pushd gen
protoc -I . --go_out=. --protorpc_out=. libcore.proto
popd
VERSION_SINGBOX=$(go list -m -f '{{.Version}}' github.com/sagernet/sing-box)
ldflags+=("-X 'github.com/sagernet/sing-box/constant.Version=$VERSION_SINGBOX'")
'';
# ldflags and tags are taken from script/build_go.sh
ldflags = [
"-w"
"-s"
"-X github.com/sagernet/sing-box/constant.Version=${finalAttrs.version}"
];
tags = [
@@ -1,13 +0,0 @@
diff --git a/src/global/Configs.cpp b/src/global/Configs.cpp
index d9be515..15de64b 100644
--- a/src/global/Configs.cpp
+++ b/src/global/Configs.cpp
@@ -426,8 +426,6 @@ namespace Configs {
};
QString GetBasePath() {
- if (dataStore->flag_use_appdata) return QStandardPaths::writableLocation(
- QStandardPaths::AppConfigLocation);
return qApp->applicationDirPath();
}