Skip to content

Commit

Permalink
up all
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Jul 30, 2019
1 parent ab37076 commit cf6c20b
Show file tree
Hide file tree
Showing 118 changed files with 34,092 additions and 202 deletions.
875 changes: 674 additions & 201 deletions LICENSE

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
# v2rayN
# v2rayN

### How to use
- Download exe from release download
- Also need to download v2ray core in the same folder
- Run v2rayN.exe

### Requirements
- Microsoft [.NET Framework 4.6](https://docs.microsoft.com/zh-cn/dotnet/framework/install/guide-for-developers) or higher
- Project V core [https://github.com/v2ray/v2ray-core/releases](https://github.com/v2ray/v2ray-core/releases)
30 changes: 30 additions & 0 deletions v2rayN/v2rayN.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2050
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "v2rayN", "v2rayN\v2rayN.csproj", "{0A9785E6-D256-4B73-9757-4EF59955FD1E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Debug|x86.ActiveCfg = Debug|Any CPU
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Debug|x86.Build.0 = Debug|Any CPU
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Release|Any CPU.Build.0 = Release|Any CPU
{0A9785E6-D256-4B73-9757-4EF59955FD1E}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {56B88873-C9CC-4069-A1E5-DABD6C6E865E}
EndGlobalSection
EndGlobal
Binary file added v2rayN/v2rayN.v11.suo
Binary file not shown.
140 changes: 140 additions & 0 deletions v2rayN/v2rayN/Forms/AddServer2Form.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 75 additions & 0 deletions v2rayN/v2rayN/Forms/AddServer2Form.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
using System;
using System.Windows.Forms;
using v2rayN.Handler;
using v2rayN.Mode;

namespace v2rayN.Forms
{
public partial class AddServer2Form : BaseForm
{
public int EditIndex { get; set; }
VmessItem vmessItem;

public AddServer2Form()
{
InitializeComponent();
}

private void AddServer2Form_Load(object sender, EventArgs e)
{
if (EditIndex >= 0)
{
BindingServer();
}
else
{
ClearServer();
}
}

/// <summary>
/// 绑定数据
/// </summary>
private void BindingServer()
{
vmessItem = config.vmess[EditIndex];
txtRemarks.Text = vmessItem.remarks;
txtAddress.Text = vmessItem.address;
txtAddress.ReadOnly = true;
}


/// <summary>
/// 清除设置
/// </summary>
private void ClearServer()
{
txtRemarks.Text = "";
}

private void btnOK_Click(object sender, EventArgs e)
{
string remarks = txtRemarks.Text;
if (Utils.IsNullOrEmpty(remarks))
{
UI.Show(UIRes.I18N("PleaseFillRemarks"));
return;
}
vmessItem.remarks = remarks;

if (ConfigHandler.EditCustomServer(ref config, vmessItem, EditIndex) == 0)
{
this.DialogResult = DialogResult.OK;
}
else
{
UI.Show(UIRes.I18N("OperationFailed"));
}
}

private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
}
}
Loading

0 comments on commit cf6c20b

Please sign in to comment.