Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Proxy Info - Form1.vb

Form1.vb

Caricato da:
Scarica il programma completo

  1. Imports System
  2. Imports System.Data
  3. Imports System.Net
  4. Imports System.Net.Sockets
  5. Imports System.Exception
  6. Public Class Form1
  7.     Inherits System.Windows.Forms.Form
  8.     Dim sck As Socket
  9.     Dim proxy As IPEndPoint
  10.  
  11. #Region " Windows Form Designer generated code "
  12.  
  13.     Public Sub New()
  14.         MyBase.New()
  15.  
  16.         'This call is required by the Windows Form Designer.
  17.         InitializeComponent()
  18.  
  19.         'Add any initialization after the InitializeComponent() call
  20.  
  21.     End Sub
  22.  
  23.     'Form overrides dispose to clean up the component list.
  24.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  25.         If disposing Then
  26.             If Not (components Is Nothing) Then
  27.                 components.Dispose()
  28.             End If
  29.         End If
  30.         MyBase.Dispose(disposing)
  31.     End Sub
  32.  
  33.     'Required by the Windows Form Designer
  34.     Private components As System.ComponentModel.IContainer
  35.  
  36.     'NOTE: The following procedure is required by the Windows Form Designer
  37.     'It can be modified using the Windows Form Designer.  
  38.     'Do not modify it using the code editor.
  39.     Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
  40.     Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
  41.     Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
  42.     Friend WithEvents Label1 As System.Windows.Forms.Label
  43.     Friend WithEvents Label2 As System.Windows.Forms.Label
  44.     Friend WithEvents Button1 As System.Windows.Forms.Button
  45.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  46.         Me.GroupBox1 = New System.Windows.Forms.GroupBox
  47.         Me.Button1 = New System.Windows.Forms.Button
  48.         Me.Label2 = New System.Windows.Forms.Label
  49.         Me.Label1 = New System.Windows.Forms.Label
  50.         Me.TextBox2 = New System.Windows.Forms.TextBox
  51.         Me.TextBox1 = New System.Windows.Forms.TextBox
  52.         Me.GroupBox1.SuspendLayout()
  53.         Me.SuspendLayout()
  54.         '
  55.         'GroupBox1
  56.         '
  57.         Me.GroupBox1.Controls.Add(Me.Button1)
  58.         Me.GroupBox1.Controls.Add(Me.Label2)
  59.         Me.GroupBox1.Controls.Add(Me.Label1)
  60.         Me.GroupBox1.Controls.Add(Me.TextBox2)
  61.         Me.GroupBox1.Controls.Add(Me.TextBox1)
  62.         Me.GroupBox1.Location = New System.Drawing.Point(8, 8)
  63.         Me.GroupBox1.Name = "GroupBox1"
  64.         Me.GroupBox1.Size = New System.Drawing.Size(288, 152)
  65.         Me.GroupBox1.TabIndex = 0
  66.         Me.GroupBox1.TabStop = False
  67.         Me.GroupBox1.Text = "Settings"
  68.         '
  69.         'Button1
  70.         '
  71.         Me.Button1.Location = New System.Drawing.Point(56, 120)
  72.         Me.Button1.Name = "Button1"
  73.         Me.Button1.Size = New System.Drawing.Size(176, 24)
  74.         Me.Button1.TabIndex = 4
  75.         Me.Button1.Text = "TeST PrOxY"
  76.         '
  77.         'Label2
  78.         '
  79.         Me.Label2.Location = New System.Drawing.Point(8, 16)
  80.         Me.Label2.Name = "Label2"
  81.         Me.Label2.Size = New System.Drawing.Size(112, 16)
  82.         Me.Label2.TabIndex = 3
  83.         Me.Label2.Text = "iP PrOxY:"
  84.         '
  85.         'Label1
  86.         '
  87.         Me.Label1.Location = New System.Drawing.Point(8, 64)
  88.         Me.Label1.Name = "Label1"
  89.         Me.Label1.Size = New System.Drawing.Size(112, 16)
  90.         Me.Label1.TabIndex = 2
  91.         Me.Label1.Text = "PoRt PrOxY:"
  92.         '
  93.         'TextBox2
  94.         '
  95.         Me.TextBox2.Location = New System.Drawing.Point(8, 88)
  96.         Me.TextBox2.Name = "TextBox2"
  97.         Me.TextBox2.Size = New System.Drawing.Size(264, 26)
  98.         Me.TextBox2.TabIndex = 1
  99.         Me.TextBox2.Text = "1080"
  100.         '
  101.         'TextBox1
  102.         '
  103.         Me.TextBox1.Location = New System.Drawing.Point(8, 40)
  104.         Me.TextBox1.Name = "TextBox1"
  105.         Me.TextBox1.Size = New System.Drawing.Size(264, 26)
  106.         Me.TextBox1.TabIndex = 0
  107.         Me.TextBox1.Text = "127.0.0.1"
  108.         '
  109.         'Form1
  110.         '
  111.         Me.AutoScaleBaseSize = New System.Drawing.Size(7, 19)
  112.         Me.ClientSize = New System.Drawing.Size(304, 166)
  113.         Me.Controls.Add(Me.GroupBox1)
  114.         Me.Font = New System.Drawing.Font("Comic Sans MS", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
  115.         Me.MaximizeBox = False
  116.         Me.Name = "Form1"
  117.         Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
  118.         Me.Text = "PrOXy iNFo By CiTyNoVa"
  119.         Me.GroupBox1.ResumeLayout(False)
  120.         Me.ResumeLayout(False)
  121.  
  122.     End Sub
  123.  
  124. #End Region
  125.  
  126.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  127.         On Error Resume Next
  128.         sck = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
  129.         proxy = New IPEndPoint(IPAddress.Parse(TextBox1.Text), Convert.ToInt32(TextBox2.Text))
  130.         sck.Connect(proxy)
  131.         Select Case sck.Connected
  132.             Case True
  133.                 MsgBox("PrOxY FuNZiONaNTe", MsgBoxStyle.Information, "PrOxY FuNzIoNaNTe")
  134.             Case False
  135.                 MsgBox("PrOxY NoN FuNZiONaNTe", MsgBoxStyle.Critical, "PrOxY NoN FuNzIoNaNTe")
  136.         End Select
  137.     End Sub
  138. End Class