Skip to content

Commit

Permalink
update v2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Apr 27, 2018
2 parents 38210fb + 0e969e2 commit 138f59c
Show file tree
Hide file tree
Showing 31 changed files with 937 additions and 223 deletions.
25 changes: 25 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
在提出问题前请先自行排除服务器端问题,同时也请通过搜索确认是否有人提出过相同问题。

### 预期行为
描述你认为应该发生什么

### 实际行为
描述实际发生了什么

### 复现方法
1.
2.
3.

### 日志信息,位置在当前目录下的guiLogs
<details>

```
在这里粘贴日志
```
</details>

### 环境信息

### 额外信息(可选)

Binary file modified v2rayN/v2rayN.v11.suo
Binary file not shown.
2 changes: 1 addition & 1 deletion v2rayN/v2rayN/Forms/AddServer3Form.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private void btnOK_Click(object sender, EventArgs e)

VmessItem vmessItem = new VmessItem();
vmessItem.address = address;
vmessItem.port = Convert.ToInt32(port);
vmessItem.port = Utils.ToInt(port);
vmessItem.id = id;
vmessItem.security = security;
vmessItem.remarks = remarks;
Expand Down
87 changes: 61 additions & 26 deletions v2rayN/v2rayN/Forms/AddServerForm.Designer.cs

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

10 changes: 8 additions & 2 deletions v2rayN/v2rayN/Forms/AddServerForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ private void BindingServer()

cmbHeaderType.Text = vmessItem.headerType;
txtRequestHost.Text = vmessItem.requestHost;
txtPath.Text = vmessItem.path;
cmbStreamSecurity.Text = vmessItem.streamSecurity;
}

Expand All @@ -64,6 +65,7 @@ private void ClearServer()
cmbHeaderType.Text = Global.None;
txtRequestHost.Text = "";
cmbStreamSecurity.Text = "";
txtPath.Text = "";
}


Expand Down Expand Up @@ -115,6 +117,7 @@ private void btnOK_Click(object sender, EventArgs e)

string headerType = cmbHeaderType.Text;
string requestHost = txtRequestHost.Text;
string path = txtPath.Text;
string streamSecurity = cmbStreamSecurity.Text;

if (Utils.IsNullOrEmpty(address))
Expand All @@ -140,15 +143,16 @@ private void btnOK_Click(object sender, EventArgs e)

VmessItem vmessItem = new VmessItem();
vmessItem.address = address;
vmessItem.port = Convert.ToInt32(port);
vmessItem.port = Utils.ToInt(port);
vmessItem.id = id;
vmessItem.alterId = Convert.ToInt32(alterId);
vmessItem.alterId = Utils.ToInt(alterId);
vmessItem.security = security;
vmessItem.network = network;
vmessItem.remarks = remarks;

vmessItem.headerType = headerType;
vmessItem.requestHost = requestHost.Replace(" ", "");
vmessItem.path = path.Replace(" ", "");
vmessItem.streamSecurity = streamSecurity;

if (ConfigHandler.AddServer(ref config, vmessItem, EditIndex) == 0)
Expand Down Expand Up @@ -234,6 +238,7 @@ private void MenuItemImport(int type)
cmbNetwork.Text = vmessItem.network;
cmbHeaderType.Text = vmessItem.headerType;
txtRequestHost.Text = vmessItem.requestHost;
txtPath.Text = vmessItem.path;
cmbStreamSecurity.Text = vmessItem.streamSecurity;
}

Expand Down Expand Up @@ -262,6 +267,7 @@ private void MenuItemImportClipboard_Click(object sender, EventArgs e)
cmbNetwork.Text = vmessItems[0].network;
cmbHeaderType.Text = vmessItems[0].headerType;
txtRequestHost.Text = vmessItems[0].requestHost;
txtPath.Text = vmessItems[0].path;
cmbStreamSecurity.Text = vmessItems[0].streamSecurity;
}
#endregion
Expand Down
Loading

0 comments on commit 138f59c

Please sign in to comment.