├── Project Files
├── VPN Client
│ ├── Resources
│ │ └── DotRas.dll
│ ├── VPN Client_TemporaryKey.pfx
│ ├── bin
│ │ └── Debug
│ │ │ └── VPN Client.vshost.exe
│ ├── Custom-Icon-Design-Pretty-Office-13-Network-Connection.ico
│ ├── My Project
│ │ ├── Settings.settings
│ │ ├── Application.myapp
│ │ ├── AssemblyInfo.vb
│ │ ├── Application.Designer.vb
│ │ ├── Resources.Designer.vb
│ │ ├── Settings.Designer.vb
│ │ └── Resources.resx
│ ├── VPN Client.vbproj.user
│ ├── App.config
│ ├── VPN Client.vbproj
│ ├── Form1.vb
│ └── Form1.Designer.vb
└── VPN Client.sln
├── .gitattributes
├── .gitignore
├── README.md
└── LICENSE.md
/Project Files/VPN Client/Resources/DotRas.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XenocodeRCE/Epsilon-VPN-Client/master/Project Files/VPN Client/Resources/DotRas.dll
--------------------------------------------------------------------------------
/Project Files/VPN Client/VPN Client_TemporaryKey.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XenocodeRCE/Epsilon-VPN-Client/master/Project Files/VPN Client/VPN Client_TemporaryKey.pfx
--------------------------------------------------------------------------------
/Project Files/VPN Client/bin/Debug/VPN Client.vshost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XenocodeRCE/Epsilon-VPN-Client/master/Project Files/VPN Client/bin/Debug/VPN Client.vshost.exe
--------------------------------------------------------------------------------
/Project Files/VPN Client/Custom-Icon-Design-Pretty-Office-13-Network-Connection.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XenocodeRCE/Epsilon-VPN-Client/master/Project Files/VPN Client/Custom-Icon-Design-Pretty-Office-13-Network-Connection.ico
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/Project Files/VPN Client/My Project/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Project Files/VPN Client/VPN Client.vbproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | publish\
5 |
6 |
7 |
8 |
9 |
10 | en-US
11 | false
12 |
13 |
--------------------------------------------------------------------------------
/Project Files/VPN Client/My Project/Application.myapp:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 | Form1
5 | false
6 | 0
7 | true
8 | 0
9 | 0
10 | true
11 |
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear on external disk
35 | .Spotlight-V100
36 | .Trashes
37 |
38 | # Directories potentially created on remote AFP share
39 | .AppleDB
40 | .AppleDesktop
41 | Network Trash Folder
42 | Temporary Items
43 | .apdisk
44 |
--------------------------------------------------------------------------------
/Project Files/VPN Client/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Project Files/VPN Client.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Express 14 for Windows Desktop
4 | VisualStudioVersion = 14.0.23107.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VPN Client", "VPN Client\VPN Client.vbproj", "{55A119D9-39EE-4924-9F74-225CC926E8EE}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {55A119D9-39EE-4924-9F74-225CC926E8EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {55A119D9-39EE-4924-9F74-225CC926E8EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {55A119D9-39EE-4924-9F74-225CC926E8EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {55A119D9-39EE-4924-9F74-225CC926E8EE}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Epsilon VPN Client
2 |
3 | What is it?
4 | ------------
5 | The Epsilon VPN Client is an open-source VPN client created in Visual Basic .NET after a lack of VPN clients were found. The client was originally designed for private use for a private business, but the author decided that it an open-source solution was required. And so Epsilon was born.
6 |
7 | The program is currently in a beta phase with only the VPN connections (L2TP & PPTP) being active. There are plans to add more features such as credential management and provider specific options in the future. The program will become more suitable for commercial use and can be used in a wide variety of situations ranging from corporate down to consumer level users.
8 |
9 | Features
10 | -----------
11 | Currently the features on the program are quite minimal but will be improved in the future.
12 | * PPTP Connection
13 | * L2TP Connection
14 | * Saving of VPN Connection
15 | * Creation of VPN Connection
16 | * Storage of username
17 | * Connection to exisitng VPN connection within Windows.
18 |
19 | Compatibility
20 | ------------
21 | The client is currently compatible on any Microsoft Operating System from XP to Windows 10.
22 |
23 | PLEASE NOTE: Beta testing has only been performed on Windows 10
24 |
--------------------------------------------------------------------------------
/Project Files/VPN Client/My Project/AssemblyInfo.vb:
--------------------------------------------------------------------------------
1 | Imports System
2 | Imports System.Reflection
3 | Imports System.Runtime.InteropServices
4 |
5 | ' General Information about an assembly is controlled through the following
6 | ' set of attributes. Change these attribute values to modify the information
7 | ' associated with an assembly.
8 |
9 | ' Review the values of the assembly attributes
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | 'The following GUID is for the ID of the typelib if this project is exposed to COM
21 |
22 |
23 | ' Version information for an assembly consists of the following four values:
24 | '
25 | ' Major Version
26 | ' Minor Version
27 | ' Build Number
28 | ' Revision
29 | '
30 | ' You can specify all the values or you can default the Build and Revision Numbers
31 | ' by using the '*' as shown below:
32 | '
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Project Files/VPN Client/My Project/Application.Designer.vb:
--------------------------------------------------------------------------------
1 | '------------------------------------------------------------------------------
2 | '
3 | ' This code was generated by a tool.
4 | ' Runtime Version:4.0.30319.42000
5 | '
6 | ' Changes to this file may cause incorrect behavior and will be lost if
7 | ' the code is regenerated.
8 | '
9 | '------------------------------------------------------------------------------
10 |
11 | Option Strict On
12 | Option Explicit On
13 |
14 |
15 | Namespace My
16 |
17 | 'NOTE: This file is auto-generated; do not modify it directly. To make changes,
18 | ' or if you encounter build errors in this file, go to the Project Designer
19 | ' (go to Project Properties or double-click the My Project node in
20 | ' Solution Explorer), and make changes on the Application tab.
21 | '
22 | Partial Friend Class MyApplication
23 |
24 | _
25 | Public Sub New()
26 | MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
27 | Me.IsSingleInstance = false
28 | Me.EnableVisualStyles = true
29 | Me.SaveMySettingsOnExit = true
30 | Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
31 | End Sub
32 |
33 | _
34 | Protected Overrides Sub OnCreateMainForm()
35 | Me.MainForm = Global.VPN_Client.Form1
36 | End Sub
37 | End Class
38 | End Namespace
39 |
--------------------------------------------------------------------------------
/Project Files/VPN Client/My Project/Resources.Designer.vb:
--------------------------------------------------------------------------------
1 | '------------------------------------------------------------------------------
2 | '
3 | ' This code was generated by a tool.
4 | ' Runtime Version:4.0.30319.42000
5 | '
6 | ' Changes to this file may cause incorrect behavior and will be lost if
7 | ' the code is regenerated.
8 | '
9 | '------------------------------------------------------------------------------
10 |
11 | Option Strict On
12 | Option Explicit On
13 |
14 |
15 | Namespace My.Resources
16 |
17 | 'This class was auto-generated by the StronglyTypedResourceBuilder
18 | 'class via a tool like ResGen or Visual Studio.
19 | 'To add or remove a member, edit your .ResX file then rerun ResGen
20 | 'with the /str option, or rebuild your VS project.
21 | '''
22 | ''' A strongly-typed resource class, for looking up localized strings, etc.
23 | '''
24 | _
28 | Friend Module Resources
29 |
30 | Private resourceMan As Global.System.Resources.ResourceManager
31 |
32 | Private resourceCulture As Global.System.Globalization.CultureInfo
33 |
34 | '''
35 | ''' Returns the cached ResourceManager instance used by this class.
36 | '''
37 | _
38 | Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
39 | Get
40 | If Object.ReferenceEquals(resourceMan, Nothing) Then
41 | Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("VPN_Client.Resources", GetType(Resources).Assembly)
42 | resourceMan = temp
43 | End If
44 | Return resourceMan
45 | End Get
46 | End Property
47 |
48 | '''
49 | ''' Overrides the current thread's CurrentUICulture property for all
50 | ''' resource lookups using this strongly typed resource class.
51 | '''
52 | _
53 | Friend Property Culture() As Global.System.Globalization.CultureInfo
54 | Get
55 | Return resourceCulture
56 | End Get
57 | Set(ByVal value As Global.System.Globalization.CultureInfo)
58 | resourceCulture = value
59 | End Set
60 | End Property
61 | End Module
62 | End Namespace
63 |
--------------------------------------------------------------------------------
/Project Files/VPN Client/My Project/Settings.Designer.vb:
--------------------------------------------------------------------------------
1 | '------------------------------------------------------------------------------
2 | '
3 | ' This code was generated by a tool.
4 | ' Runtime Version:4.0.30319.42000
5 | '
6 | ' Changes to this file may cause incorrect behavior and will be lost if
7 | ' the code is regenerated.
8 | '
9 | '------------------------------------------------------------------------------
10 |
11 | Option Strict On
12 | Option Explicit On
13 |
14 |
15 | Namespace My
16 |
17 | _
20 | Partial Friend NotInheritable Class MySettings
21 | Inherits Global.System.Configuration.ApplicationSettingsBase
22 |
23 | Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
24 |
25 | #Region "My.Settings Auto-Save Functionality"
26 | #If _MyType = "WindowsForms" Then
27 | Private Shared addedHandler As Boolean
28 |
29 | Private Shared addedHandlerLockObject As New Object
30 |
31 | _
32 | Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
33 | If My.Application.SaveMySettingsOnExit Then
34 | My.Settings.Save()
35 | End If
36 | End Sub
37 | #End If
38 | #End Region
39 |
40 | Public Shared ReadOnly Property [Default]() As MySettings
41 | Get
42 |
43 | #If _MyType = "WindowsForms" Then
44 | If Not addedHandler Then
45 | SyncLock addedHandlerLockObject
46 | If Not addedHandler Then
47 | AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
48 | addedHandler = True
49 | End If
50 | End SyncLock
51 | End If
52 | #End If
53 | Return defaultInstance
54 | End Get
55 | End Property
56 |
57 | _
60 | Public Property Username() As String
61 | Get
62 | Return CType(Me("Username"),String)
63 | End Get
64 | Set
65 | Me("Username") = value
66 | End Set
67 | End Property
68 | End Class
69 | End Namespace
70 |
71 | Namespace My
72 |
73 | _
76 | Friend Module MySettingsProperty
77 |
78 | _
79 | Friend ReadOnly Property Settings() As Global.VPN_Client.My.MySettings
80 | Get
81 | Return Global.VPN_Client.My.MySettings.Default
82 | End Get
83 | End Property
84 | End Module
85 | End Namespace
86 |
--------------------------------------------------------------------------------
/Project Files/VPN Client/My Project/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/Project Files/VPN Client/VPN Client.vbproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {55A119D9-39EE-4924-9F74-225CC926E8EE}
8 | WinExe
9 | VPN_Client.My.MyApplication
10 | VPN_Client
11 | VPN Client
12 | 512
13 | WindowsForms
14 | v4.5
15 | false
16 | publish\
17 | false
18 | Disk
19 | false
20 | Foreground
21 | 7
22 | Days
23 | false
24 | false
25 | true
26 | 1
27 | 1.0.0.%2a
28 | false
29 | true
30 | true
31 |
32 |
33 | AnyCPU
34 | true
35 | full
36 | true
37 | true
38 | bin\Debug\
39 | VPN Client.xml
40 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
41 |
42 |
43 | AnyCPU
44 | pdbonly
45 | false
46 | true
47 | true
48 | bin\Release\
49 | VPN Client.xml
50 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
51 |
52 |
53 | On
54 |
55 |
56 | Binary
57 |
58 |
59 | Off
60 |
61 |
62 | On
63 |
64 |
65 | Custom-Icon-Design-Pretty-Office-13-Network-Connection.ico
66 |
67 |
68 | 542A36E5629245BF8034D64899B650CEB4B67E67
69 |
70 |
71 | VPN Client_TemporaryKey.pfx
72 |
73 |
74 | true
75 |
76 |
77 | true
78 |
79 |
80 |
81 | ..\..\..\..\..\..\..\Program Files (x86)\DotRas SDKs\v1.3\Libraries\NET40\WIN7\DotRas.dll
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | Form1.vb
110 |
111 |
112 | Form
113 |
114 |
115 |
116 | True
117 | Application.myapp
118 |
119 |
120 | True
121 | True
122 | Resources.resx
123 |
124 |
125 | True
126 | Settings.settings
127 | True
128 |
129 |
130 |
131 |
132 | Form1.vb
133 |
134 |
135 | VbMyResourcesResXFileCodeGenerator
136 | Resources.Designer.vb
137 | My.Resources
138 | Designer
139 |
140 |
141 |
142 |
143 | MyApplicationCodeGenerator
144 | Application.Designer.vb
145 |
146 |
147 | SettingsSingleFileGenerator
148 | My
149 | Settings.Designer.vb
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 | False
163 | Microsoft .NET Framework 4.5 %28x86 and x64%29
164 | true
165 |
166 |
167 | False
168 | .NET Framework 3.5 SP1
169 | false
170 |
171 |
172 |
173 |
180 |
--------------------------------------------------------------------------------
/Project Files/VPN Client/Form1.vb:
--------------------------------------------------------------------------------
1 | 'Creator: Tachyon
2 | 'Date: 25 Ocotber 2015
3 | 'Release Date: 27 October 2015
4 | 'License: GNU GPL v2
5 | 'If there are any issues please contact: tachyon@hackforums.org
6 |
7 | Imports DotRas
8 | Public Class Form1
9 | Dim RasCon As RasConnection
10 | Private Sub radL2TP_CheckedChanged(sender As Object, e As EventArgs) Handles radL2TP.CheckedChanged
11 |
12 | 'Basically, this sub just checks if the radio button for the L2TP has changed, if so, it must enable the Pre-Shared Key box to accept the PSK to
13 | 'complete the L2TP connection.
14 |
15 | If radL2TP.Checked Then
16 | txtPSK.Enabled = True 'Enables the TextBox if L2TP was selected
17 | Else
18 | txtPSK.Enabled = False 'Disables the TextBox when L2TP is unselected
19 | End If
20 | End Sub
21 |
22 | Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
23 | If My.Settings.Username.Equals("") Then 'Checks to see if there is a username stored in the settings
24 | Else
25 | txtUsername.Text = My.Settings.Username 'If there is, fill the inforamtion into the textbox
26 | chkRemember.Checked = True 'And check the checkbox to show that the remember function was enabled
27 | End If
28 | End Sub
29 | Private Sub dialer_StateChanged(sender As Object, e As StateChangedEventArgs) Handles dialer.StateChanged
30 | Dim li As ListViewItem 'Creates a new list view item to add items to the listview
31 | li = ListView1.Items.Add(DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")) 'Adds the current date and time to the listview for the logs
32 | li.SubItems.Add(e.State.ToString) 'Adds the current state of the connection to the listview for log purposes
33 | End Sub
34 |
35 | Private Sub chkRemember_CheckedChanged(sender As Object, e As EventArgs) Handles chkRemember.CheckedChanged
36 | 'This Sub basically checks if the checkbox for storing the users' username is checked, if it is store it, if not, dont
37 | If chkRemember.Checked Then
38 | My.Settings.Username = txtUsername.Text
39 | Else
40 | My.Settings.Username = ""
41 | End If
42 | End Sub
43 |
44 | Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
45 | Dim creds As Net.NetworkCredential 'Creates the new NetworkCredential required to authenticate to the VPN
46 | Dim pptpEntry As RasEntry 'Creates an empty object of type RasEntry to be modified later for PPTP use
47 | Dim l2tpEntry As RasEntry 'Creates an empty object of type RasEntry to be modified later for L2TP use
48 |
49 | Try 'Start of Try Catch statement
50 | RasPhoneBook1.Open(True) 'Opens the users' default phonebook to access VPN connection information
51 |
52 | If txtUsername.Text = "" Then 'Makes sure that the user inputted a username
53 | MessageBox.Show("Please enter a username.", "No username", MessageBoxButtons.OK, MessageBoxIcon.Error) 'If there was no username entered display an error message
54 | Else 'If there is username entered carry on
55 | If txtPassword.Text = "" Then 'Makes sure that the user inputted a password
56 | MessageBox.Show("Please enter a password.", "No password", MessageBoxButtons.OK, MessageBoxIcon.Error) 'If there was no password entered display an error
57 | Else 'If there is a username and password entered carry on
58 | creds = New Net.NetworkCredential(txtUsername.Text, txtPassword.Text) 'Asigns the login information to the user credential object
59 |
60 | If radPPTP.Checked Then 'Checks to see which VPN protocol is required: PPTP
61 |
62 | For Each RasEntry In RasPhoneBook1.Entries.ToList 'Checks to see whether the VPN Connection already exists within the VPN Connection book
63 | If RasEntry.Name = txtIP.Text Then 'If it finds a entry do the following:
64 | dialVPN(txtIP.Text, RasPhoneBook.GetPhoneBookPath(RasPhoneBookType.User), creds) 'Dial the exisitng VPN with the user credentials the user provided
65 | Exit Sub 'Exits the Sub as the connection has been started
66 | End If 'End of the check of existing VPN Connections
67 | Next 'Moves on to next RasEntry in the users' VPN Phonebook
68 |
69 | pptpEntry = RasEntry.CreateVpnEntry(txtIP.Text, txtIP.Text, RasVpnStrategy.PptpOnly, RasDevice.GetDeviceByName("(PPTP)", RasDeviceType.Vpn, False))
70 | ' The above line creates a new VPN entry for the VPN connection as no VPN connections matching the criteria have been found
71 | RasPhoneBook1.Entries.Add(pptpEntry) 'Adds the VPN connection into the VPN phonebook
72 |
73 | dialVPN(txtIP.Text, RasPhoneBook.GetPhoneBookPath(RasPhoneBookType.User), creds) 'Starts the VPN connection to the newly created entry
74 |
75 | ElseIf radL2TP.Checked 'Checks to see which VPN protocol is required: L2TP/IPSEC
76 |
77 | For Each RasEntry In RasPhoneBook1.Entries.ToList 'Checks to see whether the VPN Connection already exists within the VPN Connection book
78 | If RasEntry.Name = txtIP.Text Then 'If it finds a entry do the following:
79 | dialVPN(txtIP.Text, RasPhoneBook.GetPhoneBookPath(RasPhoneBookType.User), creds) 'Dial the exisitng VPN with the user credentials the user provided
80 | Exit Sub 'Exits the Sub as the connection has been started
81 | End If 'End of the check of existing VPN Connections
82 | Next 'Moves on to next RasEntry in the users' VPN Phonebook
83 |
84 | l2tpEntry = RasEntry.CreateVpnEntry(txtIP.Text, txtIP.Text, DotRas.RasVpnStrategy.L2tpOnly, RasDevice.GetDeviceByName("(L2TP)", RasDeviceType.Vpn, False))
85 | ' The above line creates a new VPN entry for the VPN connection as no VPN connections matching the criteria have been found
86 | l2tpEntry.Options.UsePreSharedKey = True 'This tells the VPN Entry that this connection will require a Pre-Shared Key, obviously using the L2TP protocol
87 |
88 | RasPhoneBook1.Entries.Add(l2tpEntry) 'Adds this new VPN Connection into the phonebook
89 |
90 | l2tpEntry.UpdateCredentials(RasPreSharedKey.Client, txtPSK.Text) 'Updates the Pre-Shared key of the newly created VPN Connection
91 |
92 | dialVPN(txtIP.Text, RasPhoneBook.GetPhoneBookPath(RasPhoneBookType.User), creds) 'Starts the VPN connection to the newly created entry
93 | End If 'End of the If statement to see which protocol is required
94 | End If 'End of the If statement to check the password field
95 | End If 'Enf of the If statement to check the username field
96 | Catch ex As Exception 'Catches any Exceptions
97 | MessageBox.Show(ex.Message, Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Error) 'Creates a MessageBox with the error that has occured
98 | End Try
99 | End Sub
100 |
101 | Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
102 | Dim li As ListViewItem 'Creates a new listview item to add information to for use late on
103 |
104 | RasCon = RasConnection.GetActiveConnectionByName(txtIP.Text, RasPhoneBook.GetPhoneBookPath(RasPhoneBookType.User)) 'Gets the current VPN connection
105 | RasCon.HangUp() 'Ends the current VPN connection
106 |
107 | ListView1.Items.Clear() 'Clears the listbox of all it's information
108 |
109 | li = ListView1.Items.Add(DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")) 'Gets the current date/time and adds it to the listbox item
110 | li.SubItems.Add("VPN Disconnected") 'Adds the information regarding what happened to the connection to the item and adds it to the listbox
111 | End Sub
112 |
113 | Public Sub dialVPN(ByVal entryName As String, ByVal bookPath As String, ByVal credentials As Net.NetworkCredential)
114 | 'Method to actually connect the the VPN that has been created/called
115 | dialer.EntryName = entryName 'Sets the dialer to the name of the connection you are trying to use
116 | dialer.PhoneBookPath = bookPath 'Sets the book path of where the connection information is actually stored
117 | dialer.Credentials = credentials 'Sets the credentials required to login the the VPN service
118 |
119 | dialer.DialAsync() 'Finally, it dials the VPN and connects to it (hopefully)
120 | End Sub
121 | End Class
--------------------------------------------------------------------------------
/Project Files/VPN Client/Form1.Designer.vb:
--------------------------------------------------------------------------------
1 |
2 | Partial Class Form1
3 | Inherits System.Windows.Forms.Form
4 |
5 | 'Form overrides dispose to clean up the component list.
6 |
7 | Protected Overrides Sub Dispose(ByVal disposing As Boolean)
8 | Try
9 | If disposing AndAlso components IsNot Nothing Then
10 | components.Dispose()
11 | End If
12 | Finally
13 | MyBase.Dispose(disposing)
14 | End Try
15 | End Sub
16 |
17 | 'Required by the Windows Form Designer
18 | Private components As System.ComponentModel.IContainer
19 |
20 | 'NOTE: The following procedure is required by the Windows Form Designer
21 | 'It can be modified using the Windows Form Designer.
22 | 'Do not modify it using the code editor.
23 |
24 | Private Sub InitializeComponent()
25 | Me.components = New System.ComponentModel.Container()
26 | Dim ColumnHeader1 As System.Windows.Forms.ColumnHeader
27 | Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1))
28 | Me.Button1 = New System.Windows.Forms.Button()
29 | Me.Button2 = New System.Windows.Forms.Button()
30 | Me.GroupBox1 = New System.Windows.Forms.GroupBox()
31 | Me.chkRemember = New System.Windows.Forms.CheckBox()
32 | Me.txtPassword = New System.Windows.Forms.TextBox()
33 | Me.Label2 = New System.Windows.Forms.Label()
34 | Me.txtUsername = New System.Windows.Forms.TextBox()
35 | Me.Label1 = New System.Windows.Forms.Label()
36 | Me.GroupBox2 = New System.Windows.Forms.GroupBox()
37 | Me.Label5 = New System.Windows.Forms.Label()
38 | Me.txtPSK = New System.Windows.Forms.TextBox()
39 | Me.radL2TP = New System.Windows.Forms.RadioButton()
40 | Me.radPPTP = New System.Windows.Forms.RadioButton()
41 | Me.Label4 = New System.Windows.Forms.Label()
42 | Me.txtIP = New System.Windows.Forms.TextBox()
43 | Me.Label3 = New System.Windows.Forms.Label()
44 | Me.GroupBox3 = New System.Windows.Forms.GroupBox()
45 | Me.ListView1 = New System.Windows.Forms.ListView()
46 | Me.ColumnHeader2 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
47 | Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
48 | Me.ToolStripStatusLabel1 = New System.Windows.Forms.ToolStripStatusLabel()
49 | Me.lblVersion = New System.Windows.Forms.ToolStripStatusLabel()
50 | Me.RasPhoneBook1 = New DotRas.RasPhoneBook(Me.components)
51 | Me.dialer = New DotRas.RasDialer(Me.components)
52 | ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
53 | Me.GroupBox1.SuspendLayout()
54 | Me.GroupBox2.SuspendLayout()
55 | Me.GroupBox3.SuspendLayout()
56 | Me.StatusStrip1.SuspendLayout()
57 | Me.SuspendLayout()
58 | '
59 | 'ColumnHeader1
60 | '
61 | ColumnHeader1.Text = "Date/Time"
62 | ColumnHeader1.Width = 69
63 | '
64 | 'Button1
65 | '
66 | Me.Button1.Location = New System.Drawing.Point(216, 358)
67 | Me.Button1.Name = "Button1"
68 | Me.Button1.Size = New System.Drawing.Size(75, 23)
69 | Me.Button1.TabIndex = 1
70 | Me.Button1.Text = "Connect"
71 | Me.Button1.UseVisualStyleBackColor = True
72 | '
73 | 'Button2
74 | '
75 | Me.Button2.Location = New System.Drawing.Point(12, 358)
76 | Me.Button2.Name = "Button2"
77 | Me.Button2.Size = New System.Drawing.Size(75, 23)
78 | Me.Button2.TabIndex = 2
79 | Me.Button2.Text = "Disconnect"
80 | Me.Button2.UseVisualStyleBackColor = True
81 | '
82 | 'GroupBox1
83 | '
84 | Me.GroupBox1.Controls.Add(Me.chkRemember)
85 | Me.GroupBox1.Controls.Add(Me.txtPassword)
86 | Me.GroupBox1.Controls.Add(Me.Label2)
87 | Me.GroupBox1.Controls.Add(Me.txtUsername)
88 | Me.GroupBox1.Controls.Add(Me.Label1)
89 | Me.GroupBox1.Location = New System.Drawing.Point(12, 13)
90 | Me.GroupBox1.Name = "GroupBox1"
91 | Me.GroupBox1.Size = New System.Drawing.Size(279, 100)
92 | Me.GroupBox1.TabIndex = 3
93 | Me.GroupBox1.TabStop = False
94 | Me.GroupBox1.Text = "Account Information:"
95 | '
96 | 'chkRemember
97 | '
98 | Me.chkRemember.AutoSize = True
99 | Me.chkRemember.Location = New System.Drawing.Point(10, 77)
100 | Me.chkRemember.Name = "chkRemember"
101 | Me.chkRemember.Size = New System.Drawing.Size(95, 17)
102 | Me.chkRemember.TabIndex = 4
103 | Me.chkRemember.Text = "Remember Me"
104 | Me.chkRemember.UseVisualStyleBackColor = True
105 | '
106 | 'txtPassword
107 | '
108 | Me.txtPassword.Location = New System.Drawing.Point(71, 50)
109 | Me.txtPassword.Name = "txtPassword"
110 | Me.txtPassword.Size = New System.Drawing.Size(202, 20)
111 | Me.txtPassword.TabIndex = 3
112 | Me.txtPassword.UseSystemPasswordChar = True
113 | '
114 | 'Label2
115 | '
116 | Me.Label2.AutoSize = True
117 | Me.Label2.Location = New System.Drawing.Point(7, 53)
118 | Me.Label2.Name = "Label2"
119 | Me.Label2.Size = New System.Drawing.Size(56, 13)
120 | Me.Label2.TabIndex = 2
121 | Me.Label2.Text = "Password:"
122 | '
123 | 'txtUsername
124 | '
125 | Me.txtUsername.Location = New System.Drawing.Point(71, 17)
126 | Me.txtUsername.Name = "txtUsername"
127 | Me.txtUsername.Size = New System.Drawing.Size(202, 20)
128 | Me.txtUsername.TabIndex = 1
129 | '
130 | 'Label1
131 | '
132 | Me.Label1.AutoSize = True
133 | Me.Label1.Location = New System.Drawing.Point(7, 20)
134 | Me.Label1.Name = "Label1"
135 | Me.Label1.Size = New System.Drawing.Size(58, 13)
136 | Me.Label1.TabIndex = 0
137 | Me.Label1.Text = "Username:"
138 | '
139 | 'GroupBox2
140 | '
141 | Me.GroupBox2.Controls.Add(Me.Label5)
142 | Me.GroupBox2.Controls.Add(Me.txtPSK)
143 | Me.GroupBox2.Controls.Add(Me.radL2TP)
144 | Me.GroupBox2.Controls.Add(Me.radPPTP)
145 | Me.GroupBox2.Controls.Add(Me.Label4)
146 | Me.GroupBox2.Controls.Add(Me.txtIP)
147 | Me.GroupBox2.Controls.Add(Me.Label3)
148 | Me.GroupBox2.Location = New System.Drawing.Point(13, 120)
149 | Me.GroupBox2.Name = "GroupBox2"
150 | Me.GroupBox2.Size = New System.Drawing.Size(278, 87)
151 | Me.GroupBox2.TabIndex = 4
152 | Me.GroupBox2.TabStop = False
153 | Me.GroupBox2.Text = "Server Information:"
154 | '
155 | 'Label5
156 | '
157 | Me.Label5.AutoSize = True
158 | Me.Label5.Location = New System.Drawing.Point(9, 64)
159 | Me.Label5.Name = "Label5"
160 | Me.Label5.Size = New System.Drawing.Size(84, 13)
161 | Me.Label5.TabIndex = 6
162 | Me.Label5.Text = "Pre-Shared Key:"
163 | '
164 | 'txtPSK
165 | '
166 | Me.txtPSK.Enabled = False
167 | Me.txtPSK.Location = New System.Drawing.Point(99, 61)
168 | Me.txtPSK.Name = "txtPSK"
169 | Me.txtPSK.Size = New System.Drawing.Size(172, 20)
170 | Me.txtPSK.TabIndex = 5
171 | '
172 | 'radL2TP
173 | '
174 | Me.radL2TP.AutoSize = True
175 | Me.radL2TP.Location = New System.Drawing.Point(117, 43)
176 | Me.radL2TP.Name = "radL2TP"
177 | Me.radL2TP.Size = New System.Drawing.Size(51, 17)
178 | Me.radL2TP.TabIndex = 4
179 | Me.radL2TP.Text = "L2TP"
180 | Me.radL2TP.UseVisualStyleBackColor = True
181 | '
182 | 'radPPTP
183 | '
184 | Me.radPPTP.AutoSize = True
185 | Me.radPPTP.Checked = True
186 | Me.radPPTP.Location = New System.Drawing.Point(64, 43)
187 | Me.radPPTP.Name = "radPPTP"
188 | Me.radPPTP.Size = New System.Drawing.Size(53, 17)
189 | Me.radPPTP.TabIndex = 3
190 | Me.radPPTP.TabStop = True
191 | Me.radPPTP.Text = "PPTP"
192 | Me.radPPTP.UseVisualStyleBackColor = True
193 | '
194 | 'Label4
195 | '
196 | Me.Label4.AutoSize = True
197 | Me.Label4.Location = New System.Drawing.Point(9, 45)
198 | Me.Label4.Name = "Label4"
199 | Me.Label4.Size = New System.Drawing.Size(49, 13)
200 | Me.Label4.TabIndex = 2
201 | Me.Label4.Text = "Protocol:"
202 | '
203 | 'txtIP
204 | '
205 | Me.txtIP.Location = New System.Drawing.Point(117, 17)
206 | Me.txtIP.Name = "txtIP"
207 | Me.txtIP.Size = New System.Drawing.Size(154, 20)
208 | Me.txtIP.TabIndex = 1
209 | '
210 | 'Label3
211 | '
212 | Me.Label3.AutoSize = True
213 | Me.Label3.Location = New System.Drawing.Point(9, 20)
214 | Me.Label3.Name = "Label3"
215 | Me.Label3.Size = New System.Drawing.Size(102, 13)
216 | Me.Label3.TabIndex = 0
217 | Me.Label3.Text = "IP Address/Domain:"
218 | '
219 | 'GroupBox3
220 | '
221 | Me.GroupBox3.Controls.Add(Me.ListView1)
222 | Me.GroupBox3.Location = New System.Drawing.Point(12, 214)
223 | Me.GroupBox3.Name = "GroupBox3"
224 | Me.GroupBox3.Size = New System.Drawing.Size(279, 138)
225 | Me.GroupBox3.TabIndex = 5
226 | Me.GroupBox3.TabStop = False
227 | Me.GroupBox3.Text = "VPN Connection Log:"
228 | '
229 | 'ListView1
230 | '
231 | Me.ListView1.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {ColumnHeader1, Me.ColumnHeader2})
232 | Me.ListView1.Location = New System.Drawing.Point(6, 19)
233 | Me.ListView1.Name = "ListView1"
234 | Me.ListView1.Size = New System.Drawing.Size(267, 113)
235 | Me.ListView1.TabIndex = 0
236 | Me.ListView1.UseCompatibleStateImageBehavior = False
237 | Me.ListView1.View = System.Windows.Forms.View.Details
238 | '
239 | 'ColumnHeader2
240 | '
241 | Me.ColumnHeader2.Text = "Information"
242 | Me.ColumnHeader2.Width = 191
243 | '
244 | 'StatusStrip1
245 | '
246 | Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripStatusLabel1, Me.lblVersion})
247 | Me.StatusStrip1.Location = New System.Drawing.Point(0, 385)
248 | Me.StatusStrip1.Name = "StatusStrip1"
249 | Me.StatusStrip1.Size = New System.Drawing.Size(303, 22)
250 | Me.StatusStrip1.SizingGrip = False
251 | Me.StatusStrip1.TabIndex = 6
252 | Me.StatusStrip1.Text = "StatusStrip1"
253 | '
254 | 'ToolStripStatusLabel1
255 | '
256 | Me.ToolStripStatusLabel1.Name = "ToolStripStatusLabel1"
257 | Me.ToolStripStatusLabel1.Size = New System.Drawing.Size(48, 17)
258 | Me.ToolStripStatusLabel1.Text = "Version:"
259 | '
260 | 'lblVersion
261 | '
262 | Me.lblVersion.Name = "lblVersion"
263 | Me.lblVersion.Size = New System.Drawing.Size(40, 17)
264 | Me.lblVersion.Text = "1.0.0.0"
265 | '
266 | 'dialer
267 | '
268 | 'TODO: Code generation for '' failed because of Exception 'Invalid Primitive Type: System.IntPtr. Consider using CodeObjectCreateExpression.'.
269 | 'TODO: Code generation for '' failed because of Exception 'Invalid Primitive Type: System.IntPtr. Consider using CodeObjectCreateExpression.'.
270 | Me.dialer.Credentials = Nothing
271 | Me.dialer.EapOptions = New DotRas.RasEapOptions(False, False, False)
272 | Me.dialer.Options = New DotRas.RasDialOptions(False, False, False, False, False, False, False, False, False, False, False)
273 | Me.dialer.SynchronizingObject = Me
274 | '
275 | 'Form1
276 | '
277 | Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
278 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
279 | Me.ClientSize = New System.Drawing.Size(303, 407)
280 | Me.Controls.Add(Me.StatusStrip1)
281 | Me.Controls.Add(Me.GroupBox3)
282 | Me.Controls.Add(Me.GroupBox2)
283 | Me.Controls.Add(Me.GroupBox1)
284 | Me.Controls.Add(Me.Button2)
285 | Me.Controls.Add(Me.Button1)
286 | Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
287 | Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
288 | Me.MaximizeBox = False
289 | Me.Name = "Form1"
290 | Me.Text = "Epsilon VPN Client"
291 | Me.GroupBox1.ResumeLayout(False)
292 | Me.GroupBox1.PerformLayout()
293 | Me.GroupBox2.ResumeLayout(False)
294 | Me.GroupBox2.PerformLayout()
295 | Me.GroupBox3.ResumeLayout(False)
296 | Me.StatusStrip1.ResumeLayout(False)
297 | Me.StatusStrip1.PerformLayout()
298 | Me.ResumeLayout(False)
299 | Me.PerformLayout()
300 |
301 | End Sub
302 | Friend WithEvents Button1 As Button
303 | Friend WithEvents Button2 As Button
304 | Friend WithEvents GroupBox1 As GroupBox
305 | Friend WithEvents Label1 As Label
306 | Friend WithEvents txtUsername As TextBox
307 | Friend WithEvents Label2 As Label
308 | Friend WithEvents txtPassword As TextBox
309 | Friend WithEvents chkRemember As CheckBox
310 | Friend WithEvents GroupBox2 As GroupBox
311 | Friend WithEvents Label3 As Label
312 | Friend WithEvents txtIP As TextBox
313 | Friend WithEvents Label4 As Label
314 | Friend WithEvents radPPTP As RadioButton
315 | Friend WithEvents radL2TP As RadioButton
316 | Friend WithEvents GroupBox3 As GroupBox
317 | Friend WithEvents ListView1 As ListView
318 | Friend WithEvents ColumnHeader2 As ColumnHeader
319 | Friend WithEvents StatusStrip1 As StatusStrip
320 | Friend WithEvents ToolStripStatusLabel1 As ToolStripStatusLabel
321 | Friend WithEvents lblVersion As ToolStripStatusLabel
322 | Friend WithEvents txtPSK As TextBox
323 | Friend WithEvents Label5 As Label
324 | Friend WithEvents RasPhoneBook1 As DotRas.RasPhoneBook
325 | Friend WithEvents dialer As DotRas.RasDialer
326 | End Class
327 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 | {description}
294 | Copyright (C) {year} {fullname}
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | {signature of Ty Coon}, 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
340 |
--------------------------------------------------------------------------------