Update On Fri Oct 3 20:39:16 CEST 2025

This commit is contained in:
github-action[bot]
2025-10-03 20:39:17 +02:00
parent c14ab7cdfe
commit 460440c6d3
15 changed files with 57 additions and 36 deletions

1
.github/update.log vendored
View File

@@ -1139,3 +1139,4 @@ Update On Mon Sep 29 20:38:41 CEST 2025
Update On Tue Sep 30 20:35:53 CEST 2025
Update On Wed Oct 1 20:41:09 CEST 2025
Update On Thu Oct 2 20:40:58 CEST 2025
Update On Fri Oct 3 20:39:08 CEST 2025

View File

@@ -65,7 +65,7 @@
<a
class="link"
target="_blank"
href="https://filebrowser.org/configuration.html#command-runner"
href="https://filebrowser.org/configuration.html#custom-branding"
>{{ t("settings.documentation") }}</a
>
</i18n-t>

View File

@@ -0,0 +1,9 @@
Package/aeonsemi-as21xxx-firmware = $(call Package/firmware-default,Aeonsemi AS21xxx Ethernet PHY firmware)
define Package/aeonsemi-as21xxx-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/aeonsemi
$(CP) \
$(PKG_BUILD_DIR)/aeonsemi/as21x1x_fw.bin \
$(1)/lib/firmware
endef
$(eval $(call BuildPackage,aeonsemi-as21xxx-firmware))

View File

@@ -94,13 +94,13 @@ function import_ssr_url(btn, urlname, sid) {
}
s.innerHTML = "";
//var ssu = ssrurl.match(/ssr:\/\/([A-Za-z0-9_-]+)/i);
ssrurl = ssrurl.replace(/&([a-zA-Z]+);/g, '&').replace(/\s*#\s*/, '#').trim(); //一些奇葩的链接用"&amp;"当做"&""#"前后带空格
var ssu = ssrurl.split('://');
//console.log(ssu.length);
if (ssu[0] === "ss") {
var queryStr = "";
if (ssu[1].indexOf("?") > -1) {
queryStr = ssu[1].split("?")[1]; // 提取 ? 后面的参数
queryStr = queryStr.replace(/&([a-zA-Z]+);/g, '&'); // 转义 &amp; 为 &
}
var params = new URLSearchParams(queryStr);
if (params.get("type")) {
@@ -177,7 +177,7 @@ function import_ssr_url(btn, urlname, sid) {
s.innerHTML = "<font style=\'color:green\'><%:Import configuration information successfully.%></font>";
return false;
case "ss":
var url0 = ((ssu[1] || "").replace(/&([a-zA-Z]+);/g, '&').replace(/\s*#\s*/, '#').trim());
var url0 = (ssu[1] || "");
var param = "";
// 先分离 #alias
@@ -667,7 +667,7 @@ function import_ssr_url(btn, urlname, sid) {
case "shadowsocks":
try {
// 处理完整 ss:// 链接
var urlinfo = ssu[1].replace(/&([a-zA-Z]+);/g, '&').replace(/\s*#\s*/, '#').trim();
var urlinfo = ssu[1];
// 拆分 @,判断是否是 base64 userinfo 的格式
var parts = urlinfo.split("@");
if (parts.length > 1) {
@@ -676,7 +676,7 @@ function import_ssr_url(btn, urlname, sid) {
var sepIndex = userinfo.indexOf(":");
if (sepIndex > -1) {
method = userinfo.slice(0, sepIndex);
password = userinfo.slice(sepIndex + 1);
password = userinfo.slice(sepIndex + 1); //一些链接用明文uuid做密码
}
}
var url = new URL("http://" + urlinfo);

View File

@@ -18,7 +18,7 @@ PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/tostercx/ssocks.git
PKG_SOURCE_DATE:=2020-07-09
PKG_SOURCE_VERSION:=c2024789c1ee076d171fd6061d7c133302216ea7
PKG_MIRROR_HASH:=3654e9f1fb54646e1e89c19e7aa3e105b84b2e20b5b634662c21c66691d1d22e
PKG_MIRROR_HASH:=2e9d1a2e6b47303389410952867d204e03054763d024a22a838a9707c2daca03
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
@@ -75,3 +75,4 @@ endef
$(eval $(call BuildPackage,ssocks))
$(eval $(call BuildPackage,ssocksd))

View File

@@ -85,13 +85,19 @@ public class Utils
/// Base64 Encode
/// </summary>
/// <param name="plainText"></param>
/// <param name="removePadding"></param>
/// <returns></returns>
public static string Base64Encode(string plainText)
public static string Base64Encode(string plainText, bool removePadding = false)
{
try
{
var plainTextBytes = Encoding.UTF8.GetBytes(plainText);
return Convert.ToBase64String(plainTextBytes);
var base64 = Convert.ToBase64String(plainTextBytes);
if (removePadding)
{
base64 = base64.TrimEnd('=');
}
return base64;
}
catch (Exception ex)
{
@@ -112,7 +118,7 @@ public class Utils
{
if (plainText.IsNullOrEmpty())
{
return "";
return string.Empty;
}
plainText = plainText.Trim()
@@ -947,7 +953,7 @@ public class Utils
if (SetUnixFileMode(fileName))
{
Logging.SaveLog($"Successfully set the file execution permission, {fileName}");
return "";
return string.Empty;
}
if (fileName.Contains(' '))

View File

@@ -27,7 +27,7 @@ public class FmtHandler
catch (Exception ex)
{
Logging.SaveLog(_tag, ex);
return "";
return string.Empty;
}
}

View File

@@ -42,7 +42,7 @@ public class ShadowsocksFmt : BaseFmt
// item.port);
//url = Utile.Base64Encode(url);
//new Sip002
var pw = Utils.Base64Encode($"{item.Security}:{item.Id}");
var pw = Utils.Base64Encode($"{item.Security}:{item.Id}", true);
return ToUri(EConfigType.Shadowsocks, item.Address, item.Port, pw, null, remark);
}

View File

@@ -33,7 +33,7 @@ public class SocksFmt : BaseFmt
remark = "#" + Utils.UrlEncode(item.Remarks);
}
//new
var pw = Utils.Base64Encode($"{item.Security}:{item.Id}");
var pw = Utils.Base64Encode($"{item.Security}:{item.Id}", true);
return ToUri(EConfigType.SOCKS, item.Address, item.Port, pw, null, remark);
}

View File

@@ -8,7 +8,6 @@ public sealed class AppManager
private Config _config;
private int? _statePort;
private int? _statePort2;
private WindowsJob? _processJob;
public static AppManager Instance => _instance.Value;
public Config Config => _config;
@@ -136,21 +135,6 @@ public sealed class AppManager
return localPort + (int)protocol;
}
public void AddProcess(nint processHandle)
{
if (Utils.IsWindows())
{
_processJob ??= new();
try
{
_processJob?.AddProcess(processHandle);
}
catch
{
}
}
}
#endregion Config
#region SqliteHelper

View File

@@ -8,6 +8,7 @@ public class CoreManager
private static readonly Lazy<CoreManager> _instance = new(() => new());
public static CoreManager Instance => _instance.Value;
private Config _config;
private WindowsJob? _processJob;
private ProcessService? _processService;
private ProcessService? _processPreService;
private bool _linuxSudo = false;
@@ -264,14 +265,28 @@ public class CoreManager
await procService.StartAsync();
await Task.Delay(100);
AppManager.Instance.AddProcess(procService.Handle);
if (procService is null or { HasExited: true })
{
throw new Exception(ResUI.FailedToRunCore);
}
AddProcessJob(procService.Handle);
return procService;
}
private void AddProcessJob(nint processHandle)
{
if (Utils.IsWindows())
{
_processJob ??= new();
try
{
_processJob?.AddProcess(processHandle);
}
catch { }
}
}
#endregion Process
}

View File

@@ -122,7 +122,7 @@ object ShadowsocksFmt : FmtBase() {
fun toUri(config: ProfileItem): String {
val pw = "${config.method}:${config.password}"
return toUri(config, Utils.encode(pw), null)
return toUri(config, Utils.encode(pw, true), null)
}
/**

View File

@@ -51,7 +51,7 @@ object SocksFmt : FmtBase() {
else
":"
return toUri(config, Utils.encode(pw), null)
return toUri(config, Utils.encode(pw, true), null)
}
/**

View File

@@ -134,11 +134,16 @@ object Utils {
* Encode a string to base64.
*
* @param text The string to encode.
* @param removePadding
* @return The base64 encoded string, or an empty string if encoding fails.
*/
fun encode(text: String): String {
fun encode(text: String, removePadding : Boolean = false): String {
return try {
Base64.encodeToString(text.toByteArray(Charsets.UTF_8), Base64.NO_WRAP)
var encoded = Base64.encodeToString(text.toByteArray(Charsets.UTF_8), Base64.NO_WRAP)
if (removePadding) {
encoded = encoded.trimEnd('=')
}
encoded
} catch (e: Exception) {
Log.e(AppConfig.TAG, "Failed to encode text to base64", e)
""

View File

@@ -20,8 +20,8 @@ swiperefreshlayout = "1.1.0"
toasty = "1.5.2"
editorkit = "2.9.0"
core = "3.5.3"
workRuntimeKtx = "2.10.3"
lifecycleViewmodelKtx = "2.9.2"
workRuntimeKtx = "2.10.5"
lifecycleViewmodelKtx = "2.9.4"
multidex = "2.0.1"
mockitoMockitoInline = "5.2.0"
flexbox = "3.0.0"