mirror of https://github.com/2dust/v2rayN
Subscription support authentication
parent
c2af982272
commit
b693873619
|
@ -104,33 +104,32 @@
|
|||
//
|
||||
// btnClose
|
||||
//
|
||||
resources.ApplyResources(this.btnClose, "btnClose");
|
||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
resources.ApplyResources(this.btnClose, "btnClose");
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.UseVisualStyleBackColor = true;
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
resources.ApplyResources(this.tabControl1, "tabControl1");
|
||||
this.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Controls.Add(this.tabPage2);
|
||||
this.tabControl1.Controls.Add(this.tabPage6);
|
||||
this.tabControl1.Controls.Add(this.tabPage7);
|
||||
this.tabControl1.Controls.Add(this.tabPage3);
|
||||
resources.ApplyResources(this.tabControl1, "tabControl1");
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
resources.ApplyResources(this.tabPage1, "tabPage1");
|
||||
this.tabPage1.Controls.Add(this.groupBox1);
|
||||
resources.ApplyResources(this.tabPage1, "tabPage1");
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Controls.Add(this.chkdefAllowInsecure);
|
||||
this.groupBox1.Controls.Add(this.chksniffingEnabled2);
|
||||
this.groupBox1.Controls.Add(this.chksniffingEnabled);
|
||||
|
@ -148,6 +147,7 @@
|
|||
this.groupBox1.Controls.Add(this.label5);
|
||||
this.groupBox1.Controls.Add(this.txtlocalPort);
|
||||
this.groupBox1.Controls.Add(this.label2);
|
||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
|
@ -190,12 +190,12 @@
|
|||
//
|
||||
// cmbprotocol2
|
||||
//
|
||||
resources.ApplyResources(this.cmbprotocol2, "cmbprotocol2");
|
||||
this.cmbprotocol2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbprotocol2.FormattingEnabled = true;
|
||||
this.cmbprotocol2.Items.AddRange(new object[] {
|
||||
resources.GetString("cmbprotocol2.Items"),
|
||||
resources.GetString("cmbprotocol2.Items1")});
|
||||
resources.ApplyResources(this.cmbprotocol2, "cmbprotocol2");
|
||||
this.cmbprotocol2.Name = "cmbprotocol2";
|
||||
//
|
||||
// label3
|
||||
|
@ -210,8 +210,8 @@
|
|||
//
|
||||
// cmbprotocol
|
||||
//
|
||||
resources.ApplyResources(this.cmbprotocol, "cmbprotocol");
|
||||
this.cmbprotocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
resources.ApplyResources(this.cmbprotocol, "cmbprotocol");
|
||||
this.cmbprotocol.FormattingEnabled = true;
|
||||
this.cmbprotocol.Items.AddRange(new object[] {
|
||||
resources.GetString("cmbprotocol.Items"),
|
||||
|
@ -237,7 +237,6 @@
|
|||
//
|
||||
// cmbloglevel
|
||||
//
|
||||
resources.ApplyResources(this.cmbloglevel, "cmbloglevel");
|
||||
this.cmbloglevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbloglevel.FormattingEnabled = true;
|
||||
this.cmbloglevel.Items.AddRange(new object[] {
|
||||
|
@ -246,6 +245,7 @@
|
|||
resources.GetString("cmbloglevel.Items2"),
|
||||
resources.GetString("cmbloglevel.Items3"),
|
||||
resources.GetString("cmbloglevel.Items4")});
|
||||
resources.ApplyResources(this.cmbloglevel, "cmbloglevel");
|
||||
this.cmbloglevel.Name = "cmbloglevel";
|
||||
//
|
||||
// label5
|
||||
|
@ -265,10 +265,10 @@
|
|||
//
|
||||
// tabPage2
|
||||
//
|
||||
resources.ApplyResources(this.tabPage2, "tabPage2");
|
||||
this.tabPage2.Controls.Add(this.linkDnsObjectDoc);
|
||||
this.tabPage2.Controls.Add(this.txtremoteDNS);
|
||||
this.tabPage2.Controls.Add(this.label14);
|
||||
resources.ApplyResources(this.tabPage2, "tabPage2");
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
|
@ -291,7 +291,6 @@
|
|||
//
|
||||
// tabPage6
|
||||
//
|
||||
resources.ApplyResources(this.tabPage6, "tabPage6");
|
||||
this.tabPage6.Controls.Add(this.chkKcpcongestion);
|
||||
this.tabPage6.Controls.Add(this.txtKcpwriteBufferSize);
|
||||
this.tabPage6.Controls.Add(this.label10);
|
||||
|
@ -305,6 +304,7 @@
|
|||
this.tabPage6.Controls.Add(this.label7);
|
||||
this.tabPage6.Controls.Add(this.txtKcpmtu);
|
||||
this.tabPage6.Controls.Add(this.label6);
|
||||
resources.ApplyResources(this.tabPage6, "tabPage6");
|
||||
this.tabPage6.Name = "tabPage6";
|
||||
this.tabPage6.UseVisualStyleBackColor = true;
|
||||
//
|
||||
|
@ -376,7 +376,6 @@
|
|||
//
|
||||
// tabPage7
|
||||
//
|
||||
resources.ApplyResources(this.tabPage7, "tabPage7");
|
||||
this.tabPage7.Controls.Add(this.chkEnableSecurityProtocolTls13);
|
||||
this.tabPage7.Controls.Add(this.chkEnableAutoAdjustMainLvColWidth);
|
||||
this.tabPage7.Controls.Add(this.btnSetLoopback);
|
||||
|
@ -391,6 +390,7 @@
|
|||
this.tabPage7.Controls.Add(this.chkEnableStatistics);
|
||||
this.tabPage7.Controls.Add(this.chkAllowLANConn);
|
||||
this.tabPage7.Controls.Add(this.chkAutoRun);
|
||||
resources.ApplyResources(this.tabPage7, "tabPage7");
|
||||
this.tabPage7.Name = "tabPage7";
|
||||
this.tabPage7.UseVisualStyleBackColor = true;
|
||||
//
|
||||
|
@ -431,12 +431,9 @@
|
|||
//
|
||||
// cmbCoreType
|
||||
//
|
||||
resources.ApplyResources(this.cmbCoreType, "cmbCoreType");
|
||||
this.cmbCoreType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbCoreType.FormattingEnabled = true;
|
||||
this.cmbCoreType.Items.AddRange(new object[] {
|
||||
resources.GetString("cmbCoreType.Items"),
|
||||
resources.GetString("cmbCoreType.Items1")});
|
||||
resources.ApplyResources(this.cmbCoreType, "cmbCoreType");
|
||||
this.cmbCoreType.Name = "cmbCoreType";
|
||||
//
|
||||
// label4
|
||||
|
@ -452,9 +449,9 @@
|
|||
//
|
||||
// cbFreshrate
|
||||
//
|
||||
resources.ApplyResources(this.cbFreshrate, "cbFreshrate");
|
||||
this.cbFreshrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbFreshrate.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.cbFreshrate, "cbFreshrate");
|
||||
this.cbFreshrate.Name = "cbFreshrate";
|
||||
//
|
||||
// lbFreshrate
|
||||
|
@ -482,17 +479,17 @@
|
|||
//
|
||||
// tabPage3
|
||||
//
|
||||
resources.ApplyResources(this.tabPage3, "tabPage3");
|
||||
this.tabPage3.Controls.Add(this.groupBox2);
|
||||
resources.ApplyResources(this.tabPage3, "tabPage3");
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.tabPage3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.Controls.Add(this.label13);
|
||||
this.groupBox2.Controls.Add(this.label12);
|
||||
this.groupBox2.Controls.Add(this.txtsystemProxyExceptions);
|
||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.TabStop = false;
|
||||
//
|
||||
|
@ -513,9 +510,9 @@
|
|||
//
|
||||
// panel2
|
||||
//
|
||||
resources.ApplyResources(this.panel2, "panel2");
|
||||
this.panel2.Controls.Add(this.btnClose);
|
||||
this.panel2.Controls.Add(this.btnOK);
|
||||
resources.ApplyResources(this.panel2, "panel2");
|
||||
this.panel2.Name = "panel2";
|
||||
//
|
||||
// btnOK
|
||||
|
|
|
@ -16,6 +16,8 @@ namespace v2rayN.Forms
|
|||
|
||||
private void OptionSettingForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
cmbCoreType.Items.AddRange(Global.coreTypes.ToArray());
|
||||
|
||||
InitBase();
|
||||
|
||||
InitKCP();
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -66,6 +66,10 @@ namespace v2rayN.Forms
|
|||
{
|
||||
subItem.groupId = groupItem[index].id;
|
||||
}
|
||||
else
|
||||
{
|
||||
subItem.groupId = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
private void txtRemarks_Leave(object sender, EventArgs e)
|
||||
|
|
|
@ -175,7 +175,7 @@ namespace v2rayN
|
|||
/// Language
|
||||
/// </summary>
|
||||
public const string MyRegKeyLanguage = "CurrentLanguage";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Icon
|
||||
/// </summary>
|
||||
|
@ -199,6 +199,7 @@ namespace v2rayN
|
|||
public static readonly List<string> xtlsFlows = new List<string> { "", "xtls-rprx-origin", "xtls-rprx-origin-udp443", "xtls-rprx-direct", "xtls-rprx-direct-udp443" };
|
||||
public static readonly List<string> networks = new List<string> { "tcp", "kcp", "ws", "h2", "quic", "grpc" };
|
||||
public static readonly List<string> kcpHeaderTypes = new List<string> { "srtp", "utp", "wechat-video", "dtls", "wireguard" };
|
||||
public static readonly List<string> coreTypes = new List<string> { "v2fly_core", "Xray_core" };
|
||||
|
||||
public const string GrpcgunMode = "gun";
|
||||
public const string GrpcmultiMode = "multi";
|
||||
|
|
|
@ -150,8 +150,15 @@ namespace v2rayN.Handler
|
|||
}
|
||||
ws.Headers.Add("user-agent", userAgent);
|
||||
|
||||
Uri uri = new Uri(url);
|
||||
//Authorization Header
|
||||
if (!Utils.IsNullOrEmpty(uri.UserInfo))
|
||||
{
|
||||
ws.Headers.Add(HttpRequestHeader.Authorization, "Basic " + Utils.Base64Encode(uri.UserInfo));
|
||||
}
|
||||
|
||||
ws.DownloadStringCompleted += Ws_DownloadStringCompleted;
|
||||
ws.DownloadStringAsync(new Uri(url));
|
||||
ws.DownloadStringAsync(uri);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -199,7 +199,8 @@ namespace v2rayN.Handler
|
|||
if (args.Success)
|
||||
{
|
||||
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgGetSubscriptionSuccessfully")}");
|
||||
string result = Utils.Base64Decode(args.Msg);
|
||||
//string result = Utils.Base64Decode(args.Msg);
|
||||
string result = args.Msg;
|
||||
if (Utils.IsNullOrEmpty(result))
|
||||
{
|
||||
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgSubscriptionDecodingFailed")}");
|
||||
|
|
|
@ -610,7 +610,7 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Subscription content decoding failed (non-BASE64 code) 的本地化字符串。
|
||||
/// 查找类似 Failed to get subscription content 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string MsgSubscriptionDecodingFailed {
|
||||
get {
|
||||
|
|
|
@ -268,7 +268,7 @@
|
|||
<value>Start updating PAC...</value>
|
||||
</data>
|
||||
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
|
||||
<value>Subscription content decoding failed (non-BASE64 code)</value>
|
||||
<value>Failed to get subscription content</value>
|
||||
</data>
|
||||
<data name="MsgUnpacking" xml:space="preserve">
|
||||
<value>is unpacking...</value>
|
||||
|
|
|
@ -268,7 +268,7 @@
|
|||
<value>开始更新 PAC...</value>
|
||||
</data>
|
||||
<data name="MsgSubscriptionDecodingFailed" xml:space="preserve">
|
||||
<value>订阅内容解码失败(非BASE64码)</value>
|
||||
<value>订阅内容获取失败</value>
|
||||
</data>
|
||||
<data name="MsgUnpacking" xml:space="preserve">
|
||||
<value>正在解压......</value>
|
||||
|
|
Loading…
Reference in New Issue