commit 2f58b4a76fae5ee24071d11e75f9ebaba0ed8983 Author: xeons Date: Mon Jun 29 20:34:25 2015 -0500 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1c8ad5f --- /dev/null +++ b/.gitignore @@ -0,0 +1,205 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Visual Studio 2015 cache/options directory +.vs/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt \ No newline at end of file diff --git a/ProxyServerSharp.sln b/ProxyServerSharp.sln new file mode 100644 index 0000000..1281733 --- /dev/null +++ b/ProxyServerSharp.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProxyServerSharp", "ProxyServerSharp\ProxyServerSharp.csproj", "{FF0A1461-B06D-4B10-9E9E-811913808C28}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FF0A1461-B06D-4B10-9E9E-811913808C28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF0A1461-B06D-4B10-9E9E-811913808C28}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF0A1461-B06D-4B10-9E9E-811913808C28}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF0A1461-B06D-4B10-9E9E-811913808C28}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/ProxyServerSharp/Core/SOCKS4Server.cs b/ProxyServerSharp/Core/SOCKS4Server.cs new file mode 100644 index 0000000..19d5c3f --- /dev/null +++ b/ProxyServerSharp/Core/SOCKS4Server.cs @@ -0,0 +1,213 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; +using System.Net.Sockets; +using System.Net; + +namespace ProxyServerSharp +{ + class ConnectionInfo + { + public Socket LocalSocket; + public Thread LocalThread; + public Socket RemoteSocket; + public Thread RemoteThread; + } + + public delegate void ConnectEventHandler(object sender, IPEndPoint iep); + public delegate void ConnectionLogHandler(object sender, int code, string message); + + class SOCKS4Server + { + private Socket _serverSocket; + private int _port; + private int _transferUnitSize; + private Thread _acceptThread; + private List _connections = + new List(); + + public event ConnectEventHandler LocalConnect; + public event ConnectEventHandler RemoteConnect; + + public SOCKS4Server(int port, int transferUnitSize) + { + _port = port; + _transferUnitSize = transferUnitSize; + } + + public void Start() + { + SetupServerSocket(); + + _acceptThread = new Thread(AcceptConnections); + _acceptThread.IsBackground = true; + _acceptThread.Start(); + } + + private void SetupServerSocket() + { + IPEndPoint myEndpoint = new IPEndPoint(IPAddress.Loopback, + _port); + + // Create the socket, bind it, and start listening + _serverSocket = new Socket(myEndpoint.Address.AddressFamily, + SocketType.Stream, ProtocolType.Tcp); + _serverSocket.Bind(myEndpoint); + _serverSocket.Listen((int)SocketOptionName.MaxConnections); + } + + private void AcceptConnections() + { + while (true) + { + // Accept a connection + ConnectionInfo connection = new ConnectionInfo(); + + Socket socket = _serverSocket.Accept(); + + connection.LocalSocket = socket; + connection.RemoteSocket = new Socket(AddressFamily.InterNetwork, + SocketType.Stream, ProtocolType.Tcp); + + // Create the thread for the receives. + connection.LocalThread = new Thread(ProcessLocalConnection); + connection.LocalThread.IsBackground = true; + connection.LocalThread.Start(connection); + + if (LocalConnect != null) + LocalConnect(this, (IPEndPoint)socket.RemoteEndPoint); + + // Store the socket + lock (_connections) _connections.Add(connection); + } + } + + private void ProcessLocalConnection(object state) + { + ConnectionInfo connection = (ConnectionInfo)state; + int bytesRead = 0; + + byte[] buffer = new byte[_transferUnitSize]; + try + { + // we are setting up the socks! + bytesRead = connection.LocalSocket.Receive(buffer); + + Console.WriteLine("ProcessLocalConnection::Receive bytesRead={0}", bytesRead); + for (int i = 0; i < bytesRead; i++) + Console.Write("{0:X2} ", buffer[i]); + Console.Write("\n"); + + if (bytesRead > 0) + { + if (buffer[0] == 0x04 && buffer[1] == 0x01) + { + int remotePort = buffer[2] << 8 | buffer[3]; + byte[] ipAddressBuffer = new byte[4]; + Buffer.BlockCopy(buffer, 4, ipAddressBuffer, 0, 4); + + IPEndPoint remoteEndPoint = new IPEndPoint(new IPAddress(ipAddressBuffer), remotePort); + + connection.RemoteSocket.Connect(remoteEndPoint); + if (connection.RemoteSocket.Connected) + { + Console.WriteLine("Connected to remote!"); + + if (RemoteConnect != null) + RemoteConnect(this, remoteEndPoint); + + byte[] socksResponse = new byte[] { + 0x00, 0x5a, + buffer[2], buffer[3], // port + buffer[4], buffer[5], buffer[6], buffer[7] // IP + }; + connection.LocalSocket.Send(socksResponse); + + // Create the thread for the receives. + connection.RemoteThread = new Thread(ProcessRemoteConnection); + connection.RemoteThread.IsBackground = true; + connection.RemoteThread.Start(connection); + } + else + { + Console.WriteLine("Connection failed."); + byte[] socksResponse = new byte[] { + 0x04, + 0x5b, + buffer[2], buffer[3], // port + buffer[4], buffer[5], buffer[6], buffer[7] // IP + }; + connection.LocalSocket.Send(socksResponse); + return; + + } + } + } + else if (bytesRead == 0) return; + + // start receiving actual data + while (true) + { + bytesRead = connection.LocalSocket.Receive(buffer); + if (bytesRead == 0) { + Console.WriteLine("Local connection closed!"); + break; + } else { + connection.RemoteSocket.Send(buffer, bytesRead, SocketFlags.None); + } + } + } + catch (Exception exc) + { + Console.WriteLine("Exception: " + exc); + } + finally + { + Console.WriteLine("ProcessLocalConnection Cleaning up..."); + connection.LocalSocket.Close(); + connection.RemoteSocket.Close(); + lock (_connections) _connections.Remove(connection); + } + } + + private void ProcessRemoteConnection(object state) + { + ConnectionInfo connection = (ConnectionInfo)state; + int bytesRead = 0; + + byte[] buffer = new byte[_transferUnitSize]; + try + { + // start receiving actual data + while (true) + { + bytesRead = connection.RemoteSocket.Receive(buffer); + if (bytesRead == 0) { + Console.WriteLine("Remote connection closed!"); + break; + } else { + connection.LocalSocket.Send(buffer, bytesRead, SocketFlags.None); + } + } + } + catch (SocketException exc) + { + Console.WriteLine("Socket exception: " + exc.SocketErrorCode); + } + catch (Exception exc) + { + Console.WriteLine("Exception: " + exc); + } + finally + { + Console.WriteLine("ProcessRemoteConnection Cleaning up..."); + connection.LocalSocket.Close(); + connection.RemoteSocket.Close(); + lock (_connections) + _connections.Remove(connection); + } + } + } + +} diff --git a/ProxyServerSharp/MainForm.Designer.cs b/ProxyServerSharp/MainForm.Designer.cs new file mode 100644 index 0000000..da8e725 --- /dev/null +++ b/ProxyServerSharp/MainForm.Designer.cs @@ -0,0 +1,147 @@ +namespace ProxyServerSharp +{ + partial class MainForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.startProxyButton = new System.Windows.Forms.Button(); + this.statusCaptionLabel = new System.Windows.Forms.Label(); + this.statusLabel = new System.Windows.Forms.Label(); + this.debugTextBox = new System.Windows.Forms.TextBox(); + this.transferUnitSizeLabel = new System.Windows.Forms.Label(); + this.transferUnitSizeComboBox = new System.Windows.Forms.ComboBox(); + this.portLabel = new System.Windows.Forms.Label(); + this.portTextBox = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // startProxyButton + // + this.startProxyButton.Location = new System.Drawing.Point(448, 168); + this.startProxyButton.Name = "startProxyButton"; + this.startProxyButton.Size = new System.Drawing.Size(64, 24); + this.startProxyButton.TabIndex = 0; + this.startProxyButton.Text = "Start"; + this.startProxyButton.UseVisualStyleBackColor = true; + this.startProxyButton.Click += new System.EventHandler(this.startProxyButton_Click); + // + // statusCaptionLabel + // + this.statusCaptionLabel.AutoSize = true; + this.statusCaptionLabel.Location = new System.Drawing.Point(8, 8); + this.statusCaptionLabel.Name = "statusCaptionLabel"; + this.statusCaptionLabel.Size = new System.Drawing.Size(40, 13); + this.statusCaptionLabel.TabIndex = 1; + this.statusCaptionLabel.Text = "Status:"; + // + // statusLabel + // + this.statusLabel.AutoSize = true; + this.statusLabel.Location = new System.Drawing.Point(56, 8); + this.statusLabel.Name = "statusLabel"; + this.statusLabel.Size = new System.Drawing.Size(33, 13); + this.statusLabel.TabIndex = 2; + this.statusLabel.Text = "Idle..."; + // + // debugTextBox + // + this.debugTextBox.Location = new System.Drawing.Point(8, 32); + this.debugTextBox.Multiline = true; + this.debugTextBox.Name = "debugTextBox"; + this.debugTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.debugTextBox.Size = new System.Drawing.Size(504, 128); + this.debugTextBox.TabIndex = 3; + // + // transferUnitSizeLabel + // + this.transferUnitSizeLabel.AutoSize = true; + this.transferUnitSizeLabel.Location = new System.Drawing.Point(8, 172); + this.transferUnitSizeLabel.Name = "transferUnitSizeLabel"; + this.transferUnitSizeLabel.Size = new System.Drawing.Size(128, 13); + this.transferUnitSizeLabel.TabIndex = 4; + this.transferUnitSizeLabel.Text = "Transfer Unit Size (bytes):"; + // + // transferUnitSizeComboBox + // + this.transferUnitSizeComboBox.FormattingEnabled = true; + this.transferUnitSizeComboBox.Location = new System.Drawing.Point(144, 168); + this.transferUnitSizeComboBox.Name = "transferUnitSizeComboBox"; + this.transferUnitSizeComboBox.Size = new System.Drawing.Size(120, 21); + this.transferUnitSizeComboBox.TabIndex = 5; + // + // portLabel + // + this.portLabel.AutoSize = true; + this.portLabel.Location = new System.Drawing.Point(8, 196); + this.portLabel.Name = "portLabel"; + this.portLabel.Size = new System.Drawing.Size(29, 13); + this.portLabel.TabIndex = 6; + this.portLabel.Text = "Port:"; + // + // portTextBox + // + this.portTextBox.Location = new System.Drawing.Point(144, 192); + this.portTextBox.Name = "portTextBox"; + this.portTextBox.Size = new System.Drawing.Size(72, 20); + this.portTextBox.TabIndex = 7; + this.portTextBox.Text = "1080"; + this.portTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(537, 222); + this.Controls.Add(this.portTextBox); + this.Controls.Add(this.portLabel); + this.Controls.Add(this.transferUnitSizeComboBox); + this.Controls.Add(this.transferUnitSizeLabel); + this.Controls.Add(this.debugTextBox); + this.Controls.Add(this.statusLabel); + this.Controls.Add(this.statusCaptionLabel); + this.Controls.Add(this.startProxyButton); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Name = "MainForm"; + this.Text = "SOCKS4 Server "; + this.Load += new System.EventHandler(this.Form1_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button startProxyButton; + private System.Windows.Forms.Label statusCaptionLabel; + private System.Windows.Forms.Label statusLabel; + private System.Windows.Forms.TextBox debugTextBox; + private System.Windows.Forms.Label transferUnitSizeLabel; + private System.Windows.Forms.ComboBox transferUnitSizeComboBox; + private System.Windows.Forms.Label portLabel; + private System.Windows.Forms.TextBox portTextBox; + } +} + diff --git a/ProxyServerSharp/MainForm.cs b/ProxyServerSharp/MainForm.cs new file mode 100644 index 0000000..f6b5e56 --- /dev/null +++ b/ProxyServerSharp/MainForm.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace ProxyServerSharp +{ + public partial class MainForm : Form + { + SOCKS4Server server; + + public MainForm() + { + InitializeComponent(); + } + + private void Form1_Load(object sender, EventArgs e) + { + for (int i = 8; i < 16; i++) + transferUnitSizeComboBox.Items.Add(Math.Pow(2, i).ToString()); + + transferUnitSizeComboBox.SelectedIndex = 4; + } + + void server_RemoteConnect(object sender, System.Net.IPEndPoint iep) + { + if (this.InvokeRequired) + { + this.BeginInvoke(new MethodInvoker(delegate() + { + debugTextBox.AppendText("Connecting to " + iep.ToString() + "\r\n"); + })); + } + } + + void server_LocalConnect(object sender, System.Net.IPEndPoint iep) + { + if (this.InvokeRequired) + { + this.BeginInvoke(new MethodInvoker(delegate() + { + debugTextBox.AppendText("Connection from " + iep.ToString() + "\r\n"); + })); + } + } + + private void startProxyButton_Click(object sender, EventArgs e) + { + if (startProxyButton.Text == "Start") + { + server = new SOCKS4Server(int.Parse(portTextBox.Text), + int.Parse((string)transferUnitSizeComboBox.SelectedItem)); + server.LocalConnect += new ConnectEventHandler(server_LocalConnect); + server.RemoteConnect += new ConnectEventHandler(server_RemoteConnect); + server.Start(); + statusLabel.Text = "Started"; + startProxyButton.Text = "Stop"; + } + else + { + // + } + } + } +} diff --git a/ProxyServerSharp/MainForm.resx b/ProxyServerSharp/MainForm.resx new file mode 100644 index 0000000..19dc0dd --- /dev/null +++ b/ProxyServerSharp/MainForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ProxyServerSharp/Program.cs b/ProxyServerSharp/Program.cs new file mode 100644 index 0000000..ed69266 --- /dev/null +++ b/ProxyServerSharp/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace ProxyServerSharp +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainForm()); + } + } +} diff --git a/ProxyServerSharp/Properties/AssemblyInfo.cs b/ProxyServerSharp/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1a69ec6 --- /dev/null +++ b/ProxyServerSharp/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ProxyServerSharp")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Xeon Productions")] +[assembly: AssemblyProduct("ProxyServerSharp")] +[assembly: AssemblyCopyright("Copyright © Xeon Productions 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8f2dada6-aea7-43c3-a967-b1ef475072e2")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ProxyServerSharp/Properties/Resources.Designer.cs b/ProxyServerSharp/Properties/Resources.Designer.cs new file mode 100644 index 0000000..1b81cf9 --- /dev/null +++ b/ProxyServerSharp/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34209 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ProxyServerSharp.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [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() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [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("ProxyServerSharp.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/ProxyServerSharp/Properties/Resources.resx b/ProxyServerSharp/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/ProxyServerSharp/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ProxyServerSharp/Properties/Settings.Designer.cs b/ProxyServerSharp/Properties/Settings.Designer.cs new file mode 100644 index 0000000..d848422 --- /dev/null +++ b/ProxyServerSharp/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34209 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ProxyServerSharp.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; + } + } + } +} diff --git a/ProxyServerSharp/Properties/Settings.settings b/ProxyServerSharp/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/ProxyServerSharp/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ProxyServerSharp/ProxyServerSharp.csproj b/ProxyServerSharp/ProxyServerSharp.csproj new file mode 100644 index 0000000..33ede24 --- /dev/null +++ b/ProxyServerSharp/ProxyServerSharp.csproj @@ -0,0 +1,87 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {FF0A1461-B06D-4B10-9E9E-811913808C28} + WinExe + Properties + ProxyServerSharp + ProxyServerSharp + v2.0 + 512 + + + + + 3.5 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + Form + + + MainForm.cs + + + + + MainForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + \ No newline at end of file