forked from 2dust/v2rayN
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
2dust
committed
Jul 30, 2019
1 parent
ab37076
commit cf6c20b
Showing
118 changed files
with
34,092 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
Oops, something went wrong.