This commit is contained in:
wixy 2019-04-01 08:17:56 +08:00
commit 28af5dc64c
28 changed files with 2759 additions and 0 deletions

BIN
.vs/Ultron.Ngrok/v15/.suo Normal file

Binary file not shown.

22
Ultron.Ngrok.sln Normal file
View File

@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ultron.Ngrok", "Ultron.Ngrok\Ultron.Ngrok.csproj", "{D44A2DC3-FADD-47E7-A311-35C4B3404DFF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D44A2DC3-FADD-47E7-A311-35C4B3404DFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D44A2DC3-FADD-47E7-A311-35C4B3404DFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D44A2DC3-FADD-47E7-A311-35C4B3404DFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D44A2DC3-FADD-47E7-A311-35C4B3404DFF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

BIN
Ultron.Ngrok.v12.suo Normal file

Binary file not shown.

6
Ultron.Ngrok/App.config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>

172
Ultron.Ngrok/Form/AboutBox.Designer.cs generated Normal file
View File

@ -0,0 +1,172 @@
namespace Ultron.Ngrok
{
partial class AboutBox
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox));
this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
this.logoPictureBox = new System.Windows.Forms.PictureBox();
this.labelProductName = new System.Windows.Forms.Label();
this.labelVersion = new System.Windows.Forms.Label();
this.labelCopyright = new System.Windows.Forms.Label();
this.textBoxDescription = new System.Windows.Forms.TextBox();
this.okButton = new System.Windows.Forms.Button();
this.tableLayoutPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit();
this.SuspendLayout();
//
// tableLayoutPanel
//
this.tableLayoutPanel.ColumnCount = 2;
this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F));
this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67F));
this.tableLayoutPanel.Controls.Add(this.logoPictureBox, 0, 0);
this.tableLayoutPanel.Controls.Add(this.labelProductName, 1, 0);
this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1);
this.tableLayoutPanel.Controls.Add(this.labelCopyright, 1, 2);
this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4);
this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5);
this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel.Location = new System.Drawing.Point(9, 8);
this.tableLayoutPanel.Name = "tableLayoutPanel";
this.tableLayoutPanel.RowCount = 6;
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.89362F));
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.31206F));
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.89362F));
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.382979F));
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 26.24113F));
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 24.11348F));
this.tableLayoutPanel.Size = new System.Drawing.Size(417, 141);
this.tableLayoutPanel.TabIndex = 0;
//
// logoPictureBox
//
this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.logoPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image")));
this.logoPictureBox.Location = new System.Drawing.Point(3, 3);
this.logoPictureBox.Name = "logoPictureBox";
this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6);
this.logoPictureBox.Size = new System.Drawing.Size(131, 135);
this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.logoPictureBox.TabIndex = 12;
this.logoPictureBox.TabStop = false;
//
// labelProductName
//
this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelProductName.Location = new System.Drawing.Point(143, 0);
this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelProductName.MaximumSize = new System.Drawing.Size(0, 16);
this.labelProductName.Name = "labelProductName";
this.labelProductName.Size = new System.Drawing.Size(271, 16);
this.labelProductName.TabIndex = 19;
this.labelProductName.Text = "产品名称";
this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelVersion
//
this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelVersion.Location = new System.Drawing.Point(143, 20);
this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelVersion.MaximumSize = new System.Drawing.Size(0, 16);
this.labelVersion.Name = "labelVersion";
this.labelVersion.Size = new System.Drawing.Size(271, 16);
this.labelVersion.TabIndex = 0;
this.labelVersion.Text = "版本";
this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelCopyright
//
this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelCopyright.Location = new System.Drawing.Point(143, 42);
this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 16);
this.labelCopyright.Name = "labelCopyright";
this.labelCopyright.Size = new System.Drawing.Size(271, 16);
this.labelCopyright.TabIndex = 21;
this.labelCopyright.Text = "版权";
this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// textBoxDescription
//
this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBoxDescription.Location = new System.Drawing.Point(143, 73);
this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
this.textBoxDescription.Multiline = true;
this.textBoxDescription.Name = "textBoxDescription";
this.textBoxDescription.ReadOnly = true;
this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBoxDescription.Size = new System.Drawing.Size(271, 29);
this.textBoxDescription.TabIndex = 23;
this.textBoxDescription.TabStop = false;
this.textBoxDescription.Text = "说明";
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.okButton.Location = new System.Drawing.Point(339, 117);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 21);
this.okButton.TabIndex = 24;
this.okButton.Text = "确定(&O)";
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// AboutBox
//
this.AcceptButton = this.okButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(435, 157);
this.Controls.Add(this.tableLayoutPanel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AboutBox";
this.Padding = new System.Windows.Forms.Padding(9, 8, 9, 8);
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "AboutBox";
this.tableLayoutPanel.ResumeLayout(false);
this.tableLayoutPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel;
private System.Windows.Forms.PictureBox logoPictureBox;
private System.Windows.Forms.Label labelProductName;
private System.Windows.Forms.Label labelVersion;
private System.Windows.Forms.Label labelCopyright;
private System.Windows.Forms.TextBox textBoxDescription;
private System.Windows.Forms.Button okButton;
}
}

View File

@ -0,0 +1,110 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Ultron.Ngrok
{
partial class AboutBox : Form
{
public AboutBox()
{
InitializeComponent();
this.Text = String.Format("关于 {0}", AssemblyTitle);
this.labelProductName.Text = AssemblyProduct;
this.labelVersion.Text = String.Format("版本 {0}", AssemblyVersion);
this.labelCopyright.Text = AssemblyCopyright;
this.textBoxDescription.Text = AssemblyDescription;
}
#region 访
public string AssemblyTitle
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
if (attributes.Length > 0)
{
AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
if (titleAttribute.Title != "")
{
return titleAttribute.Title;
}
}
return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
}
}
public string AssemblyVersion
{
get
{
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
}
public string AssemblyDescription
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyDescriptionAttribute)attributes[0]).Description;
}
}
public string AssemblyProduct
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyProductAttribute)attributes[0]).Product;
}
}
public string AssemblyCopyright
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
}
}
public string AssemblyCompany
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyCompanyAttribute)attributes[0]).Company;
}
}
#endregion
private void okButton_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

View File

@ -0,0 +1,406 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="logoPictureBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAMMAAADDCAYAAAA/f6WqAAAABGdBTUEAALGPC/xhBQAAQYhJREFUeF7t
nfd/HNX1/r//yAdblo3BBgwm1MShBEJCSICEBEJCQgjVVAewcQdjg3vvkizZsnrvvUtW7733ZkmuQPLb
8z3n7tzR3dFIWlsra9eaH57XHe2udker857nnDu3/L///u9/sGTJ0v9gwWDJkiYLBkuWNFkwWLKkyYLB
kiVNFgyWLGmyYLgF+um//8Olaz+ge/gy6rsvoqJtEK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AAABJRU5ErkJggg==
</value>
</data>
</root>

276
Ultron.Ngrok/Form/SettingForm.Designer.cs generated Normal file
View File

@ -0,0 +1,276 @@
namespace Ultron.Ngrok
{
partial class SettingForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.TunnelConfigGroupBox = new System.Windows.Forms.GroupBox();
this.enableCBX = new System.Windows.Forms.CheckBox();
this.ipTB = new System.Windows.Forms.TextBox();
this.delButton = new System.Windows.Forms.Button();
this.addButton = new System.Windows.Forms.Button();
this.portTB = new System.Windows.Forms.TextBox();
this.tunnelNameTB = new System.Windows.Forms.TextBox();
this.subdomainTB = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.tunnelTypeLabelPort = new System.Windows.Forms.Label();
this.subdomainLBL = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.tunnelTypeLabel = new System.Windows.Forms.Label();
this.tunnelTypeCMB = new System.Windows.Forms.ComboBox();
this.tunnelListBox = new System.Windows.Forms.ListBox();
this.saveButton = new System.Windows.Forms.Button();
this.TunnelConfigGroupBox.SuspendLayout();
this.SuspendLayout();
//
// TunnelConfigGroupBox
//
this.TunnelConfigGroupBox.Controls.Add(this.enableCBX);
this.TunnelConfigGroupBox.Controls.Add(this.ipTB);
this.TunnelConfigGroupBox.Controls.Add(this.delButton);
this.TunnelConfigGroupBox.Controls.Add(this.addButton);
this.TunnelConfigGroupBox.Controls.Add(this.portTB);
this.TunnelConfigGroupBox.Controls.Add(this.tunnelNameTB);
this.TunnelConfigGroupBox.Controls.Add(this.subdomainTB);
this.TunnelConfigGroupBox.Controls.Add(this.label1);
this.TunnelConfigGroupBox.Controls.Add(this.label2);
this.TunnelConfigGroupBox.Controls.Add(this.label5);
this.TunnelConfigGroupBox.Controls.Add(this.tunnelTypeLabelPort);
this.TunnelConfigGroupBox.Controls.Add(this.subdomainLBL);
this.TunnelConfigGroupBox.Controls.Add(this.label3);
this.TunnelConfigGroupBox.Controls.Add(this.tunnelTypeLabel);
this.TunnelConfigGroupBox.Controls.Add(this.tunnelTypeCMB);
this.TunnelConfigGroupBox.Controls.Add(this.tunnelListBox);
this.TunnelConfigGroupBox.Location = new System.Drawing.Point(12, 12);
this.TunnelConfigGroupBox.Name = "TunnelConfigGroupBox";
this.TunnelConfigGroupBox.Size = new System.Drawing.Size(291, 201);
this.TunnelConfigGroupBox.TabIndex = 8;
this.TunnelConfigGroupBox.TabStop = false;
this.TunnelConfigGroupBox.Text = "通道配置";
//
// enableCBX
//
this.enableCBX.AutoSize = true;
this.enableCBX.Location = new System.Drawing.Point(193, 154);
this.enableCBX.Name = "enableCBX";
this.enableCBX.Size = new System.Drawing.Size(15, 14);
this.enableCBX.TabIndex = 10;
this.enableCBX.UseVisualStyleBackColor = true;
//
// ipTB
//
this.ipTB.Location = new System.Drawing.Point(193, 100);
this.ipTB.Name = "ipTB";
this.ipTB.Size = new System.Drawing.Size(92, 21);
this.ipTB.TabIndex = 9;
//
// delButton
//
this.delButton.Location = new System.Drawing.Point(76, 172);
this.delButton.Name = "delButton";
this.delButton.Size = new System.Drawing.Size(50, 23);
this.delButton.TabIndex = 1;
this.delButton.Text = "删除";
this.delButton.UseVisualStyleBackColor = true;
this.delButton.Click += new System.EventHandler(this.delButton_Click);
//
// addButton
//
this.addButton.Location = new System.Drawing.Point(6, 172);
this.addButton.Name = "addButton";
this.addButton.Size = new System.Drawing.Size(50, 23);
this.addButton.TabIndex = 1;
this.addButton.Text = "新增";
this.addButton.UseVisualStyleBackColor = true;
this.addButton.Click += new System.EventHandler(this.addButton_Click);
//
// portTB
//
this.portTB.Location = new System.Drawing.Point(193, 127);
this.portTB.Name = "portTB";
this.portTB.Size = new System.Drawing.Size(92, 21);
this.portTB.TabIndex = 9;
//
// tunnelNameTB
//
this.tunnelNameTB.Location = new System.Drawing.Point(193, 20);
this.tunnelNameTB.Name = "tunnelNameTB";
this.tunnelNameTB.Size = new System.Drawing.Size(92, 21);
this.tunnelNameTB.TabIndex = 9;
//
// subdomainTB
//
this.subdomainTB.Location = new System.Drawing.Point(193, 47);
this.subdomainTB.Name = "subdomainTB";
this.subdomainTB.Size = new System.Drawing.Size(92, 21);
this.subdomainTB.TabIndex = 9;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(158, 154);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(29, 12);
this.label1.TabIndex = 8;
this.label1.Text = "启用";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(158, 130);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 8;
this.label2.Text = "端口";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(158, 24);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(29, 12);
this.label5.TabIndex = 8;
this.label5.Text = "名称";
//
// tunnelTypeLabelPort
//
this.tunnelTypeLabelPort.AutoSize = true;
this.tunnelTypeLabelPort.Location = new System.Drawing.Point(134, 50);
this.tunnelTypeLabelPort.Name = "tunnelTypeLabelPort";
this.tunnelTypeLabelPort.Size = new System.Drawing.Size(53, 12);
this.tunnelTypeLabelPort.TabIndex = 8;
this.tunnelTypeLabelPort.Text = "远程端口";
this.tunnelTypeLabelPort.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.tunnelTypeLabelPort.Visible = false;
//
// subdomainLBL
//
this.subdomainLBL.AutoSize = true;
this.subdomainLBL.Location = new System.Drawing.Point(146, 50);
this.subdomainLBL.Name = "subdomainLBL";
this.subdomainLBL.Size = new System.Drawing.Size(41, 12);
this.subdomainLBL.TabIndex = 8;
this.subdomainLBL.Text = "子域名";
this.subdomainLBL.Visible = false;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(146, 103);
this.label3.Name = "label3";
this.label3.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 7;
this.label3.Text = "IP地址";
//
// tunnelTypeLabel
//
this.tunnelTypeLabel.AutoSize = true;
this.tunnelTypeLabel.Location = new System.Drawing.Point(134, 77);
this.tunnelTypeLabel.Name = "tunnelTypeLabel";
this.tunnelTypeLabel.Size = new System.Drawing.Size(53, 12);
this.tunnelTypeLabel.TabIndex = 7;
this.tunnelTypeLabel.Text = "通道类型";
//
// tunnelTypeCMB
//
this.tunnelTypeCMB.FormattingEnabled = true;
this.tunnelTypeCMB.Items.AddRange(new object[] {
"TCP",
"HTTP"});
this.tunnelTypeCMB.Location = new System.Drawing.Point(193, 74);
this.tunnelTypeCMB.Name = "tunnelTypeCMB";
this.tunnelTypeCMB.Size = new System.Drawing.Size(92, 20);
this.tunnelTypeCMB.TabIndex = 6;
this.tunnelTypeCMB.SelectedIndexChanged += new System.EventHandler(this.tunnelTypeCMB_SelectedIndexChanged);
//
// tunnelListBox
//
this.tunnelListBox.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tunnelListBox.FormattingEnabled = true;
this.tunnelListBox.ItemHeight = 14;
this.tunnelListBox.Location = new System.Drawing.Point(6, 20);
this.tunnelListBox.Name = "tunnelListBox";
this.tunnelListBox.Size = new System.Drawing.Size(120, 144);
this.tunnelListBox.TabIndex = 5;
this.tunnelListBox.SelectedIndexChanged += new System.EventHandler(this.tunnelListBox_SelectedValueChanged);
//
// saveButton
//
this.saveButton.Location = new System.Drawing.Point(228, 219);
this.saveButton.Name = "saveButton";
this.saveButton.Size = new System.Drawing.Size(75, 23);
this.saveButton.TabIndex = 1;
this.saveButton.Text = "保存";
this.saveButton.UseVisualStyleBackColor = true;
this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
//
// SettingForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(309, 247);
this.Controls.Add(this.TunnelConfigGroupBox);
this.Controls.Add(this.saveButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "SettingForm";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "设置";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.SettingForm_FormClosed);
this.TunnelConfigGroupBox.ResumeLayout(false);
this.TunnelConfigGroupBox.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox TunnelConfigGroupBox;
private System.Windows.Forms.CheckBox enableCBX;
private System.Windows.Forms.TextBox ipTB;
private System.Windows.Forms.Button delButton;
private System.Windows.Forms.Button addButton;
private System.Windows.Forms.Button saveButton;
private System.Windows.Forms.TextBox portTB;
private System.Windows.Forms.TextBox tunnelNameTB;
private System.Windows.Forms.TextBox subdomainTB;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label subdomainLBL;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label tunnelTypeLabel;
private System.Windows.Forms.ComboBox tunnelTypeCMB;
private System.Windows.Forms.ListBox tunnelListBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label tunnelTypeLabelPort;
}
}

View File

@ -0,0 +1,332 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Ultron.Ngrok.Model;
using Ultron.Ngrok.Properties;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
namespace Ultron.Ngrok
{
public partial class SettingForm : Form
{
public delegate void WriteLog(string message);
public event WriteLog WriteLogToForm;
/// <summary>
/// 配置
/// </summary>
public Config ServerConfig { get; set; }
/// <summary>
/// 配置文件
/// </summary>
public string ConfigFile { get; set; }
/// <summary>
/// 执行命令
/// </summary>
public string ExecuteCommand { get; set; }
/// <summary>
/// 执行文件名
/// </summary>
public string ExeFile { get; set; }
public SettingForm()
{
InitializeComponent();
InitFile();
InitConfig();
LoadConfig();
}
public void InitFile()
{
string path = System.IO.Directory.GetCurrentDirectory();
string ngrokFile = string.Empty;
if (Environment.Is64BitOperatingSystem)//判断是否为64位操作系统
{
ngrokFile = path + @"\ngrok_x64.exe";
if (!File.Exists(ngrokFile))
{
FileStream str = new FileStream(ngrokFile, FileMode.OpenOrCreate);
str.Write(Resources.ngrok_x64, 0, Resources.ngrok_x64.Length);
str.Close();
}
ExeFile = "ngrok_x64";
}
else
{
ngrokFile = path + @"\ngrok_x86.exe";
if (!File.Exists(ngrokFile))
{
FileStream str = new FileStream(ngrokFile, FileMode.OpenOrCreate);
str.Write(Resources.ngrok_x86, 0, Resources.ngrok_x86.Length);
str.Close();
}
ExeFile = "ngrok_x86";
}
}
/// <summary>
/// 初始化配置文件
/// </summary>
public void InitConfig()
{
string path = System.IO.Directory.GetCurrentDirectory();
ConfigFile = path + @"\ngrok.cfg";
if (!File.Exists(ConfigFile))
{
FileStream fs1 = new FileStream(ConfigFile, FileMode.Create, FileAccess.Write);//创建写入文件
StreamWriter sw = new StreamWriter(fs1);
ServerConfig = new Config
{
ServerAddr = "ngrok.aaqbee.com:8083",
TrustHostRootCerts = false,
Tunnels = new Dictionary<string, Tunnel>()
};
Tunnel httpTunnel = new Tunnel
{
SubDomain = "test",
TunnelName = "test",
Proto = new Dictionary<string, string>(),
Enable = true,
TunnelID = Guid.NewGuid().ToString()
};
httpTunnel.Proto.Add("http", "127.0.0.1:5000");
ServerConfig.Tunnels.Add(httpTunnel.TunnelID, httpTunnel);
Tunnel tcpTunnel = new Tunnel
{
TunnelName = "mstsc",
RemotePort = 33099,
Proto = new Dictionary<string, string>(),
Enable = true,
TunnelID = Guid.NewGuid().ToString()
};
tcpTunnel.Proto.Add("tcp", "127.0.0.1:1433");
ServerConfig.Tunnels.Add(tcpTunnel.TunnelID, tcpTunnel);
var serializer = new Serializer();
serializer.Serialize(sw, ServerConfig);
sw.Close();
fs1.Close();
}
else
{
string configText = File.ReadAllText(ConfigFile, Encoding.UTF8);
var input = new StringReader(configText);
var deserializer = new Deserializer(namingConvention: new CamelCaseNamingConvention());
ServerConfig = deserializer.Deserialize<Config>(input);
}
this.tunnelListBox.DisplayMember = "TunnelName";
this.tunnelListBox.ValueMember = "TunnelID";
}
/// <summary>
/// 加载配置文件
/// </summary>
public void LoadConfig()
{
tunnelListBox.Items.Clear();
foreach(var item in ServerConfig.Tunnels)
{
tunnelListBox.Items.Add(item.Value);
}
if (tunnelListBox.Items.Count>0)
tunnelListBox.SelectedIndex = 0;
string tunnelName = string.Empty;
foreach (var item in ServerConfig.Tunnels.Where(p => p.Value.Enable))
{
tunnelName += " " + item.Key;
}
ExecuteCommand = ExeFile + ".exe -config ngrok.cfg start" + tunnelName;
}
public void ReLoadConfig()
{
string configText = File.ReadAllText(ConfigFile, Encoding.UTF8);
var input = new StringReader(configText);
var deserializer = new Deserializer(namingConvention: new CamelCaseNamingConvention());
ServerConfig = deserializer.Deserialize<Config>(input);
LoadConfig();
}
/// <summary>
/// 通道类型选择
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void tunnelTypeCMB_SelectedIndexChanged(object sender, EventArgs e)
{
ComboBox cmb = sender as ComboBox;
if (cmb.SelectedItem.ToString() == "HTTP")
{
subdomainLBL.Visible = true;
tunnelTypeLabelPort.Visible = false;
subdomainTB.KeyPress -= subdomainTB_KeyPress;
}
else
{
tunnelTypeLabelPort.Visible = true;
subdomainLBL.Visible = false;
subdomainTB.KeyPress += subdomainTB_KeyPress;
}
}
/// <summary>
/// 子域名框按键释放
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void subdomainTB_KeyPress(object sender, KeyPressEventArgs e)
{
//阻止从键盘输入键
e.Handled = true;
if((e.KeyChar>='0' && e.KeyChar <='9') || e.KeyChar == '\b')
e.Handled = false;
}
/// <summary>
/// 切换通道
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void tunnelListBox_SelectedValueChanged(object sender, EventArgs e)
{
ListBox lbx = sender as ListBox;
if(lbx != null && lbx.SelectedItem != null)
{
Tunnel tunl = lbx.SelectedItem as Tunnel;
tunnelNameTB.Text = tunl.TunnelName;
tunnelTypeCMB.Text = tunl.Proto.ContainsKey("http") ? "HTTP" : "TCP";
if (tunnelTypeCMB.Text == "HTTP")
{
subdomainLBL.Visible = true;
tunnelTypeLabelPort.Visible = false;
subdomainTB.Text = tunl.SubDomain;
}
else
{
tunnelTypeLabelPort.Visible = true;
subdomainLBL.Visible = false;
subdomainTB.Text = tunl.RemotePort.ToString();
}
string ipPort = tunl.Proto.FirstOrDefault().Value;
ipTB.Text = ipPort.Substring(0, ipPort.IndexOf(":"));
portTB.Text = ipPort.Substring(ipPort.IndexOf(":")+1);
enableCBX.Checked = tunl.Enable;
}
}
/// <summary>
/// 删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void delButton_Click(object sender, EventArgs e)
{
ListBox lbx = tunnelListBox as ListBox;
if (lbx != null && lbx.SelectedItem != null)
{
Tunnel tunl = lbx.SelectedItem as Tunnel;
ServerConfig.Tunnels.Remove(tunl.TunnelID);
//SaveConfig();
}
LoadConfig();
}
/// <summary>
/// 新增
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void addButton_Click(object sender, EventArgs e)
{
Tunnel tunl = new Tunnel
{
RemotePort = 33000,
Proto = new Dictionary<string, string>(),
Enable = true,
TunnelID = Guid.NewGuid().ToString(),
TunnelName = "新增通道"
};
tunl.Proto.Add("tcp", "127.0.0.1:80");
ServerConfig.Tunnels.Add(tunl.TunnelID, tunl);
LoadConfig();
tunnelListBox.SelectedItem = tunl;
}
/// <summary>
/// 保存
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void saveButton_Click(object sender, EventArgs e)
{
if (tunnelListBox != null && tunnelListBox.SelectedItem != null)
{
Tunnel tunl = tunnelListBox.SelectedItem as Tunnel;
if (tunnelTypeCMB.Text == "HTTP")
{
tunl.Proto.Clear();
tunl.Proto.Add("http", ipTB.Text + ":" + portTB.Text);
tunl.SubDomain = subdomainTB.Text;
}
else
{
tunl.Proto.Clear();
tunl.Proto.Add("tcp", ipTB.Text + ":" + portTB.Text);
tunl.RemotePort = Int32.Parse(subdomainTB.Text);
}
tunl.TunnelName = tunnelNameTB.Text;
tunl.Enable = enableCBX.Checked;
SaveConfig();
LoadConfig();
}
WriteLogToForm("保存成功");
this.Close();
}
public void SaveConfig()
{
FileStream fs1 = new FileStream(ConfigFile, FileMode.OpenOrCreate, FileAccess.Write);
fs1.Seek(0, SeekOrigin.Begin);
fs1.SetLength(0); //清空文件
var serializer = new Serializer();
StreamWriter sw = new StreamWriter(fs1);
serializer.Serialize(sw, ServerConfig);
sw.Close();
fs1.Close();
}
private void SettingForm_FormClosed(object sender, FormClosedEventArgs e)
{
ReLoadConfig();
}
}
}

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

142
Ultron.Ngrok/FormMain.Designer.cs generated Normal file
View File

@ -0,0 +1,142 @@
namespace Ultron.Ngrok
{
partial class FormMain
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain));
this.cmdLogTextArea = new System.Windows.Forms.TextBox();
this.startBtn = new System.Windows.Forms.Button();
this.endBtn = new System.Windows.Forms.Button();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// cmdLogTextArea
//
this.cmdLogTextArea.BackColor = System.Drawing.SystemColors.Window;
this.cmdLogTextArea.ForeColor = System.Drawing.SystemColors.InfoText;
this.cmdLogTextArea.Location = new System.Drawing.Point(12, 28);
this.cmdLogTextArea.Multiline = true;
this.cmdLogTextArea.Name = "cmdLogTextArea";
this.cmdLogTextArea.ReadOnly = true;
this.cmdLogTextArea.Size = new System.Drawing.Size(339, 129);
this.cmdLogTextArea.TabIndex = 0;
//
// startBtn
//
this.startBtn.Location = new System.Drawing.Point(12, 163);
this.startBtn.Name = "startBtn";
this.startBtn.Size = new System.Drawing.Size(75, 23);
this.startBtn.TabIndex = 1;
this.startBtn.Text = "启动";
this.startBtn.UseVisualStyleBackColor = true;
this.startBtn.Click += new System.EventHandler(this.startBtn_Click);
//
// endBtn
//
this.endBtn.Enabled = false;
this.endBtn.Location = new System.Drawing.Point(276, 163);
this.endBtn.Name = "endBtn";
this.endBtn.Size = new System.Drawing.Size(75, 23);
this.endBtn.TabIndex = 2;
this.endBtn.Text = "结束";
this.endBtn.UseVisualStyleBackColor = true;
this.endBtn.Click += new System.EventHandler(this.endBtn_Click);
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem,
this.ToolStripMenuItem,
this.ToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(362, 25);
this.menuStrip1.TabIndex = 4;
this.menuStrip1.Text = "menuStrip1";
//
// 设置ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "设置ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
this.ToolStripMenuItem.Text = "设置";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 帮助ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "帮助ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
this.ToolStripMenuItem.Text = "帮助";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 关于ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "关于ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
this.ToolStripMenuItem.Text = "关于";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// FormMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(362, 194);
this.Controls.Add(this.endBtn);
this.Controls.Add(this.startBtn);
this.Controls.Add(this.cmdLogTextArea);
this.Controls.Add(this.menuStrip1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.MaximizeBox = false;
this.Name = "FormMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "uNgrok";
this.Load += new System.EventHandler(this.FormMain_Load);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
public System.Windows.Forms.TextBox cmdLogTextArea;
private System.Windows.Forms.Button startBtn;
private System.Windows.Forms.Button endBtn;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
}
}

181
Ultron.Ngrok/FormMain.cs Normal file
View File

@ -0,0 +1,181 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Threading;
using System.Text.RegularExpressions;
using System.IO;
using System.Net.NetworkInformation;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
using Ultron.Ngrok.Utils;
using Ultron.Ngrok.Model;
using Ultron.Ngrok.Properties;
namespace Ultron.Ngrok
{
public partial class FormMain : Form
{
CmdUtils cmd = new CmdUtils();
SettingForm setting;
public FormMain()
{
//引用资源处理
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
//初始化
InitializeComponent();
//初始化配置
InitSetting();
}
Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
string dllName = args.Name.Contains(",") ? args.Name.Substring(0, args.Name.IndexOf(',')) : args.Name.Replace(".dll", "");
dllName = dllName.Replace(".", "_");
if (dllName.EndsWith("_resources")) return null;
ResourceManager rm = new ResourceManager(GetType().Namespace + ".Properties.Resources", Assembly.GetExecutingAssembly());
byte[] bytes = (byte[])rm.GetObject(dllName);
return Assembly.Load(bytes);
}
public void CheckProcessAndKill(string processName)
{
Process[] proces = Process.GetProcessesByName(processName);
foreach (var item in proces)
{
WriteLog("检测到进程:" + item.ProcessName + "ID" + item.Id + "");
item.Kill();
WriteLog("结束进程:" + item.Id + "");
}
}
public void CheckProcessAndKill(int id)
{
Process proces = Process.GetProcessById(id);
if (proces != null)
{
WriteLog("检测到进程:" + proces.ProcessName + "ID" + proces.Id + "");
proces.Kill();
WriteLog("结束进程:" + proces.Id + "");
}
}
public void InitSetting()
{
setting = new SettingForm();
setting.WriteLogToForm += WriteLog;
}
private void InitCmd() {
//创建CMD
cmd.ProcessMessageEvent += DealMessage;
cmd.ProcessKilled += cmd_Exited;
}
private void startBtn_Click(object sender, EventArgs e)
{
//网络检测
NetworkUtils.CheckServeStatus(this);
cmd.SendMsg(setting.ExecuteCommand);
startBtn.Enabled = false;
endBtn.Enabled = true;
}
private void endBtn_Click(object sender, EventArgs e)
{
CheckProcessAndKill(setting.ExeFile);
cmd.CloseCmd();
startBtn.Enabled = true;
endBtn.Enabled = false;
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
AboutBox about = new AboutBox();
about.ShowDialog();
}
private void FormMain_Load(object sender, EventArgs e)
{
//进程检测
CheckProcessAndKill(setting.ExeFile);
//初始化CMD
new Thread(new ThreadStart(InitCmd)).Start();
}
public void DealMessage(int proId,string message)
{
if (message.StartsWith("Server failed to allocate tunnel"))
{
if (message.Contains("address already in use"))
{
string tcpErr = message.Substring(message.IndexOf("listen tcp"));
WriteLog(tcpErr);
int domainIndex = message.IndexOf("0.0.0.0:") + 8;
int portIndex = message.IndexOf(": bind:");
string port = message.Substring(domainIndex, portIndex - domainIndex);
MessageBox.Show("通道分配失败,端口:" + port + "已被使用!");
}
else if (message.Contains("is already registered"))
{
string tcpErr = message.Substring(message.IndexOf("The tunnel "));
WriteLog(tcpErr);
int domainIndex = message.IndexOf("http://");
int strIndex = message.IndexOf("is already");
string domain = message.Substring(domainIndex, strIndex - domainIndex);
MessageBox.Show("通道分配失败,域名:" + domain + "已被使用!");
}
CheckProcessAndKill(proId);
startBtn.Enabled = true;
endBtn.Enabled = false;
}
else
{
if (message.Contains("Microsoft Windows") || message.Contains("Microsoft Corporation") || message.Contains(".exe -config ngrok.cfg start"))
return;
WriteLog(message);
}
}
public void WriteLog(string message)
{
StringBuilder sb = new StringBuilder(cmdLogTextArea.Text);
cmdLogTextArea.Text = sb.AppendLine(DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss ") + message).ToString();
cmdLogTextArea.SelectionStart = cmdLogTextArea.Text.Length;
cmdLogTextArea.ScrollToCaret();
}
public void cmd_Exited(object sender, EventArgs e)
{
WriteLog("结束运行!");
startBtn.Enabled = true;
endBtn.Enabled = false;
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
setting.ReLoadConfig();
setting.ShowDialog();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
}
}

200
Ultron.Ngrok/FormMain.resx Normal file
View File

@ -0,0 +1,200 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAMMOAADDDgAAAAAAAAAA
AAA/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/
P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/
P/8/Pz//Pj4+/z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/
P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8/
P/8/Pz//Pz8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/Pz//Pz8//z8/P/8/Pz//Pz8//z8/
P/8/Pz//Pz8//z8/P/8+Pj7/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
</value>
</data>
</root>

View File

@ -0,0 +1,60 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YamlDotNet.Serialization;
namespace Ultron.Ngrok.Model
{
public class Config
{
[YamlMember(Alias = "http_proxy")]
public string HttpProxy { get; set; }
[YamlMember(Alias = "server_addr")]
public string ServerAddr { get; set; }
[YamlMember(Alias = "inspect_addr")]
public string InspectAddr { get; set; }
[YamlMember(Alias = "trust_host_root_certs")]
public bool TrustHostRootCerts { get; set; }
[YamlMember(Alias = "version")]
public string Version { get; set; }
[YamlMember(Alias = "auth_token")]
public string AuthToken { get; set; }
[YamlMember(Alias = "tunnels")]
public Dictionary<string, Tunnel> Tunnels { get; set; }
}
public class Tunnel
{
[YamlMember(Alias = "tunnel_id")]
public string TunnelID { get; set; }
[YamlMember(Alias = "tunnel_name")]
public string TunnelName { get; set; }
[YamlMember(Alias = "subdomain")]
public string SubDomain { get; set; }
[YamlMember(Alias = "hostname")]
public string HostName { get; set; }
[YamlMember(Alias = "proto")]
public Dictionary<string, string> Proto { get; set; }
[YamlMember(Alias = "auth")]
public string Auth { get; set; }
[YamlMember(Alias = "remote_port")]
public int RemotePort { get; set; }
[YamlMember(Alias = "enable")]
public bool Enable { get; set; }
}
}

22
Ultron.Ngrok/Program.cs Normal file
View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Ultron.Ngrok
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FormMain());
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Ultron.Ngrok")]
[assembly: AssemblyDescription("内网穿透工具")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Ultron.Ngrok")]
[assembly: AssemblyCopyright("Copyright © WangYu 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("84c08c82-cabc-46af-b99a-7057abbc994d")]
// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,93 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Ultron.Ngrok.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Ultron.Ngrok.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找 System.Byte[] 类型的本地化资源。
/// </summary>
internal static byte[] ngrok_x64 {
get {
object obj = ResourceManager.GetObject("ngrok_x64", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// 查找 System.Byte[] 类型的本地化资源。
/// </summary>
internal static byte[] ngrok_x86 {
get {
object obj = ResourceManager.GetObject("ngrok_x86", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// 查找 System.Byte[] 类型的本地化资源。
/// </summary>
internal static byte[] YamlDotNet {
get {
object obj = ResourceManager.GetObject("YamlDotNet", resourceCulture);
return ((byte[])(obj));
}
}
}
}

View File

@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="ngrok_x64" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ngrok_x64.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="ngrok_x86" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ngrok_x86.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="YamlDotNet" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\YamlDotNet.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Ultron.Ngrok.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,162 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D44A2DC3-FADD-47E7-A311-35C4B3404DFF}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Ultron.Ngrok</RootNamespace>
<AssemblyName>uNgrok</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>发布\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="YamlDotNet, Version=3.8.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\YamlDotNet.3.8.0\lib\net35\YamlDotNet.dll</HintPath>
<Private>True</Private>
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Form\AboutBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form\AboutBox.Designer.cs">
<DependentUpon>AboutBox.cs</DependentUpon>
</Compile>
<Compile Include="FormMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FormMain.Designer.cs">
<DependentUpon>FormMain.cs</DependentUpon>
</Compile>
<Compile Include="Model\Config.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Form\SettingForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form\SettingForm.Designer.cs">
<DependentUpon>SettingForm.cs</DependentUpon>
</Compile>
<Compile Include="Utils\CmdUtils.cs" />
<Compile Include="Utils\NetworkUtils.cs" />
<EmbeddedResource Include="Form\AboutBox.resx">
<DependentUpon>AboutBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FormMain.resx">
<DependentUpon>FormMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="Form\SettingForm.resx">
<DependentUpon>SettingForm.cs</DependentUpon>
</EmbeddedResource>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\ngrok_x64.exe" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\ngrok_x86.exe" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5 %28x86 和 x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="Resources\YamlDotNet.dll" />
</ItemGroup>
<ItemGroup>
<Content Include="Resources\icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>发布\</PublishUrlHistory>
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>zh-CN</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
<ProjectView>ProjectFiles</ProjectView>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,100 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Ultron.Ngrok.Utils
{
public class CmdUtils
{
public delegate void ProcessInfomation(int id, string message);
public event ProcessInfomation ProcessMessageEvent;
public event EventHandler ProcessKilled;
Process cmd = new Process();
public bool IsInited = false;
public CmdUtils()
{
Control.CheckForIllegalCrossThreadCalls = false;
}
public void Init()
{
cmd = new Process();//创建进程对象
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "cmd.exe";//设定需要执行的命令
startInfo.Arguments = "";//“/C”表示执行完命令后马上退出
startInfo.UseShellExecute = false;//不使用系统外壳程序启动
startInfo.RedirectStandardInput = true;//不重定向输入
startInfo.RedirectStandardOutput = true; //重定向输出
startInfo.CreateNoWindow = false;//不创建窗口
cmd.StartInfo = startInfo;
cmd.EnableRaisingEvents = true;
cmd.OutputDataReceived -= new DataReceivedEventHandler(OutputHandler);
cmd.OutputDataReceived += new DataReceivedEventHandler(OutputHandler);
cmd.Exited += ProcessKilled;
cmd.Start();
cmd.BeginOutputReadLine();
}
void cmd_Exited(object sender, EventArgs e)
{
}
private void OutputHandler(object sender, DataReceivedEventArgs e)
{
if (!String.IsNullOrEmpty(e.Data))
{
ProcessMessageEvent(cmd.Id, e.Data);
}
}
public void SendMsg(string cmdStr)
{
ProcessMessageEvent(0, "开始运行...");
if (!IsInited || cmd.HasExited)
{
cmd = new Process();//创建进程对象
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "cmd.exe";//设定需要执行的命令
startInfo.Arguments = "";//“/C”表示执行完命令后马上退出
startInfo.UseShellExecute = false;//不使用系统外壳程序启动
startInfo.RedirectStandardInput = true;//不重定向输入
startInfo.RedirectStandardOutput = true; //重定向输出
startInfo.CreateNoWindow = false;//不创建窗口
cmd.StartInfo = startInfo;
cmd.EnableRaisingEvents = true;
cmd.OutputDataReceived -= new DataReceivedEventHandler(OutputHandler);
cmd.OutputDataReceived += new DataReceivedEventHandler(OutputHandler);
cmd.Exited += ProcessKilled;
cmd.Start();
cmd.BeginOutputReadLine();
IsInited = true;
}
cmd.StandardInput.WriteLine(cmdStr);
}
public void CloseCmd()
{
if (cmd != null && !cmd.HasExited)
cmd.Kill() ;
}
}
}

View File

@ -0,0 +1,135 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Ultron.Ngrok.Utils
{
public class NetworkUtils
{
public static string url = "www.baidu.com;www.sina.com;www.163.com;ngrok.aaqbee.com";
public static string[] urls = url.Split(new char[] { ';' });
public static FormMain fm = null;
public static void RwiteLog(string message)
{
StringBuilder sb = new StringBuilder(NetworkUtils.fm.cmdLogTextArea.Text);
NetworkUtils.fm.cmdLogTextArea.Text = sb.AppendLine(message).ToString();
NetworkUtils.fm.cmdLogTextArea.SelectionStart = fm.cmdLogTextArea.Text.Length;
NetworkUtils.fm.cmdLogTextArea.ScrollToCaret();
}
/// <summary>
/// 检测网络连接状态
/// </summary>
/// <param name="urls"></param>
public static void CheckServeStatus(FormMain form)
{
Control.CheckForIllegalCrossThreadCalls = false;
NetworkUtils.fm = form;
int errCount = 0;//ping时连接失败个数
NetworkUtils.RwiteLog("开始检测网络...");
string checkMsg = string.Empty;
if (!LocalConnectionStatus())
{
checkMsg = "网络异常--无连接";
}
else if (!MyPing(urls, out errCount))
{
if ((double)errCount / urls.Length >= 0.3)
{
checkMsg = "网络异常--连接多次无响应";
}
else
{
checkMsg = "网络不稳定";
}
}
else
{
checkMsg = "网络正常";
}
NetworkUtils.RwiteLog(checkMsg);
NetworkUtils.RwiteLog("网络检测结束...");
}
private const int INTERNET_CONNECTION_MODEM = 1;
private const int INTERNET_CONNECTION_LAN = 2;
[System.Runtime.InteropServices.DllImport("winInet.dll")]
private static extern bool InternetGetConnectedState(ref int dwFlag, int dwReserved);
/// <summary>
/// 判断本地的连接状态
/// </summary>
/// <returns></returns>
private static bool LocalConnectionStatus()
{
System.Int32 dwFlag = new Int32();
if (!InternetGetConnectedState(ref dwFlag, 0))
{
NetworkUtils.RwiteLog("本地连接状态--未连网!");
return false;
}
else
{
if ((dwFlag & INTERNET_CONNECTION_MODEM) != 0)
{
//NetworkUtils.RwiteLog("本地连接状态--采用调制解调器上网。");
return true;
}
else if ((dwFlag & INTERNET_CONNECTION_LAN) != 0)
{
//NetworkUtils.RwiteLog("本地连接状态--采用网卡上网。");
return true;
}
}
return false;
}
/// <summary>
/// Ping命令检测网络是否畅通
/// </summary>
/// <param name="urls">URL数据</param>
/// <param name="errorCount">ping时连接失败个数</param>
/// <returns></returns>
public static bool MyPing(string[] urls, out int errorCount)
{
bool isconn = true;
Ping ping = new Ping();
errorCount = 0;
try
{
PingReply pr;
for (int i = 0; i < urls.Length; i++)
{
pr = ping.Send(urls[i]);
if (pr.Status != IPStatus.Success)
{
isconn = false;
errorCount++;
}
//NetworkUtils.RwiteLog("Ping " + urls[i] + " " + pr.Status.ToString());
}
}
catch
{
isconn = false;
errorCount = urls.Length;
}
//if (errorCount > 0 && errorCount < 3)
// isconn = true;
return isconn;
}
}
}