mirror of https://github.com/2dust/v2rayN
Add more subscription url for one group
parent
84eba671f0
commit
b30daf8e56
|
@ -1,4 +1,5 @@
|
||||||
using Splat;
|
using DynamicData;
|
||||||
|
using Splat;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
@ -163,16 +164,6 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
//Turn off system proxy
|
|
||||||
//bool bSysProxyType = false;
|
|
||||||
//if (!blProxy && config.sysProxyType == ESysProxyType.ForcedChange)
|
|
||||||
//{
|
|
||||||
// bSysProxyType = true;
|
|
||||||
// config.sysProxyType = ESysProxyType.ForcedClear;
|
|
||||||
// SysProxyHandle.UpdateSysProxy(config, false);
|
|
||||||
// Thread.Sleep(3000);
|
|
||||||
//}
|
|
||||||
|
|
||||||
foreach (var item in subItem)
|
foreach (var item in subItem)
|
||||||
{
|
{
|
||||||
string id = item.id.TrimEx();
|
string id = item.id.TrimEx();
|
||||||
|
@ -196,16 +187,55 @@ namespace v2rayN.Handler
|
||||||
_updateFunc(false, $"{hashCode}{args.GetException().Message}");
|
_updateFunc(false, $"{hashCode}{args.GetException().Message}");
|
||||||
};
|
};
|
||||||
|
|
||||||
//idn to idc
|
|
||||||
url = Utils.GetPunycode(url);
|
|
||||||
|
|
||||||
_updateFunc(false, $"{hashCode}{ResUI.MsgStartGettingSubscriptions}");
|
_updateFunc(false, $"{hashCode}{ResUI.MsgStartGettingSubscriptions}");
|
||||||
|
|
||||||
|
//one url
|
||||||
|
url = Utils.GetPunycode(url);
|
||||||
var result = await downloadHandle.TryDownloadString(url, blProxy, userAgent);
|
var result = await downloadHandle.TryDownloadString(url, blProxy, userAgent);
|
||||||
if (blProxy && Utils.IsNullOrEmpty(result))
|
if (blProxy && Utils.IsNullOrEmpty(result))
|
||||||
{
|
{
|
||||||
result = await downloadHandle.TryDownloadString(url, false, userAgent);
|
result = await downloadHandle.TryDownloadString(url, false, userAgent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//more url
|
||||||
|
if (!Utils.IsNullOrEmpty(item.moreUrl.TrimEx()))
|
||||||
|
{
|
||||||
|
if (!Utils.IsNullOrEmpty(result) && Utils.IsBase64String(result))
|
||||||
|
{
|
||||||
|
result = Utils.Base64Decode(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
var lstUrl = new List<string>
|
||||||
|
{
|
||||||
|
item.moreUrl.TrimEx().Split(",")
|
||||||
|
};
|
||||||
|
foreach (var it in lstUrl)
|
||||||
|
{
|
||||||
|
var url2 = Utils.GetPunycode(it);
|
||||||
|
if (Utils.IsNullOrEmpty(url2))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
var result2 = await downloadHandle.TryDownloadString(url2, blProxy, userAgent);
|
||||||
|
if (blProxy && Utils.IsNullOrEmpty(result2))
|
||||||
|
{
|
||||||
|
result2 = await downloadHandle.TryDownloadString(url2, false, userAgent);
|
||||||
|
}
|
||||||
|
if (!Utils.IsNullOrEmpty(result2))
|
||||||
|
{
|
||||||
|
if (Utils.IsBase64String(result2))
|
||||||
|
{
|
||||||
|
result += Utils.Base64Decode(result2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result += result2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Utils.IsNullOrEmpty(result))
|
if (Utils.IsNullOrEmpty(result))
|
||||||
{
|
{
|
||||||
_updateFunc(false, $"{hashCode}{ResUI.MsgSubscriptionDecodingFailed}");
|
_updateFunc(false, $"{hashCode}{ResUI.MsgSubscriptionDecodingFailed}");
|
||||||
|
@ -231,18 +261,12 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
_updateFunc(false, "-------------------------------------------------------");
|
_updateFunc(false, "-------------------------------------------------------");
|
||||||
}
|
}
|
||||||
////restore system proxy
|
|
||||||
//if (bSysProxyType)
|
|
||||||
//{
|
|
||||||
// config.sysProxyType = ESysProxyType.ForcedChange;
|
|
||||||
// SysProxyHandle.UpdateSysProxy(config, false);
|
|
||||||
//}
|
|
||||||
_updateFunc(true, $"{ResUI.MsgUpdateSubscriptionEnd}");
|
_updateFunc(true, $"{ResUI.MsgUpdateSubscriptionEnd}");
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void UpdateGeoFile(string geoName, Config config, Action<bool, string> update)
|
public void UpdateGeoFile(string geoName, Config config, Action<bool, string> update)
|
||||||
{
|
{
|
||||||
_config = config;
|
_config = config;
|
||||||
|
|
|
@ -6,45 +6,20 @@ namespace v2rayN.Mode
|
||||||
public class SubItem
|
public class SubItem
|
||||||
{
|
{
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public string id
|
public string id { get; set; }
|
||||||
{
|
|
||||||
get; set;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
public string remarks { get; set; }
|
||||||
/// 备注
|
|
||||||
/// </summary>
|
|
||||||
public string remarks
|
|
||||||
{
|
|
||||||
get; set;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
public string url { get; set; }
|
||||||
/// url
|
|
||||||
/// </summary>
|
public string moreUrl { get; set; }
|
||||||
public string url
|
|
||||||
{
|
|
||||||
get; set;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// enable
|
|
||||||
/// </summary>
|
|
||||||
public bool enabled { get; set; } = true;
|
public bool enabled { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
public string userAgent { get; set; } = string.Empty;
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public string userAgent
|
|
||||||
{
|
|
||||||
get; set;
|
|
||||||
} = string.Empty;
|
|
||||||
|
|
||||||
|
public int sort { get; set; }
|
||||||
|
|
||||||
public int sort
|
|
||||||
{
|
|
||||||
get; set;
|
|
||||||
}
|
|
||||||
public string filter { get; set; }
|
public string filter { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -420,6 +420,15 @@ namespace v2rayN.Resx {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 More urls, separated by commas 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string LvMoreUrl {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("LvMoreUrl", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Port 的本地化字符串。
|
/// 查找类似 Port 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -564,15 +573,6 @@ namespace v2rayN.Resx {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Medium 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string MediumFresh {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("MediumFresh", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Add a custom configuration server 的本地化字符串。
|
/// 查找类似 Add a custom configuration server 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1671,15 +1671,6 @@ namespace v2rayN.Resx {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Fast 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string QuickFresh {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("QuickFresh", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Global hotkey {0} registered failed, reason {1} 的本地化字符串。
|
/// 查找类似 Global hotkey {0} registered failed, reason {1} 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1762,20 +1753,11 @@ namespace v2rayN.Resx {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Slow 的本地化字符串。
|
/// 查找类似 {0}:{1}/s↑ | {2}/s↓ 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string SlowFresh {
|
public static string SpeedDisplayText {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("SlowFresh", resourceCulture);
|
return ResourceManager.GetString("SpeedDisplayText", resourceCulture);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Note: This feature relies on the Http global proxy. Please manually adjust the Http global proxy and active node after testing. 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string SpeedServerTips {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("SpeedServerTips", resourceCulture);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -228,9 +228,6 @@
|
||||||
<data name="LvTransportProtocol" xml:space="preserve">
|
<data name="LvTransportProtocol" xml:space="preserve">
|
||||||
<value>جابجایی</value>
|
<value>جابجایی</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MediumFresh" xml:space="preserve">
|
|
||||||
<value>متوسط</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgClearSubscription" xml:space="preserve">
|
<data name="MsgClearSubscription" xml:space="preserve">
|
||||||
<value>محتوای اشتراک اصلی را پاک کنید</value>
|
<value>محتوای اشتراک اصلی را پاک کنید</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -315,9 +312,6 @@
|
||||||
<data name="PleaseSelectServer" xml:space="preserve">
|
<data name="PleaseSelectServer" xml:space="preserve">
|
||||||
<value>لطفا ابتدا سرور را انتخاب کنید</value>
|
<value>لطفا ابتدا سرور را انتخاب کنید</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="QuickFresh" xml:space="preserve">
|
|
||||||
<value>سریع</value>
|
|
||||||
</data>
|
|
||||||
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
||||||
<value>Servers deduplication completed. Old: {0}, New: {1}.</value>
|
<value>Servers deduplication completed. Old: {0}, New: {1}.</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -330,12 +324,6 @@
|
||||||
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
||||||
<value>The server configuration file is saved at: {0}</value>
|
<value>The server configuration file is saved at: {0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SlowFresh" xml:space="preserve">
|
|
||||||
<value>آهسته. تدریجی</value>
|
|
||||||
</data>
|
|
||||||
<data name="SpeedServerTips" xml:space="preserve">
|
|
||||||
<value>توجه: این ویژگی به پروکسی جهانی Http متکی است. لطفاً پس از آزمایش، پراکسی جهانی Http و گره فعال را به صورت دستی تنظیم کنید.</value>
|
|
||||||
</data>
|
|
||||||
<data name="StartPacFailed" xml:space="preserve">
|
<data name="StartPacFailed" xml:space="preserve">
|
||||||
<value>PAC شروع نشد. لطفا این برنامه را به عنوان Administrator اجرا کنید.</value>
|
<value>PAC شروع نشد. لطفا این برنامه را به عنوان Administrator اجرا کنید.</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -228,9 +228,6 @@
|
||||||
<data name="LvTransportProtocol" xml:space="preserve">
|
<data name="LvTransportProtocol" xml:space="preserve">
|
||||||
<value>Transport</value>
|
<value>Transport</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MediumFresh" xml:space="preserve">
|
|
||||||
<value>Medium</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgClearSubscription" xml:space="preserve">
|
<data name="MsgClearSubscription" xml:space="preserve">
|
||||||
<value>Clear original subscription content</value>
|
<value>Clear original subscription content</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -315,9 +312,6 @@
|
||||||
<data name="PleaseSelectServer" xml:space="preserve">
|
<data name="PleaseSelectServer" xml:space="preserve">
|
||||||
<value>Please select the server first</value>
|
<value>Please select the server first</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="QuickFresh" xml:space="preserve">
|
|
||||||
<value>Fast</value>
|
|
||||||
</data>
|
|
||||||
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
||||||
<value>Servers deduplication completed. Old: {0}, New: {1}.</value>
|
<value>Servers deduplication completed. Old: {0}, New: {1}.</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -330,12 +324,6 @@
|
||||||
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
||||||
<value>The server configuration file is saved at: {0}</value>
|
<value>The server configuration file is saved at: {0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SlowFresh" xml:space="preserve">
|
|
||||||
<value>Slow</value>
|
|
||||||
</data>
|
|
||||||
<data name="SpeedServerTips" xml:space="preserve">
|
|
||||||
<value>Note: This feature relies on the Http global proxy. Please manually adjust the Http global proxy and active node after testing.</value>
|
|
||||||
</data>
|
|
||||||
<data name="StartPacFailed" xml:space="preserve">
|
<data name="StartPacFailed" xml:space="preserve">
|
||||||
<value>PAC failed to start. Please run this program as Administrator.</value>
|
<value>PAC failed to start. Please run this program as Administrator.</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -1156,4 +1144,10 @@
|
||||||
<data name="menuRebootAsAdmin" xml:space="preserve">
|
<data name="menuRebootAsAdmin" xml:space="preserve">
|
||||||
<value>Reboot as administrator</value>
|
<value>Reboot as administrator</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LvMoreUrl" xml:space="preserve">
|
||||||
|
<value>More urls, separated by commas</value>
|
||||||
|
</data>
|
||||||
|
<data name="SpeedDisplayText" xml:space="preserve">
|
||||||
|
<value>{0}:{1}/s↑ | {2}/s↓</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -228,9 +228,6 @@
|
||||||
<data name="LvTransportProtocol" xml:space="preserve">
|
<data name="LvTransportProtocol" xml:space="preserve">
|
||||||
<value>Протокол</value>
|
<value>Протокол</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MediumFresh" xml:space="preserve">
|
|
||||||
<value>Medium</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgClearSubscription" xml:space="preserve">
|
<data name="MsgClearSubscription" xml:space="preserve">
|
||||||
<value>Очистить контент оригинальной подписки</value>
|
<value>Очистить контент оригинальной подписки</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -315,9 +312,6 @@
|
||||||
<data name="PleaseSelectServer" xml:space="preserve">
|
<data name="PleaseSelectServer" xml:space="preserve">
|
||||||
<value>Сначала выберите сервер</value>
|
<value>Сначала выберите сервер</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="QuickFresh" xml:space="preserve">
|
|
||||||
<value>Быстрый</value>
|
|
||||||
</data>
|
|
||||||
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
||||||
<value>Удаление дублей завершено. Старая: {0}, Новая: {1}.</value>
|
<value>Удаление дублей завершено. Старая: {0}, Новая: {1}.</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -330,12 +324,6 @@
|
||||||
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
||||||
<value>Файл конфигурации сервера сохранен по адресу: {0}</value>
|
<value>Файл конфигурации сервера сохранен по адресу: {0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SlowFresh" xml:space="preserve">
|
|
||||||
<value>Медленный</value>
|
|
||||||
</data>
|
|
||||||
<data name="SpeedServerTips" xml:space="preserve">
|
|
||||||
<value>Примечание. Эта функция зависит от глобального прокси-сервера HTTP. После тестирования вручную настройте глобальный прокси-сервер HTTP и активный узел.</value>
|
|
||||||
</data>
|
|
||||||
<data name="StartPacFailed" xml:space="preserve">
|
<data name="StartPacFailed" xml:space="preserve">
|
||||||
<value>PAC не удалось запустить. Пожалуйста, запустите эту программу от имени администратора.</value>
|
<value>PAC не удалось запустить. Пожалуйста, запустите эту программу от имени администратора.</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -228,9 +228,6 @@
|
||||||
<data name="LvTransportProtocol" xml:space="preserve">
|
<data name="LvTransportProtocol" xml:space="preserve">
|
||||||
<value>传输协议</value>
|
<value>传输协议</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MediumFresh" xml:space="preserve">
|
|
||||||
<value>中等</value>
|
|
||||||
</data>
|
|
||||||
<data name="MsgClearSubscription" xml:space="preserve">
|
<data name="MsgClearSubscription" xml:space="preserve">
|
||||||
<value>清除原订阅内容</value>
|
<value>清除原订阅内容</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -315,9 +312,6 @@
|
||||||
<data name="PleaseSelectServer" xml:space="preserve">
|
<data name="PleaseSelectServer" xml:space="preserve">
|
||||||
<value>请先选择服务器</value>
|
<value>请先选择服务器</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="QuickFresh" xml:space="preserve">
|
|
||||||
<value>快</value>
|
|
||||||
</data>
|
|
||||||
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
<data name="RemoveDuplicateServerResult" xml:space="preserve">
|
||||||
<value>服务器去重完成。原数量: {0},现数量: {1}</value>
|
<value>服务器去重完成。原数量: {0},现数量: {1}</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -330,12 +324,6 @@
|
||||||
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
<data name="SaveServerConfigurationIn" xml:space="preserve">
|
||||||
<value>服务端配置文件保存在:{0}</value>
|
<value>服务端配置文件保存在:{0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SlowFresh" xml:space="preserve">
|
|
||||||
<value>慢</value>
|
|
||||||
</data>
|
|
||||||
<data name="SpeedServerTips" xml:space="preserve">
|
|
||||||
<value>注意:此功能依赖Http全局代理!测试完成后,请手工调整Http全局代理和活动节点。</value>
|
|
||||||
</data>
|
|
||||||
<data name="StartPacFailed" xml:space="preserve">
|
<data name="StartPacFailed" xml:space="preserve">
|
||||||
<value>PAC服务启动失败,请用管理员启动</value>
|
<value>PAC服务启动失败,请用管理员启动</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -1156,4 +1144,7 @@
|
||||||
<data name="menuRebootAsAdmin" xml:space="preserve">
|
<data name="menuRebootAsAdmin" xml:space="preserve">
|
||||||
<value>以管理员身份重启</value>
|
<value>以管理员身份重启</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LvMoreUrl" xml:space="preserve">
|
||||||
|
<value>更多地址(url),用逗号隔开</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -429,6 +429,11 @@ namespace v2rayN
|
||||||
BitmapSizeOptions.FromEmptyOptions());
|
BitmapSizeOptions.FromEmptyOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// idn to idc
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="url"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public static string GetPunycode(string url)
|
public static string GetPunycode(string url)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(url))
|
if (string.IsNullOrWhiteSpace(url))
|
||||||
|
|
|
@ -568,8 +568,9 @@ namespace v2rayN.ViewModels
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SpeedProxyDisplay = string.Format("{0}:{1}/s<><73> | {2}/s<><73>", Global.agentTag, Utils.HumanFy(update.proxyUp), Utils.HumanFy(update.proxyDown));
|
|
||||||
SpeedDirectDisplay = string.Format("{0}:{1}/s<><73> | {2}/s<><73>", Global.directTag, Utils.HumanFy(update.directUp), Utils.HumanFy(update.directDown));
|
SpeedProxyDisplay = string.Format(ResUI.SpeedDisplayText, Global.agentTag, Utils.HumanFy(update.proxyUp), Utils.HumanFy(update.proxyDown));
|
||||||
|
SpeedDirectDisplay = string.Format(ResUI.SpeedDisplayText, Global.directTag, Utils.HumanFy(update.directUp), Utils.HumanFy(update.directDown));
|
||||||
|
|
||||||
if (update.proxyUp + update.proxyDown > 0)
|
if (update.proxyUp + update.proxyDown > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,6 +62,7 @@ namespace v2rayN.ViewModels
|
||||||
{
|
{
|
||||||
item.remarks = SelectedSource.remarks;
|
item.remarks = SelectedSource.remarks;
|
||||||
item.url = SelectedSource.url;
|
item.url = SelectedSource.url;
|
||||||
|
item.moreUrl = SelectedSource.moreUrl;
|
||||||
item.enabled = SelectedSource.enabled;
|
item.enabled = SelectedSource.enabled;
|
||||||
item.userAgent = SelectedSource.userAgent;
|
item.userAgent = SelectedSource.userAgent;
|
||||||
item.sort = SelectedSource.sort;
|
item.sort = SelectedSource.sort;
|
||||||
|
|
|
@ -23,6 +23,14 @@
|
||||||
TextOptions.TextRenderingMode="Auto"
|
TextOptions.TextRenderingMode="Auto"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
<Window.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Popupbox.xaml" />
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</Window.Resources>
|
||||||
|
|
||||||
<ScrollViewer
|
<ScrollViewer
|
||||||
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
|
materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
|
||||||
HorizontalScrollBarVisibility="Auto"
|
HorizontalScrollBarVisibility="Auto"
|
||||||
|
@ -45,6 +53,7 @@
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
@ -92,6 +101,31 @@
|
||||||
Style="{StaticResource MyOutlinedTextBox}"
|
Style="{StaticResource MyOutlinedTextBox}"
|
||||||
TextWrapping="Wrap" />
|
TextWrapping="Wrap" />
|
||||||
|
|
||||||
|
<materialDesign:PopupBox
|
||||||
|
Grid.Row="2"
|
||||||
|
Grid.Column="2"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
StaysOpen="True"
|
||||||
|
Style="{StaticResource MaterialDesignToolForegroundPopupBox}">
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock
|
||||||
|
Margin="4"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
|
Text="{x:Static resx:ResUI.LvMoreUrl}" />
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtMoreUrl"
|
||||||
|
Width="400"
|
||||||
|
Margin="4"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.SubUrlTips}"
|
||||||
|
AcceptsReturn="True"
|
||||||
|
MinLines="4"
|
||||||
|
Style="{StaticResource MyOutlinedTextBox}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</StackPanel>
|
||||||
|
</materialDesign:PopupBox>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
|
|
|
@ -20,6 +20,7 @@ namespace v2rayN.Views
|
||||||
{
|
{
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.remarks, v => v.txtRemarks.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.remarks, v => v.txtRemarks.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.url, v => v.txtUrl.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.url, v => v.txtUrl.Text).DisposeWith(disposables);
|
||||||
|
this.Bind(ViewModel, vm => vm.SelectedSource.moreUrl, v => v.txtMoreUrl.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.enabled, v => v.togEnable.IsChecked).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.enabled, v => v.togEnable.IsChecked).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.userAgent, v => v.txtUserAgent.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.userAgent, v => v.txtUserAgent.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.SelectedSource.sort, v => v.txtSort.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.SelectedSource.sort, v => v.txtSort.Text).DisposeWith(disposables);
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
Binding="{Binding url}"
|
Binding="{Binding url}"
|
||||||
Header="{x:Static resx:ResUI.LvUrl}" />
|
Header="{x:Static resx:ResUI.LvUrl}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="80"
|
Width="100"
|
||||||
Binding="{Binding enabled}"
|
Binding="{Binding enabled}"
|
||||||
Header="{x:Static resx:ResUI.LvEnabled}" />
|
Header="{x:Static resx:ResUI.LvEnabled}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
|
|
Loading…
Reference in New Issue